File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 75
75
"@successMessageCopied": {
76
76
"description": "Message when content of a message was copied to the users system clipboard."
77
77
},
78
+ "contentValidationErrorTooLong": "Message length shouldn't be greater than 10000 characters.",
79
+ "@contentValidationErrorTooLong": {
80
+ "description": "Content validation error message when the message is too long."
81
+ },
82
+ "contentValidationErrorEmpty": "You have nothing to send!",
83
+ "@contentValidationErrorEmpty": {
84
+ "description": "Content validation error message when the message is empty."
85
+ },
86
+ "contentValidationErrorQuoteAndReplyInProgress": "Please wait for the quotation to complete.",
87
+ "@contentValidationErrorQuoteAndReplyInProgress": {
88
+ "description": "Content validation error message when a quotation has not completed yet."
89
+ },
90
+ "contentValidationErrorUploadInProgress": "Please wait for the upload to complete.",
91
+ "@contentValidationErrorUploadInProgress": {
92
+ "description": "Content validation error message when attachments have not finished uploading."
93
+ },
78
94
"dialogCancel": "Cancel",
79
95
"@dialogCancel": {
80
96
"description": "Button label in dialogs to cancel."
Original file line number Diff line number Diff line change @@ -90,16 +90,16 @@ enum ContentValidationError {
90
90
quoteAndReplyInProgress,
91
91
uploadInProgress;
92
92
93
- String message () {
93
+ String message (ZulipLocalizations zulipLocalizations ) {
94
94
switch (this ) {
95
95
case ContentValidationError .tooLong:
96
- return "Message length shouldn't be greater than 10000 characters." ;
96
+ return zulipLocalizations.contentValidationErrorTooLong ;
97
97
case ContentValidationError .empty:
98
- return 'You have nothing to send!' ;
98
+ return zulipLocalizations.contentValidationErrorEmpty ;
99
99
case ContentValidationError .quoteAndReplyInProgress:
100
- return 'Please wait for the quotation to complete.' ;
100
+ return zulipLocalizations.contentValidationErrorQuoteAndReplyInProgress ;
101
101
case ContentValidationError .uploadInProgress:
102
- return 'Please wait for the upload to complete.' ;
102
+ return zulipLocalizations.contentValidationErrorUploadInProgress ;
103
103
}
104
104
}
105
105
}
@@ -704,7 +704,7 @@ class _SendButtonState extends State<_SendButton> {
704
704
for (final error in widget.topicController? .validationErrors ?? const [])
705
705
error.message (zulipLocalizations),
706
706
for (final error in widget.contentController.validationErrors)
707
- error.message (),
707
+ error.message (zulipLocalizations ),
708
708
];
709
709
showErrorDialog (
710
710
context: context,
You can’t perform that action at this time.
0 commit comments