Skip to content

Commit f727c54

Browse files
committed
add localization
1 parent 2470778 commit f727c54

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

assets/l10n/app_en.arb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
"@permissionsDeniedReadExternalStorage": {
4444
"description": "Message for dialog asking the user to grant permissions for external storage read access."
4545
},
46+
"actionSheetOptionAddReaction": "Add reaction",
47+
"@actionSheetOptionAddReaction": {
48+
"description": "Label for add reaction button on action sheet."
49+
},
4650
"actionSheetOptionCopy": "Copy message text",
4751
"@actionSheetOptionCopy": {
4852
"description": "Label for copy message text button on action sheet."
@@ -67,6 +71,10 @@
6771
"@errorCouldNotFetchMessageSource": {
6872
"description": "Error message when the source of a message could not be fetched."
6973
},
74+
"errorAddingReactionFailed": "Adding a reaction failed",
75+
"@errorAddingReactionFailed": {
76+
"description": "Error message when adding a reaction to a message failed."
77+
},
7078
"errorCopyingFailed": "Copying failed",
7179
"@errorCopyingFailed": {
7280
"description": "Error message when copying the text of a message to the user's system clipboard failed."

lib/widgets/action_sheet.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class AddReactionButton extends MessageActionSheetMenuItemButton {
8787

8888
@override
8989
String label(ZulipLocalizations zulipLocalizations) {
90-
return 'Add reaction'; // TODO(i18n) skip translation for now
90+
return zulipLocalizations.actionSheetOptionAddReaction;
9191
}
9292

9393
@override get onPressed => (BuildContext context) async {
@@ -135,8 +135,9 @@ class AddReactionButton extends MessageActionSheetMenuItemButton {
135135
default:
136136
}
137137

138+
final zulipLocalizations = ZulipLocalizations.of(messageListContext);
138139
await showErrorDialog(context: emojiPickerContext,
139-
title: 'Adding reaction failed', message: errorMessage);
140+
title: zulipLocalizations.errorAddingReactionFailed, message: errorMessage);
140141
}
141142
}));
142143
});

0 commit comments

Comments
 (0)