Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add translation keys for upload info section #319

Merged
merged 1 commit into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion mobile/assets/i18n/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,10 @@
"version_announcement_overlay_text_2": "Bitte nehm dir die Zeit und lese das ",
"version_announcement_overlay_release_notes": "Änderungsprotokoll",
"version_announcement_overlay_text_3": " und achte darauf, dass deine docker-compose und .env Dateien aktuell sind, vor allem wenn du ein System für automatische Updates benutzt (z.B. Watchtower).",
"version_announcement_overlay_ack": "Ich habe verstanden"
"version_announcement_overlay_ack": "Ich habe verstanden",
"backup_controller_page_uploading_file_info": "Informationen",
"backup_controller_page_failed": "Fehlgeschlagen ({})",
"backup_controller_page_filename": "Dateiname: {} [{}]",
"backup_controller_page_created": "Erstellt: {}",
"backup_controller_page_id": "ID: {}"
}
7 changes: 6 additions & 1 deletion mobile/assets/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,10 @@
"version_announcement_overlay_text_2": "please take your time to visit the ",
"version_announcement_overlay_release_notes": "release notes",
"version_announcement_overlay_text_3": " and ensure your docker-compose and .env setup is up-to-date to prevent any misconfigurations, especially if you use WatchTower or any mechanism that handles updating your server application automatically.",
"version_announcement_overlay_ack": "Acknowledge"
"version_announcement_overlay_ack": "Acknowledge",
"backup_controller_page_uploading_file_info": "Uploading file info",
"backup_controller_page_failed": "Failed ({})",
"backup_controller_page_filename": "File name: {} [{}]",
"backup_controller_page_created": "Created on: {}",
"backup_controller_page_id": "ID: {}"
}
44 changes: 26 additions & 18 deletions mobile/lib/modules/backup/views/backup_controller_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ class BackupControllerPage extends HookConsumerWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
"Uploading file info",
"backup_controller_page_uploading_file_info",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
),
).tr(),
if (ref.watch(errorBackupListProvider).isNotEmpty)
ActionChip(
avatar: Icon(
Expand All @@ -278,13 +278,15 @@ class BackupControllerPage extends HookConsumerWidget {
elevation: 1,
visualDensity: VisualDensity.compact,
label: Text(
"Failed (${ref.watch(errorBackupListProvider).length})",
"backup_controller_page_failed",
style: TextStyle(
color: Colors.red[400],
fontWeight: FontWeight.bold,
fontSize: 11,
),
),
).tr(args: [
ref.watch(errorBackupListProvider).length.toString()
]),
backgroundColor: Colors.white,
onPressed: () {
AutoRouter.of(context).push(const FailedBackupStatusRoute());
Expand Down Expand Up @@ -326,11 +328,15 @@ class BackupControllerPage extends HookConsumerWidget {
verticalAlignment: TableCellVerticalAlignment.middle,
child: Padding(
padding: const EdgeInsets.all(6.0),
child: Text(
'File name: ${backupState.currentUploadAsset.fileName} [${backupState.currentUploadAsset.fileType.toLowerCase()}]',
style: const TextStyle(
child: const Text(
'backup_controller_page_filename',
style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 10.0),
),
).tr(args: [
backupState.currentUploadAsset.fileName,
backupState.currentUploadAsset.fileType
.toLowerCase()
]),
),
),
],
Expand All @@ -344,16 +350,18 @@ class BackupControllerPage extends HookConsumerWidget {
verticalAlignment: TableCellVerticalAlignment.middle,
child: Padding(
padding: const EdgeInsets.all(6.0),
child: Text(
"Created on: ${DateFormat.yMMMMd('en_US').format(
child: const Text(
"backup_controller_page_created",
style: const TextStyle(
fontWeight: FontWeight.bold, fontSize: 10.0),
).tr(args: [
DateFormat.yMMMMd('en_US').format(
DateTime.parse(
backupState.currentUploadAsset.createdAt
.toString(),
),
)}",
style: const TextStyle(
fontWeight: FontWeight.bold, fontSize: 10.0),
),
)
]),
),
),
],
Expand All @@ -366,13 +374,13 @@ class BackupControllerPage extends HookConsumerWidget {
TableCell(
child: Padding(
padding: const EdgeInsets.all(6.0),
child: Text(
"ID: ${backupState.currentUploadAsset.id}",
style: const TextStyle(
child: const Text(
"backup_controller_page_id",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 10.0,
),
),
).tr(args: [backupState.currentUploadAsset.id]),
),
),
],
Expand Down