From 58a6d0a33fe74f4a9655866a5991df4cd2f15c3c Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Mon, 20 Apr 2026 18:22:47 +0200 Subject: [PATCH] fix invite users confirmation sheet strings --- .../en-US.lproj/Localizable.strings | 8 ++++ .../en.lproj/Localizable.strings | 8 ++++ .../en.lproj/Localizable.stringsdict | 48 +++++++------------ ElementX/Sources/Generated/Strings.swift | 30 ++++++++---- .../InviteUsersConfirmationSheetView.swift | 4 +- ...firmationSheetView.Default-iPad-pseudo.png | 4 +- ...rmationSheetView.Default-iPhone-pseudo.png | 4 +- 7 files changed, 60 insertions(+), 46 deletions(-) diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index 693c99fce..61ffc3d08 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -552,6 +552,10 @@ "screen_advanced_settings_hide_invite_avatars_toggle_title" = "Hide avatars in room invite requests"; "screen_advanced_settings_hide_timeline_media_toggle_title" = "Hide media previews in timeline"; "screen_advanced_settings_labs" = "Labs"; +"screen_advanced_settings_live_location_section_description" = "The distance you have to move to trigger an update."; +"screen_advanced_settings_live_location_section_footer" = "Make sure \"Precise Location” is enabled for this app. To change the permission go to %1$@."; +"screen_advanced_settings_live_location_section_footer_link" = "App Settings"; +"screen_advanced_settings_live_location_section_title" = "Live location updates"; "screen_advanced_settings_media_compression_description" = "Upload photos and videos faster and reduce data usage"; "screen_advanced_settings_media_compression_title" = "Optimize media quality"; "screen_advanced_settings_moderation_and_safety_section_title" = "Moderation and Safety"; @@ -792,6 +796,10 @@ "screen_identity_waiting_on_other_device" = "Waiting on other device…"; "screen_invite_users_already_a_member" = "Already a member"; "screen_invite_users_already_invited" = "Already invited"; +"screen_invite_users_confirm_dialog_subtitle_multiple_users" = "You currently don’t have any chats with these contacts. Confirm inviting them to this room before continuing."; +"screen_invite_users_confirm_dialog_subtitle_one_user" = "You currently don’t have any chats with this contact. Confirm inviting them to this room before continuing."; +"screen_invite_users_confirm_dialog_title_mutiple_users" = "Invite new contacts to this room?"; +"screen_invite_users_confirm_dialog_title_one_user" = "Invite new contact to this room?"; "screen_invites_decline_chat_message" = "Are you sure you want to decline the invitation to join %1$@?"; "screen_invites_decline_chat_title" = "Decline invite"; "screen_invites_decline_direct_chat_message" = "Are you sure you want to decline this private chat with %1$@?"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 93fd03ccb..2be48d6ab 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -552,6 +552,10 @@ "screen_advanced_settings_hide_invite_avatars_toggle_title" = "Hide avatars in room invite requests"; "screen_advanced_settings_hide_timeline_media_toggle_title" = "Hide media previews in timeline"; "screen_advanced_settings_labs" = "Labs"; +"screen_advanced_settings_live_location_section_description" = "The distance you have to move to trigger an update."; +"screen_advanced_settings_live_location_section_footer" = "Make sure \"Precise Location” is enabled for this app. To change the permission go to %1$@."; +"screen_advanced_settings_live_location_section_footer_link" = "App Settings"; +"screen_advanced_settings_live_location_section_title" = "Live location updates"; "screen_advanced_settings_media_compression_description" = "Upload photos and videos faster and reduce data usage"; "screen_advanced_settings_media_compression_title" = "Optimise media quality"; "screen_advanced_settings_moderation_and_safety_section_title" = "Moderation and Safety"; @@ -792,6 +796,10 @@ "screen_identity_waiting_on_other_device" = "Waiting on other device…"; "screen_invite_users_already_a_member" = "Already a member"; "screen_invite_users_already_invited" = "Already invited"; +"screen_invite_users_confirm_dialog_subtitle_multiple_users" = "You currently don’t have any chats with these contacts. Confirm inviting them to this room before continuing."; +"screen_invite_users_confirm_dialog_subtitle_one_user" = "You currently don’t have any chats with this contact. Confirm inviting them to this room before continuing."; +"screen_invite_users_confirm_dialog_title_mutiple_users" = "Invite new contacts to this room?"; +"screen_invite_users_confirm_dialog_title_one_user" = "Invite new contact to this room?"; "screen_invites_decline_chat_message" = "Are you sure you want to decline the invitation to join %1$@?"; "screen_invites_decline_chat_title" = "Decline invite"; "screen_invites_decline_direct_chat_message" = "Are you sure you want to decline this private chat with %1$@?"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict b/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict index 855ce9151..557d0ff11 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict @@ -274,6 +274,22 @@ NSStringLocalizedFormatKey %#@COUNT@ + screen_advanced_settings_live_location_update_distance + + COUNT + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %1$d meter + other + %1$d meters + + NSStringLocalizedFormatKey + %#@COUNT@ + screen_app_lock_subtitle COUNT @@ -306,38 +322,6 @@ NSStringLocalizedFormatKey %#@COUNT@ - screen_invite_users_confirm_dialog_subtitle - - COUNT - - NSStringFormatSpecTypeKey - NSStringPluralRuleType - NSStringFormatValueTypeKey - d - one - You currently don’t have any chats with this contact. Confirm inviting them to this room before continuing. - other - You currently don’t have any chats with these contacts. Confirm inviting them to this room before continuing. - - NSStringLocalizedFormatKey - %#@COUNT@ - - screen_invite_users_confirm_dialog_title - - COUNT - - NSStringFormatSpecTypeKey - NSStringPluralRuleType - NSStringFormatValueTypeKey - d - one - Invite a new contact to this room? - other - Invite new contacts to this room? - - NSStringLocalizedFormatKey - %#@COUNT@ - screen_leave_space_submit COUNT diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index 5b4063278..fbfb7dd5b 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -1290,6 +1290,20 @@ internal enum L10n { internal static var screenAdvancedSettingsHideTimelineMediaToggleTitle: String { return L10n.tr("Localizable", "screen_advanced_settings_hide_timeline_media_toggle_title") } /// Labs internal static var screenAdvancedSettingsLabs: String { return L10n.tr("Localizable", "screen_advanced_settings_labs") } + /// The distance you have to move to trigger an update. + internal static var screenAdvancedSettingsLiveLocationSectionDescription: String { return L10n.tr("Localizable", "screen_advanced_settings_live_location_section_description") } + /// Make sure "Precise Location” is enabled for this app. To change the permission go to %1$@. + internal static func screenAdvancedSettingsLiveLocationSectionFooter(_ p1: Any) -> String { + return L10n.tr("Localizable", "screen_advanced_settings_live_location_section_footer", String(describing: p1)) + } + /// App Settings + internal static var screenAdvancedSettingsLiveLocationSectionFooterLink: String { return L10n.tr("Localizable", "screen_advanced_settings_live_location_section_footer_link") } + /// Live location updates + internal static var screenAdvancedSettingsLiveLocationSectionTitle: String { return L10n.tr("Localizable", "screen_advanced_settings_live_location_section_title") } + /// Plural format key: "%#@COUNT@" + internal static func screenAdvancedSettingsLiveLocationUpdateDistance(_ p1: Int) -> String { + return L10n.tr("Localizable", "screen_advanced_settings_live_location_update_distance", p1) + } /// Upload photos and videos faster and reduce data usage internal static var screenAdvancedSettingsMediaCompressionDescription: String { return L10n.tr("Localizable", "screen_advanced_settings_media_compression_description") } /// Optimise media quality @@ -1840,14 +1854,14 @@ internal enum L10n { internal static var screenInviteUsersAlreadyAMember: String { return L10n.tr("Localizable", "screen_invite_users_already_a_member") } /// Already invited internal static var screenInviteUsersAlreadyInvited: String { return L10n.tr("Localizable", "screen_invite_users_already_invited") } - /// Plural format key: "%#@COUNT@" - internal static func screenInviteUsersConfirmDialogSubtitle(_ p1: Int) -> String { - return L10n.tr("Localizable", "screen_invite_users_confirm_dialog_subtitle", p1) - } - /// Plural format key: "%#@COUNT@" - internal static func screenInviteUsersConfirmDialogTitle(_ p1: Int) -> String { - return L10n.tr("Localizable", "screen_invite_users_confirm_dialog_title", p1) - } + /// You currently don’t have any chats with these contacts. Confirm inviting them to this room before continuing. + internal static var screenInviteUsersConfirmDialogSubtitleMultipleUsers: String { return L10n.tr("Localizable", "screen_invite_users_confirm_dialog_subtitle_multiple_users") } + /// You currently don’t have any chats with this contact. Confirm inviting them to this room before continuing. + internal static var screenInviteUsersConfirmDialogSubtitleOneUser: String { return L10n.tr("Localizable", "screen_invite_users_confirm_dialog_subtitle_one_user") } + /// Invite new contacts to this room? + internal static var screenInviteUsersConfirmDialogTitleMutipleUsers: String { return L10n.tr("Localizable", "screen_invite_users_confirm_dialog_title_mutiple_users") } + /// Invite new contact to this room? + internal static var screenInviteUsersConfirmDialogTitleOneUser: String { return L10n.tr("Localizable", "screen_invite_users_confirm_dialog_title_one_user") } /// Are you sure you want to decline the invitation to join %1$@? internal static func screenInvitesDeclineChatMessage(_ p1: Any) -> String { return L10n.tr("Localizable", "screen_invites_decline_chat_message", String(describing: p1)) diff --git a/ElementX/Sources/Screens/InviteUsersScreen/View/InviteUsersConfirmationSheetView.swift b/ElementX/Sources/Screens/InviteUsersScreen/View/InviteUsersConfirmationSheetView.swift index 035556989..9c8d4c7f3 100644 --- a/ElementX/Sources/Screens/InviteUsersScreen/View/InviteUsersConfirmationSheetView.swift +++ b/ElementX/Sources/Screens/InviteUsersScreen/View/InviteUsersConfirmationSheetView.swift @@ -17,8 +17,8 @@ struct InviteUsersConfirmationSheetView: View { var body: some View { FullscreenDialog(topPadding: 24, horizontalPadding: 24) { VStack(spacing: 32) { - TitleAndIcon(title: L10n.screenInviteUsersConfirmDialogTitle(users.count), - subtitle: L10n.screenInviteUsersConfirmDialogSubtitle(users.count), + TitleAndIcon(title: users.count == 1 ? L10n.screenInviteUsersConfirmDialogTitleOneUser : L10n.screenInviteUsersConfirmDialogTitleMutipleUsers, + subtitle: users.count == 1 ? L10n.screenInviteUsersConfirmDialogSubtitleOneUser : L10n.screenInviteUsersConfirmDialogSubtitleMultipleUsers, icon: \.userAddSolid, iconStyle: .defaultSolid) VStack(spacing: 0) { diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/inviteUsersConfirmationSheetView.Default-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/inviteUsersConfirmationSheetView.Default-iPad-pseudo.png index 048bd50f9..af5a43d8a 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/inviteUsersConfirmationSheetView.Default-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/inviteUsersConfirmationSheetView.Default-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:721df019a382cf62818b14317f42249f30dec519eef4b3dc1dd6f2bd8ca4ef5b -size 145044 +oid sha256:97ff77a841362668932f996a49e63a79d554fa1dfb797acd983ca10272c9ddaa +size 176184 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/inviteUsersConfirmationSheetView.Default-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/inviteUsersConfirmationSheetView.Default-iPhone-pseudo.png index 2943ac414..6f27c37cf 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/inviteUsersConfirmationSheetView.Default-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/inviteUsersConfirmationSheetView.Default-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:81544159a52ea76b06e0b8cb83cdd388d4a86080103a8344945303926296eac7 -size 96517 +oid sha256:f764300538d50d7e17c98ece6e77f83a5463ea7c96826bb9eba60eac47227492 +size 128839