mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
fix(mobile): empty translation placeholders (#18063)
* fix: empty placeholders * fix: use namedArgs --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
2af8095880
commit
ece977d9ca
28 changed files with 228 additions and 203 deletions
mobile/lib/widgets/settings/backup_settings
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue