Add notification setting sound translatables

This commit is contained in:
Stefan Ceriu
2026-05-21 17:43:49 +03:00
parent 3bbf31bea6
commit 9609fa4616
8 changed files with 171 additions and 141 deletions
@@ -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()
@@ -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
})