Skip to content

Commit

Permalink
extract string for translation (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
Airyzz authored Jul 6, 2024
1 parent 6ba731b commit 46ebec9
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 61 deletions.
166 changes: 106 additions & 60 deletions commet/assets/l10n/intl_en.arb
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
{
"@@last_modified": "2024-05-02T14:25:58.366145",
"@@last_modified": "2024-07-06T13:01:41.301375",
"labelRoomsList": "Rooms",
"@labelRoomsList": {
"description": "Header label for the list of rooms",
"type": "text",
"placeholders": {}
},
"fileDragDropPrompt": "Drop a file to upload...",
"@fileDragDropPrompt": {
"description": "Text that is shown when a user is dragging a file",
"type": "text",
"placeholders": {}
},
"labelRoomsList": "Rooms",
"@labelRoomsList": {
"description": "Header label for the list of rooms",
"typingUsers": "{howMany,plural, =1{{user1} is typing...}=2{{user1} and {user2} are typing...}few{{user1}, {user2}, and {user3} are typing...}other{Several people are typing...}}",
"@typingUsers": {
"description": "Text to display which users are currently typing",
"type": "text",
"placeholders": {
"howMany": {},
"user1": {},
"user2": {},
"user3": {}
}
},
"messageEditedMarker": "(Edited)",
"@messageEditedMarker": {
"description": "Short text to mark that a message has been edited",
"type": "text",
"placeholders": {}
},
Expand All @@ -20,12 +37,6 @@
"user": {}
}
},
"messageFailedToDecrypt": "Failed to decrypt event",
"@messageFailedToDecrypt": {
"description": "Placeholde text for when a message fails to decrypt",
"type": "text",
"placeholders": {}
},
"messagePlaceholderUserCreatedRoom": "{user} created the room!",
"@messagePlaceholderUserCreatedRoom": {
"description": "Message body for when a user created the room",
Expand Down Expand Up @@ -98,9 +109,9 @@
"type": "text",
"placeholders": {}
},
"labelHomeInvitationBody": "Invited you to a room",
"@labelHomeInvitationBody": {
"description": "Displays a short description explaining that an invitation to a room was received. Does not need to contain the name of the room or inviter",
"messageFailedToDecrypt": "Failed to decrypt event",
"@messageFailedToDecrypt": {
"description": "Placeholde text for when a message fails to decrypt",
"type": "text",
"placeholders": {}
},
Expand All @@ -110,11 +121,13 @@
"type": "text",
"placeholders": {}
},
"messageEditedMarker": "(Edited)",
"@messageEditedMarker": {
"description": "Short text to mark that a message has been edited",
"labelInvitationBodyWithSender": "{user} invited you to a room",
"@labelInvitationBodyWithSender": {
"description": "Message body for when an invitation was received, and we have a name for the sender",
"type": "text",
"placeholders": {}
"placeholders": {
"user": {}
}
},
"labelEmojiPickerEmojiTab": "Emoji",
"@labelEmojiPickerEmojiTab": {
Expand All @@ -134,17 +147,20 @@
"type": "text",
"placeholders": {}
},
"typingUsers": "{howMany,plural, =1{{user1} is typing...}=2{{user1} and {user2} are typing...}few{{user1}, {user2}, and {user3} are typing...}other{Several people are typing...}}",
"@typingUsers": {
"description": "Text to display which users are currently typing",
"labelInvitationsForUser": "Invitations for {user}",
"@labelInvitationsForUser": {
"description": "Label for the list of incoming invitations, specifying which user these invitations are intended for",
"type": "text",
"placeholders": {
"howMany": {},
"user1": {},
"user2": {},
"user3": {}
"user": {}
}
},
"labelInvitations": "Invitations",
"@labelInvitations": {
"description": "Label for the list of incoming invitations",
"type": "text",
"placeholders": {}
},
"sendEncryptedMessagePrompt": "Send an encrypted message",
"@sendEncryptedMessagePrompt": {
"description": "Placeholder text for message input in an encrypted room",
Expand Down Expand Up @@ -175,6 +191,18 @@
"type": "text",
"placeholders": {}
},
"promptAttachmentProcessingSendOriginal": "Send Original",
"@promptAttachmentProcessingSendOriginal": {
"description": "Prompt text for the option to send a file in its original state, without any further processing such as removing metadata",
"type": "text",
"placeholders": {}
},
"labelImageContainsLocationInfo": "Warning: This image contains location metadata",
"@labelImageContainsLocationInfo": {
"description": "Prompt text for the option to send a file in its original state, without any further processing such as removing metadata",
"type": "text",
"placeholders": {}
},
"labelHomeRecentActivity": "Recent Activity",
"@labelHomeRecentActivity": {
"description": "Short label for header of recent room activity",
Expand All @@ -199,12 +227,6 @@
"type": "text",
"placeholders": {}
},
"promptAddSpace": "Add Space",
"@promptAddSpace": {
"description": "Prompt to add a new space",
"type": "text",
"placeholders": {}
},
"tooltipSpaceSettings": "Space settings",
"@tooltipSpaceSettings": {
"description": "Tooltip for the button that opens space settings",
Expand All @@ -223,6 +245,12 @@
"type": "text",
"placeholders": {}
},
"labelSpaceSubspacesList": "Spaces",
"@labelSpaceSubspacesList": {
"description": "Header label for the list of child spaces in a space",
"type": "text",
"placeholders": {}
},
"labelSpaceAvailableRoomsList": "Available rooms",
"@labelSpaceAvailableRoomsList": {
"description": "Header label for the list of rooms in a space, which the user has not yet joined but are available",
Expand Down Expand Up @@ -255,6 +283,12 @@
"type": "text",
"placeholders": {}
},
"promptAddSpace": "Add Space",
"@promptAddSpace": {
"description": "Prompt to add a new space",
"type": "text",
"placeholders": {}
},
"directMessagesListHeaderMobile": "Direct Messages",
"@directMessagesListHeaderMobile": {
"description": "The header for the direct messages list on desktop",
Expand Down Expand Up @@ -381,6 +415,12 @@
"type": "text",
"placeholders": {}
},
"promptImportPack": "Import pack",
"@promptImportPack": {
"description": "Prompt to import a set of emoticons from an existing pack",
"type": "text",
"placeholders": {}
},
"promptConfirmDeleteEmoticonPack": "Are you sure you want to delete the **{packName}** pack?",
"@promptConfirmDeleteEmoticonPack": {
"description": "Prompt to confirm deletion of an emoticon pack, supports markdown to emphasise the pack name",
Expand Down Expand Up @@ -955,36 +995,6 @@
"type": "text",
"placeholders": {}
},
"labelSettingsAppTheme": "Theme",
"@labelSettingsAppTheme": {
"description": "Label for theme section of app appearance",
"type": "text",
"placeholders": {}
},
"labelThemeDark": "Dark Theme",
"@labelThemeDark": {
"description": "Label for the dark theme",
"type": "text",
"placeholders": {}
},
"labelThemeLight": "Light Theme",
"@labelThemeLight": {
"description": "Label for the light theme",
"type": "text",
"placeholders": {}
},
"labelThemeAmoled": "Amoled",
"@labelThemeAmoled": {
"description": "Label for the light theme",
"type": "text",
"placeholders": {}
},
"labelAppScale": "App Scale",
"@labelAppScale": {
"description": "Label for the setting which controls the UI scale of the overall app",
"type": "text",
"placeholders": {}
},
"labelSettingsCategoryApp": "App Settings",
"@labelSettingsCategoryApp": {
"description": "Label for the settings category of the overall App settings/",
Expand Down Expand Up @@ -1067,6 +1077,36 @@
"type": "text",
"placeholders": {}
},
"labelSettingsAppTheme": "Theme",
"@labelSettingsAppTheme": {
"description": "Label for theme section of app appearance",
"type": "text",
"placeholders": {}
},
"labelAppScale": "App Scale",
"@labelAppScale": {
"description": "Label for the setting which controls the UI scale of the overall app",
"type": "text",
"placeholders": {}
},
"labelThemeDark": "Dark Theme",
"@labelThemeDark": {
"description": "Label for the dark theme",
"type": "text",
"placeholders": {}
},
"labelThemeLight": "Light Theme",
"@labelThemeLight": {
"description": "Label for the light theme",
"type": "text",
"placeholders": {}
},
"labelThemeAmoled": "Amoled",
"@labelThemeAmoled": {
"description": "Label for the light theme",
"type": "text",
"placeholders": {}
},
"notificationSettingsNotSupported": "Push notifications are not supported on this system",
"@notificationSettingsNotSupported": {
"description": "Message to display when push notifications are not supported",
Expand Down Expand Up @@ -1415,6 +1455,12 @@
"type": "text",
"placeholders": {}
},
"promptDownload": "Download",
"@promptDownload": {
"description": "Generic prompt to download something",
"type": "text",
"placeholders": {}
},
"promptJoin": "Join",
"@promptJoin": {
"description": "Generic prompt to join a room",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ class SpaceSummaryViewState extends State<SpaceSummaryView> {
desc: "Header label for the list of rooms in a space",
name: "labelSpaceRoomsList");

String get labelSpaceSubspacesList => Intl.message("Spaces",
desc: "Header label for the list of child spaces in a space",
name: "labelSpaceSubspacesList");

String get labelSpaceAvailableRoomsList => Intl.message("Available rooms",
desc:
"Header label for the list of rooms in a space, which the user has not yet joined but are available",
Expand Down Expand Up @@ -249,7 +253,7 @@ class SpaceSummaryViewState extends State<SpaceSummaryView> {

Widget buildSpaceList() {
return Panel(
header: "Spaces",
header: labelSpaceSubspacesList,
mode: TileType.surfaceContainer,
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
Expand Down

0 comments on commit 46ebec9

Please sign in to comment.