diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index 033ad7e87..6b4794a66 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -994,6 +994,40 @@ "screen_notification_settings_mode_mentions" = "Mentions"; "screen_notification_settings_notification_section_title" = "Notify me for"; "screen_notification_settings_room_mention_label" = "Notify me on @room"; +"screen_notification_settings_sound_custom_sound_button_title" = "Custom sound..."; +"screen_notification_settings_sound_delete_sound_error_title" = "Error deleting file"; +"screen_notification_settings_sound_element_default" = "Element Default"; +"screen_notification_settings_sound_element_fade" = "Element Fade"; +"screen_notification_settings_sound_import_sound_error_title" = "Error importing file"; +"screen_notification_settings_sound_preview_sound_error_title" = "Problem previewing alert sound"; +"screen_notification_settings_sound_section_title" = "Sound"; +"screen_notification_settings_sound_set_sound_error_title" = "Problem setting alert sound"; +"screen_notification_settings_sound_system_alert" = "Alert"; +"screen_notification_settings_sound_system_anticipate" = "Anticipate"; +"screen_notification_settings_sound_system_bell" = "Bell"; +"screen_notification_settings_sound_system_bloom" = "Bloom"; +"screen_notification_settings_sound_system_calypso" = "Calypso"; +"screen_notification_settings_sound_system_chime" = "Chime"; +"screen_notification_settings_sound_system_choo_choo" = "Choo Choo"; +"screen_notification_settings_sound_system_descent" = "Descent"; +"screen_notification_settings_sound_system_electronic" = "Electronic"; +"screen_notification_settings_sound_system_fanfare" = "Fanfare"; +"screen_notification_settings_sound_system_glass" = "Glass"; +"screen_notification_settings_sound_system_horn" = "Horn"; +"screen_notification_settings_sound_system_ladder" = "Ladder"; +"screen_notification_settings_sound_system_minuet" = "Minuet"; +"screen_notification_settings_sound_system_news_flash" = "News Flash"; +"screen_notification_settings_sound_system_noir" = "Noir"; +"screen_notification_settings_sound_system_sherwood_forest" = "Sherwood Forest"; +"screen_notification_settings_sound_system_spell" = "Spell"; +"screen_notification_settings_sound_system_suspense" = "Suspense"; +"screen_notification_settings_sound_system_swish" = "Swish"; +"screen_notification_settings_sound_system_telegraph" = "Telegraph"; +"screen_notification_settings_sound_system_tiptoes" = "Tiptoes"; +"screen_notification_settings_sound_system_tri_tone" = "Tri-tone"; +"screen_notification_settings_sound_system_tweet" = "Tweet"; +"screen_notification_settings_sound_system_typewriters" = "Typewriters"; +"screen_notification_settings_sound_system_update" = "Update"; "screen_notification_settings_system_notifications_action_required" = "To receive notifications, please change your %1$@."; "screen_notification_settings_system_notifications_action_required_content_link" = "system settings"; "screen_notification_settings_system_notifications_turned_off" = "System notifications turned off"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index eda890974..11b554d1a 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -994,6 +994,40 @@ "screen_notification_settings_mode_mentions" = "Mentions"; "screen_notification_settings_notification_section_title" = "Notify me for"; "screen_notification_settings_room_mention_label" = "Notify me on @room"; +"screen_notification_settings_sound_custom_sound_button_title" = "Custom sound..."; +"screen_notification_settings_sound_delete_sound_error_title" = "Error deleting file"; +"screen_notification_settings_sound_element_default" = "Element Default"; +"screen_notification_settings_sound_element_fade" = "Element Fade"; +"screen_notification_settings_sound_import_sound_error_title" = "Error importing file"; +"screen_notification_settings_sound_preview_sound_error_title" = "Problem previewing alert sound"; +"screen_notification_settings_sound_section_title" = "Sound"; +"screen_notification_settings_sound_set_sound_error_title" = "Problem setting alert sound"; +"screen_notification_settings_sound_system_alert" = "Alert"; +"screen_notification_settings_sound_system_anticipate" = "Anticipate"; +"screen_notification_settings_sound_system_bell" = "Bell"; +"screen_notification_settings_sound_system_bloom" = "Bloom"; +"screen_notification_settings_sound_system_calypso" = "Calypso"; +"screen_notification_settings_sound_system_chime" = "Chime"; +"screen_notification_settings_sound_system_choo_choo" = "Choo Choo"; +"screen_notification_settings_sound_system_descent" = "Descent"; +"screen_notification_settings_sound_system_electronic" = "Electronic"; +"screen_notification_settings_sound_system_fanfare" = "Fanfare"; +"screen_notification_settings_sound_system_glass" = "Glass"; +"screen_notification_settings_sound_system_horn" = "Horn"; +"screen_notification_settings_sound_system_ladder" = "Ladder"; +"screen_notification_settings_sound_system_minuet" = "Minuet"; +"screen_notification_settings_sound_system_news_flash" = "News Flash"; +"screen_notification_settings_sound_system_noir" = "Noir"; +"screen_notification_settings_sound_system_sherwood_forest" = "Sherwood Forest"; +"screen_notification_settings_sound_system_spell" = "Spell"; +"screen_notification_settings_sound_system_suspense" = "Suspense"; +"screen_notification_settings_sound_system_swish" = "Swish"; +"screen_notification_settings_sound_system_telegraph" = "Telegraph"; +"screen_notification_settings_sound_system_tiptoes" = "Tiptoes"; +"screen_notification_settings_sound_system_tri_tone" = "Tri-tone"; +"screen_notification_settings_sound_system_tweet" = "Tweet"; +"screen_notification_settings_sound_system_typewriters" = "Typewriters"; +"screen_notification_settings_sound_system_update" = "Update"; "screen_notification_settings_system_notifications_action_required" = "To receive notifications, please change your %1$@."; "screen_notification_settings_system_notifications_action_required_content_link" = "system settings"; "screen_notification_settings_system_notifications_turned_off" = "System notifications turned off"; diff --git a/ElementX/Resources/Localizations/en.lproj/Untranslated.strings b/ElementX/Resources/Localizations/en.lproj/Untranslated.strings index 49cb10197..450402793 100644 --- a/ElementX/Resources/Localizations/en.lproj/Untranslated.strings +++ b/ElementX/Resources/Localizations/en.lproj/Untranslated.strings @@ -7,37 +7,3 @@ "soft_logout_signin_notice" = "Your homeserver (%1$s) admin has signed you out of your account %2$s (%3$s)."; "soft_logout_signin_title" = "Sign in"; "untranslated" = "Untranslated"; -"screen_notification_settings_sound_system_tri_tone" = "Tri-tone"; -"screen_notification_settings_sound_system_chime" = "Chime"; -"screen_notification_settings_sound_system_glass" = "Glass"; -"screen_notification_settings_sound_system_horn" = "Horn"; -"screen_notification_settings_sound_system_bell" = "Bell"; -"screen_notification_settings_sound_system_electronic" = "Electronic"; -"screen_notification_settings_sound_system_alert" = "Alert"; -"screen_notification_settings_sound_system_bloom" = "Bloom"; -"screen_notification_settings_sound_system_calypso" = "Calypso"; -"screen_notification_settings_sound_system_anticipate" = "Anticipate"; -"screen_notification_settings_sound_system_choo_choo" = "Choo Choo"; -"screen_notification_settings_sound_system_descent" = "Descent"; -"screen_notification_settings_sound_system_fanfare" = "Fanfare"; -"screen_notification_settings_sound_system_ladder" = "Ladder"; -"screen_notification_settings_sound_system_minuet" = "Minuet"; -"screen_notification_settings_sound_system_news_flash" = "News Flash"; -"screen_notification_settings_sound_system_noir" = "Noir"; -"screen_notification_settings_sound_system_sherwood_forest" = "Sherwood Forest"; -"screen_notification_settings_sound_system_spell" = "Spell"; -"screen_notification_settings_sound_system_suspense" = "Suspense"; -"screen_notification_settings_sound_system_telegraph" = "Telegraph"; -"screen_notification_settings_sound_system_tiptoes" = "Tiptoes"; -"screen_notification_settings_sound_system_typewriters" = "Typewriters"; -"screen_notification_settings_sound_system_update" = "Update"; -"screen_notification_settings_sound_system_swish" = "Swish"; -"screen_notification_settings_sound_system_tweet" = "Tweet"; -"screen_notification_settings_sound_element_default" = "Element Default"; -"screen_notification_settings_sound_element_fade" = "Element Fade"; -"screen_notification_settings_sound_custom_sound_button_title" = "Custom sound..."; -"screen_notification_settings_sound_section_title" = "Sound"; -"screen_notification_settings_sound_set_sound_error_title" = "Problem setting alert sound"; -"screen_notification_settings_sound_preview_sound_error_title" = "Problem previewing alert sound"; -"screen_notification_settings_sound_import_sound_error_title" = "Error importing file"; -"screen_notification_settings_sound_delete_sound_error_title" = "Error deleting file"; diff --git a/ElementX/Sources/Generated/Strings+Untranslated.swift b/ElementX/Sources/Generated/Strings+Untranslated.swift index bf99e6161..55cfabb3e 100644 --- a/ElementX/Sources/Generated/Strings+Untranslated.swift +++ b/ElementX/Sources/Generated/Strings+Untranslated.swift @@ -10,74 +10,6 @@ import Foundation // swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length // swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces internal enum UntranslatedL10n { - /// Custom sound... - internal static var screenNotificationSettingsSoundCustomSoundButtonTitle: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_custom_sound_button_title") } - /// Error deleting file - internal static var screenNotificationSettingsSoundDeleteSoundErrorTitle: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_delete_sound_error_title") } - /// Element Default - internal static var screenNotificationSettingsSoundElementDefault: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_element_default") } - /// Element Fade - internal static var screenNotificationSettingsSoundElementFade: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_element_fade") } - /// Error importing file - internal static var screenNotificationSettingsSoundImportSoundErrorTitle: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_import_sound_error_title") } - /// Problem previewing alert sound - internal static var screenNotificationSettingsSoundPreviewSoundErrorTitle: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_preview_sound_error_title") } - /// Sound - internal static var screenNotificationSettingsSoundSectionTitle: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_section_title") } - /// Problem setting alert sound - internal static var screenNotificationSettingsSoundSetSoundErrorTitle: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_set_sound_error_title") } - /// Alert - internal static var screenNotificationSettingsSoundSystemAlert: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_alert") } - /// Anticipate - internal static var screenNotificationSettingsSoundSystemAnticipate: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_anticipate") } - /// Bell - internal static var screenNotificationSettingsSoundSystemBell: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_bell") } - /// Bloom - internal static var screenNotificationSettingsSoundSystemBloom: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_bloom") } - /// Calypso - internal static var screenNotificationSettingsSoundSystemCalypso: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_calypso") } - /// Chime - internal static var screenNotificationSettingsSoundSystemChime: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_chime") } - /// Choo Choo - internal static var screenNotificationSettingsSoundSystemChooChoo: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_choo_choo") } - /// Descent - internal static var screenNotificationSettingsSoundSystemDescent: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_descent") } - /// Electronic - internal static var screenNotificationSettingsSoundSystemElectronic: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_electronic") } - /// Fanfare - internal static var screenNotificationSettingsSoundSystemFanfare: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_fanfare") } - /// Glass - internal static var screenNotificationSettingsSoundSystemGlass: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_glass") } - /// Horn - internal static var screenNotificationSettingsSoundSystemHorn: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_horn") } - /// Ladder - internal static var screenNotificationSettingsSoundSystemLadder: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_ladder") } - /// Minuet - internal static var screenNotificationSettingsSoundSystemMinuet: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_minuet") } - /// News Flash - internal static var screenNotificationSettingsSoundSystemNewsFlash: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_news_flash") } - /// Noir - internal static var screenNotificationSettingsSoundSystemNoir: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_noir") } - /// Sherwood Forest - internal static var screenNotificationSettingsSoundSystemSherwoodForest: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_sherwood_forest") } - /// Spell - internal static var screenNotificationSettingsSoundSystemSpell: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_spell") } - /// Suspense - internal static var screenNotificationSettingsSoundSystemSuspense: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_suspense") } - /// Swish - internal static var screenNotificationSettingsSoundSystemSwish: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_swish") } - /// Telegraph - internal static var screenNotificationSettingsSoundSystemTelegraph: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_telegraph") } - /// Tiptoes - internal static var screenNotificationSettingsSoundSystemTiptoes: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_tiptoes") } - /// Tri-tone - internal static var screenNotificationSettingsSoundSystemTriTone: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_tri_tone") } - /// Tweet - internal static var screenNotificationSettingsSoundSystemTweet: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_tweet") } - /// Typewriters - internal static var screenNotificationSettingsSoundSystemTypewriters: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_typewriters") } - /// Update - internal static var screenNotificationSettingsSoundSystemUpdate: String { return UntranslatedL10n.tr("Untranslated", "screen_notification_settings_sound_system_update") } /// Clear all data currently stored on this device? /// Sign in again to access your account data and messages. internal static var softLogoutClearDataDialogContent: String { return UntranslatedL10n.tr("Untranslated", "soft_logout_clear_data_dialog_content") } diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index 56f0e41b7..31d6a91fa 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -2314,6 +2314,74 @@ internal enum L10n { internal static var screenNotificationSettingsNotificationSectionTitle: String { return L10n.tr("Localizable", "screen_notification_settings_notification_section_title") } /// Notify me on @room internal static var screenNotificationSettingsRoomMentionLabel: String { return L10n.tr("Localizable", "screen_notification_settings_room_mention_label") } + /// Custom sound... + internal static var screenNotificationSettingsSoundCustomSoundButtonTitle: String { return L10n.tr("Localizable", "screen_notification_settings_sound_custom_sound_button_title") } + /// Error deleting file + internal static var screenNotificationSettingsSoundDeleteSoundErrorTitle: String { return L10n.tr("Localizable", "screen_notification_settings_sound_delete_sound_error_title") } + /// Element Default + internal static var screenNotificationSettingsSoundElementDefault: String { return L10n.tr("Localizable", "screen_notification_settings_sound_element_default") } + /// Element Fade + internal static var screenNotificationSettingsSoundElementFade: String { return L10n.tr("Localizable", "screen_notification_settings_sound_element_fade") } + /// Error importing file + internal static var screenNotificationSettingsSoundImportSoundErrorTitle: String { return L10n.tr("Localizable", "screen_notification_settings_sound_import_sound_error_title") } + /// Problem previewing alert sound + internal static var screenNotificationSettingsSoundPreviewSoundErrorTitle: String { return L10n.tr("Localizable", "screen_notification_settings_sound_preview_sound_error_title") } + /// Sound + internal static var screenNotificationSettingsSoundSectionTitle: String { return L10n.tr("Localizable", "screen_notification_settings_sound_section_title") } + /// Problem setting alert sound + internal static var screenNotificationSettingsSoundSetSoundErrorTitle: String { return L10n.tr("Localizable", "screen_notification_settings_sound_set_sound_error_title") } + /// Alert + internal static var screenNotificationSettingsSoundSystemAlert: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_alert") } + /// Anticipate + internal static var screenNotificationSettingsSoundSystemAnticipate: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_anticipate") } + /// Bell + internal static var screenNotificationSettingsSoundSystemBell: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_bell") } + /// Bloom + internal static var screenNotificationSettingsSoundSystemBloom: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_bloom") } + /// Calypso + internal static var screenNotificationSettingsSoundSystemCalypso: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_calypso") } + /// Chime + internal static var screenNotificationSettingsSoundSystemChime: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_chime") } + /// Choo Choo + internal static var screenNotificationSettingsSoundSystemChooChoo: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_choo_choo") } + /// Descent + internal static var screenNotificationSettingsSoundSystemDescent: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_descent") } + /// Electronic + internal static var screenNotificationSettingsSoundSystemElectronic: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_electronic") } + /// Fanfare + internal static var screenNotificationSettingsSoundSystemFanfare: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_fanfare") } + /// Glass + internal static var screenNotificationSettingsSoundSystemGlass: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_glass") } + /// Horn + internal static var screenNotificationSettingsSoundSystemHorn: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_horn") } + /// Ladder + internal static var screenNotificationSettingsSoundSystemLadder: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_ladder") } + /// Minuet + internal static var screenNotificationSettingsSoundSystemMinuet: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_minuet") } + /// News Flash + internal static var screenNotificationSettingsSoundSystemNewsFlash: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_news_flash") } + /// Noir + internal static var screenNotificationSettingsSoundSystemNoir: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_noir") } + /// Sherwood Forest + internal static var screenNotificationSettingsSoundSystemSherwoodForest: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_sherwood_forest") } + /// Spell + internal static var screenNotificationSettingsSoundSystemSpell: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_spell") } + /// Suspense + internal static var screenNotificationSettingsSoundSystemSuspense: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_suspense") } + /// Swish + internal static var screenNotificationSettingsSoundSystemSwish: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_swish") } + /// Telegraph + internal static var screenNotificationSettingsSoundSystemTelegraph: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_telegraph") } + /// Tiptoes + internal static var screenNotificationSettingsSoundSystemTiptoes: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_tiptoes") } + /// Tri-tone + internal static var screenNotificationSettingsSoundSystemTriTone: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_tri_tone") } + /// Tweet + internal static var screenNotificationSettingsSoundSystemTweet: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_tweet") } + /// Typewriters + internal static var screenNotificationSettingsSoundSystemTypewriters: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_typewriters") } + /// Update + internal static var screenNotificationSettingsSoundSystemUpdate: String { return L10n.tr("Localizable", "screen_notification_settings_sound_system_update") } /// To receive notifications, please change your %1$@. internal static func screenNotificationSettingsSystemNotificationsActionRequired(_ p1: Any) -> String { return L10n.tr("Localizable", "screen_notification_settings_system_notifications_action_required", String(describing: p1)) diff --git a/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/NotificationSettingsScreenViewModel.swift b/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/NotificationSettingsScreenViewModel.swift index 6f2b8590b..2589ae600 100644 --- a/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/NotificationSettingsScreenViewModel.swift +++ b/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/NotificationSettingsScreenViewModel.swift @@ -65,7 +65,7 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy return } let userIndicator = UserIndicator(type: .toast, - title: UntranslatedL10n.screenNotificationSettingsSoundPreviewSoundErrorTitle) + title: L10n.screenNotificationSettingsSoundPreviewSoundErrorTitle) userIndicatorController.submitIndicator(userIndicator) MXLog.error("Error previewing alert tone: \(error)") } @@ -274,7 +274,7 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy } catch { MXLog.error("Error importing custom tone url: \(error)") userIndicatorController.submitIndicator(.init(type: .toast, - title: UntranslatedL10n.screenNotificationSettingsSoundImportSoundErrorTitle)) + title: L10n.screenNotificationSettingsSoundImportSoundErrorTitle)) } } @@ -285,7 +285,7 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy MXLog.info("Successfully set selected tone: \(alertTone.label)") } catch { let userIndicator = UserIndicator(type: .toast, - title: UntranslatedL10n.screenNotificationSettingsSoundSetSoundErrorTitle) + title: L10n.screenNotificationSettingsSoundSetSoundErrorTitle) userIndicatorController.submitIndicator(userIndicator) MXLog.error("Error setting selected alert tone to designated location in filesystem: \(error)") } @@ -303,7 +303,7 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy } catch { MXLog.error("Error deleting alert tone \(tone.label): \(error)") userIndicatorController.submitIndicator(.init(type: .toast, - title: UntranslatedL10n.screenNotificationSettingsSoundDeleteSoundErrorTitle)) + title: L10n.screenNotificationSettingsSoundDeleteSoundErrorTitle)) } } state.availableCustomTones = notificationToneManager.customTones() diff --git a/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift b/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift index 9b28183f1..6175f88c5 100644 --- a/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift +++ b/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift @@ -182,7 +182,7 @@ struct NotificationSettingsScreen: View { .listRowBackground(Color.compound.bgCanvasDefaultLevel1) .listRowSeparatorTint(ListRowColor.separatorTint) } header: { - Text(UntranslatedL10n.screenNotificationSettingsSoundSectionTitle) + Text(L10n.screenNotificationSettingsSoundSectionTitle) .compoundListSectionHeader() } @@ -216,7 +216,7 @@ struct NotificationSettingsScreen: View { context.send(viewAction: .deleteCustomAlertTones(tones)) } - ListRow(label: .plain(title: UntranslatedL10n.screenNotificationSettingsSoundCustomSoundButtonTitle), + ListRow(label: .plain(title: L10n.screenNotificationSettingsSoundCustomSoundButtonTitle), kind: .button { context.shouldShowCustomAlertTonePicker = true }) diff --git a/ElementX/Sources/Services/AlertTones/NotificationToneManager.swift b/ElementX/Sources/Services/AlertTones/NotificationToneManager.swift index 7913dc168..82931ab01 100644 --- a/ElementX/Sources/Services/AlertTones/NotificationToneManager.swift +++ b/ElementX/Sources/Services/AlertTones/NotificationToneManager.swift @@ -33,14 +33,12 @@ struct NotificationToneManager: NotificationToneManagerProtocol { private let appSettings: AppSettings - #if IS_MAIN_APP /// The default Element X bundled message tone. - static let defaultElementXMessageTone: NotificationTone = .createBundledSound(label: UntranslatedL10n.screenNotificationSettingsSoundElementDefault, + static let defaultElementXMessageTone: NotificationTone = .createBundledSound(label: L10n.screenNotificationSettingsSoundElementDefault, filename: "message.caf") /// All default tones (system + Element X), sorted by name. static let allDefaultAlerts: [NotificationTone] = (defaultSystemAlerts + defaultElementXAlerts).sorted() - #endif /// Filename of the active tone file used by the notification service. static let selectedToneFilename = "currentAlert.caf" @@ -175,78 +173,77 @@ struct NotificationToneManager: NotificationToneManagerProtocol { /// File URL of the active tone copied/linked for use by the system. private static let selectedToneLocation = NotificationToneManager.libraryLocation.deletingLastPathComponent().appending(component: selectedToneFilename) - - #if IS_MAIN_APP + /// Pre-defined iOS system tones available for selection, sorted by name. private static let defaultSystemAlerts: [NotificationTone] = [ - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemTriTone, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemTriTone, filename: "sms-received1.caf"), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemChime, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemChime, filename: "sms-received2.caf"), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemGlass, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemGlass, filename: "sms-received3.caf"), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemHorn, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemHorn, filename: "sms-received4.caf"), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemBell, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemBell, filename: "sms-received5.caf"), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemElectronic, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemElectronic, filename: "sms-received6.caf"), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemAlert, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemAlert, filename: "alarm.caf"), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemBloom, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemBloom, filename: "Bloom.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemCalypso, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemCalypso, filename: "Calypso.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemAnticipate, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemAnticipate, filename: "Anticipate.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemChooChoo, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemChooChoo, filename: "Choo_Choo.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemDescent, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemDescent, filename: "Descent.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemFanfare, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemFanfare, filename: "Fanfare.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemLadder, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemLadder, filename: "Ladder.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemMinuet, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemMinuet, filename: "Minuet.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemNewsFlash, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemNewsFlash, filename: "News_Flash.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemNoir, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemNoir, filename: "Noir.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemSherwoodForest, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemSherwoodForest, filename: "Sherwood_Forest.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemSpell, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemSpell, filename: "Spell.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemSuspense, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemSuspense, filename: "Suspense.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemTelegraph, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemTelegraph, filename: "Telegraph.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemTiptoes, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemTiptoes, filename: "Tiptoes.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemTypewriters, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemTypewriters, filename: "Typewriters.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemUpdate, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemUpdate, filename: "Update.caf", systemSoundsSubdirectory: ["New"]), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemSwish, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemSwish, filename: "Swish.caf"), - .createSystemSound(label: UntranslatedL10n.screenNotificationSettingsSoundSystemTweet, + .createSystemSound(label: L10n.screenNotificationSettingsSoundSystemTweet, filename: "tweet_sent.caf") ] .compactMap { (alertTone: NotificationTone) -> NotificationTone? in @@ -261,10 +258,9 @@ struct NotificationToneManager: NotificationToneManagerProtocol { /// Element X bundled tones available for selection, sorted by name. private static let defaultElementXAlerts: [NotificationTone] = [ defaultElementXMessageTone, - .createBundledSound(label: UntranslatedL10n.screenNotificationSettingsSoundElementFade, + .createBundledSound(label: L10n.screenNotificationSettingsSoundElementFade, filename: "sound_01.caf") ].sorted() - #endif private static let systemLocation = { let systemRoot: URL