From 46ebec97e25a7aca3c15131547b0f44f5b16fccd Mon Sep 17 00:00:00 2001 From: Airyzz <36567925+Airyzz@users.noreply.github.com> Date: Sat, 6 Jul 2024 13:17:51 +0930 Subject: [PATCH] extract string for translation (#308) --- commet/assets/l10n/intl_en.arb | 166 +++++++++++------- .../space_summary/space_summary_view.dart | 6 +- 2 files changed, 111 insertions(+), 61 deletions(-) diff --git a/commet/assets/l10n/intl_en.arb b/commet/assets/l10n/intl_en.arb index 2fd3d351..43facd4e 100644 --- a/commet/assets/l10n/intl_en.arb +++ b/commet/assets/l10n/intl_en.arb @@ -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": {} }, @@ -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", @@ -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": {} }, @@ -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": { @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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/", @@ -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", @@ -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", diff --git a/commet/lib/ui/organisms/space_summary/space_summary_view.dart b/commet/lib/ui/organisms/space_summary/space_summary_view.dart index 1a3c565d..cc580bc9 100644 --- a/commet/lib/ui/organisms/space_summary/space_summary_view.dart +++ b/commet/lib/ui/organisms/space_summary/space_summary_view.dart @@ -93,6 +93,10 @@ class SpaceSummaryViewState extends State { 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", @@ -249,7 +253,7 @@ class SpaceSummaryViewState extends State { Widget buildSpaceList() { return Panel( - header: "Spaces", + header: labelSpaceSubspacesList, mode: TileType.surfaceContainer, child: Column( crossAxisAlignment: CrossAxisAlignment.end,