From 9f92e181b0e2ffdc23c886a92b4f4c17648bd62f Mon Sep 17 00:00:00 2001 From: amshak <85162587+amshakal@users.noreply.github.com> Date: Mon, 22 Jun 2026 11:23:37 +0100 Subject: [PATCH] Added a chevron to collapsed call buttons in the DM (#5755) * Added a chevron to collapsed call buttons in the DM This makes the context menu more intuitive and easy to find. Inspired by the collapsed state of call buttons in Whatsapp that I saw recently * Shortening video/voice call button strings Currently the text is unnecessarily long, I have reduced to button text # Conflicts: # ElementX/Sources/Generated/Strings+Untranslated.swift * Move translations to localazy --------- Co-authored-by: Stefan Ceriu --- .../en-US.lproj/Localizable.strings | 4 +++- .../Localizations/en.lproj/Localizable.strings | 4 +++- .../en.lproj/Localizable.stringsdict | 16 ++++++++++++++++ ElementX/Sources/Generated/Strings.swift | 10 +++++++++- .../View/RoomCallControlsToolbar.swift | 9 ++++++--- 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index db7613125..c778631d4 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -186,9 +186,11 @@ "action_translate" = "Translate"; "action_try_again" = "Try again"; "action_unpin" = "Unpin"; +"action_video_call" = "Video call"; "action_view" = "View"; "action_view_in_timeline" = "View in timeline"; "action_view_source" = "View source"; +"action_voice_call" = "Voice call"; "action_yes" = "Yes"; "action_yes_try_again" = "Yes, try again"; "banner_migrate_to_native_sliding_sync_action" = "Log Out & Upgrade"; @@ -1058,7 +1060,7 @@ "screen_notification_settings_sound_system_calypso_ios" = "Calypso"; "screen_notification_settings_sound_system_chime_ios" = "Chime"; "screen_notification_settings_sound_system_choo_choo_ios" = "Choo Choo"; -"screen_notification_settings_sound_system_default_ios" = "System Default"; +"screen_notification_settings_sound_system_default" = "System Default"; "screen_notification_settings_sound_system_descent_ios" = "Descent"; "screen_notification_settings_sound_system_electronic_ios" = "Electronic"; "screen_notification_settings_sound_system_fanfare_ios" = "Fanfare"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 68780434f..2507c9324 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -186,9 +186,11 @@ "action_translate" = "Translate"; "action_try_again" = "Try again"; "action_unpin" = "Unpin"; +"action_video_call" = "Video call"; "action_view" = "View"; "action_view_in_timeline" = "View in timeline"; "action_view_source" = "View source"; +"action_voice_call" = "Voice call"; "action_yes" = "Yes"; "action_yes_try_again" = "Yes, try again"; "banner_migrate_to_native_sliding_sync_action" = "Log Out & Upgrade"; @@ -1058,7 +1060,7 @@ "screen_notification_settings_sound_system_calypso_ios" = "Calypso"; "screen_notification_settings_sound_system_chime_ios" = "Chime"; "screen_notification_settings_sound_system_choo_choo_ios" = "Choo Choo"; -"screen_notification_settings_sound_system_default_ios" = "System Default"; +"screen_notification_settings_sound_system_default" = "System Default"; "screen_notification_settings_sound_system_descent_ios" = "Descent"; "screen_notification_settings_sound_system_electronic_ios" = "Electronic"; "screen_notification_settings_sound_system_fanfare_ios" = "Fanfare"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict b/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict index 342a6ab4c..3c2c9a6e1 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict @@ -562,6 +562,22 @@ NSStringLocalizedFormatKey %#@COUNT@ + screen_timeline_active_call_extra_joined_count + + COUNT + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + + %1$d joined + other + + %1$d joined + + NSStringLocalizedFormatKey + %#@COUNT@ + troubleshoot_notifications_test_blocked_users_result_some COUNT diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index 29dbfb2cc..07b88906b 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -408,12 +408,16 @@ internal nonisolated enum L10n { internal static var actionTryAgain: String { return L10n.tr("Localizable", "action_try_again") } /// Unpin internal static var actionUnpin: String { return L10n.tr("Localizable", "action_unpin") } + /// Video call + internal static var actionVideoCall: String { return L10n.tr("Localizable", "action_video_call") } /// View internal static var actionView: String { return L10n.tr("Localizable", "action_view") } /// View in timeline internal static var actionViewInTimeline: String { return L10n.tr("Localizable", "action_view_in_timeline") } /// View source internal static var actionViewSource: String { return L10n.tr("Localizable", "action_view_source") } + /// Voice call + internal static var actionVoiceCall: String { return L10n.tr("Localizable", "action_voice_call") } /// Yes internal static var actionYes: String { return L10n.tr("Localizable", "action_yes") } /// Yes, try again @@ -2455,7 +2459,7 @@ internal nonisolated enum L10n { /// Choo Choo internal static var screenNotificationSettingsSoundSystemChooChooIos: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_choo_choo_ios") } /// System Default - internal static var screenNotificationSettingsSoundSystemDefaultIos: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_default_ios") } + internal static var screenNotificationSettingsSoundSystemDefault: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_default") } /// Descent internal static var screenNotificationSettingsSoundSystemDescentIos: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_descent_ios") } /// Electronic @@ -3557,6 +3561,10 @@ internal nonisolated enum L10n { } /// On the map internal static var screenStaticLocationSheetTitle: String { return L10n.tr("Localizable", "screen_static_location_sheet_title") } + /// Plural format key: "%#@COUNT@" + internal static func screenTimelineActiveCallExtraJoinedCount(_ p1: Int) -> String { + return L10n.tr("Localizable", "screen_timeline_active_call_extra_joined_count", p1) + } /// Message not sent because %1$@’s verified digital identity was reset. internal static func screenTimelineItemMenuSendFailureChangedIdentity(_ p1: Any) -> String { return L10n.tr("Localizable", "screen_timeline_item_menu_send_failure_changed_identity", String(describing: p1)) diff --git a/ElementX/Sources/Screens/RoomScreen/View/RoomCallControlsToolbar.swift b/ElementX/Sources/Screens/RoomScreen/View/RoomCallControlsToolbar.swift index a896a1303..98d0e3131 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/RoomCallControlsToolbar.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/RoomCallControlsToolbar.swift @@ -31,16 +31,19 @@ struct RoomCallControlsToolbar: ToolbarContent { Button { onCallTap(true) } label: { - Label(L10n.a11yStartVoiceCall, icon: \.voiceCallSolid) + Label(L10n.actionVoiceCall, icon: \.voiceCallSolid) } Button { onCallTap(false) } label: { - Label(L10n.a11yStartVideoCall, icon: \.videoCallSolid) + Label(L10n.actionVideoCall, icon: \.videoCallSolid) } } label: { - CompoundIcon(\.voiceCallSolid) + HStack(spacing: 2) { + CompoundIcon(\.voiceCallSolid) + CompoundIcon(\.chevronDown, size: .xSmall, relativeTo: .compound.bodyLG) + } } .accessibilityLabel(L10n.a11yStartCall) .disabled(!viewState.canJoinCall)