fix(mobile): empty translation placeholders ()

* fix: empty placeholders

* fix: use namedArgs

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong 2025-05-06 18:51:05 +05:30 committed by GitHub
parent 2af8095880
commit ece977d9ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 228 additions and 203 deletions
mobile/lib/widgets/settings/backup_settings

View file

@ -164,10 +164,14 @@ class _BackgroundSettingsEnabled extends HookConsumerWidget {
switch (v) { 0 => 5000, 1 => 30000, 2 => 120000, _ => 600000 };
String formatBackupDelaySliderValue(int v) => switch (v) {
0 => 'setting_notifications_notify_seconds'.tr(args: const ['5']),
1 => 'setting_notifications_notify_seconds'.tr(args: const ['30']),
2 => 'setting_notifications_notify_minutes'.tr(args: const ['2']),
_ => 'setting_notifications_notify_minutes'.tr(args: const ['10']),
0 => 'setting_notifications_notify_seconds'
.tr(namedArgs: {'count': '5'}),
1 => 'setting_notifications_notify_seconds'
.tr(namedArgs: {'count': '30'}),
2 => 'setting_notifications_notify_minutes'
.tr(namedArgs: {'count': '2'}),
_ => 'setting_notifications_notify_minutes'
.tr(namedArgs: {'count': '10'}),
};
final backupTriggerDelay =
@ -221,7 +225,9 @@ class _BackgroundSettingsEnabled extends HookConsumerWidget {
SettingsSliderListTile(
valueNotifier: triggerDelay,
text: 'backup_controller_page_background_delay'.tr(
args: [formatBackupDelaySliderValue(triggerDelay.value)],
namedArgs: {
'duration': formatBackupDelaySliderValue(triggerDelay.value),
},
),
maxValue: 3.0,
noDivisons: 3,