You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-17 15:47:54 +02:00
fix: Update locked folder text and improve translations (#18622)
* Update locked folder text and remove unused translations * uppercase Locked folder in Menu * convert some translates to icu and improve * add iOS debug info translations for background processes * fix lint --------- Co-authored-by: dvbthien <dvbthien@gmail.com>
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/providers/backup/ios_background_settings.provider.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:immich_mobile/utils/translation.dart';
|
||||
|
||||
/// This is a simple debug widget which should be removed later on when we are
|
||||
/// more confident about background sync
|
||||
@ -19,26 +20,35 @@ class IosDebugInfoTile extends HookConsumerWidget {
|
||||
final processing = settings.timeOfLastProcessing;
|
||||
final processes = settings.numberOfBackgroundTasksQueued;
|
||||
|
||||
final processOrProcesses = processes == 1 ? 'process' : 'processes';
|
||||
final numberOrZero = processes == 0 ? 'No' : processes.toString();
|
||||
final title = '$numberOrZero background $processOrProcesses queued';
|
||||
final String title;
|
||||
if (processes == 0) {
|
||||
title = 'ios_debug_info_no_processes_queued'.tr();
|
||||
} else {
|
||||
title = t('ios_debug_info_processes_queued', {'count': processes});
|
||||
}
|
||||
|
||||
final df = DateFormat.yMd().add_jm();
|
||||
final String subtitle;
|
||||
if (fetch == null && processing == null) {
|
||||
subtitle = 'No background sync job has run yet';
|
||||
subtitle = 'ios_debug_info_no_sync_yet'.tr();
|
||||
} else if (fetch != null && processing == null) {
|
||||
subtitle = 'Fetch ran ${df.format(fetch)}';
|
||||
subtitle =
|
||||
t('ios_debug_info_fetch_ran_at', {'dateTime': df.format(fetch)});
|
||||
} else if (processing != null && fetch == null) {
|
||||
subtitle = 'Processing ran ${df.format(processing)}';
|
||||
subtitle = t(
|
||||
'ios_debug_info_processing_ran_at',
|
||||
{'dateTime': df.format(processing)},
|
||||
);
|
||||
} else {
|
||||
final fetchOrProcessing =
|
||||
fetch!.isAfter(processing!) ? fetch : processing;
|
||||
subtitle = 'Last sync ${df.format(fetchOrProcessing)}';
|
||||
subtitle = t(
|
||||
'ios_debug_info_last_sync_at',
|
||||
{'dateTime': df.format(fetchOrProcessing)},
|
||||
);
|
||||
}
|
||||
|
||||
return ListTile(
|
||||
key: ValueKey(title),
|
||||
title: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
|
Reference in New Issue
Block a user