1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-17 12:27:43 +02:00

fix(mobile): Mark more strings for translation (#5132)

* fix(mobile): Mark more strings for translation

Moving more strings to the `i18n` JSON file, and also including their
es-US translations.

* Add more translatable strings
This commit is contained in:
Michael Manganiello
2023-11-18 21:32:28 -05:00
committed by GitHub
parent f5ce3deb3a
commit 6d310d6297
14 changed files with 181 additions and 72 deletions

View File

@ -230,31 +230,34 @@ class SharedLinkEditPage extends HookConsumerWidget {
borderSide: BorderSide(color: Colors.grey),
),
),
dropdownMenuEntries: const [
DropdownMenuEntry(value: 0, label: "Never"),
dropdownMenuEntries: [
DropdownMenuEntry(
value: 0,
label: "shared_link_edit_expire_after_option_never".tr(),
),
DropdownMenuEntry(
value: 30,
label: '30 minutes',
label: "shared_link_edit_expire_after_option_minutes".plural(30),
),
DropdownMenuEntry(
value: 60,
label: '1 hour',
label: "shared_link_edit_expire_after_option_hours".plural(1),
),
DropdownMenuEntry(
value: 60 * 6,
label: '6 hours',
label: "shared_link_edit_expire_after_option_hours".plural(6),
),
DropdownMenuEntry(
value: 60 * 24,
label: '1 day',
label: "shared_link_edit_expire_after_option_days".plural(1),
),
DropdownMenuEntry(
value: 60 * 24 * 7,
label: '7 days',
label: "shared_link_edit_expire_after_option_days".plural(7),
),
DropdownMenuEntry(
value: 60 * 24 * 30,
label: '30 days',
label: "shared_link_edit_expire_after_option_days".plural(30),
),
],
);
@ -265,15 +268,15 @@ class SharedLinkEditPage extends HookConsumerWidget {
ClipboardData(
text: passwordController.text.isEmpty
? newShareLink.value
: "Link: ${newShareLink.value}\nPassword: ${passwordController.text}",
: "shared_link_clipboard_text".tr(
args: [newShareLink.value, passwordController.text],
),
),
).then((_) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
"Copied to clipboard",
),
duration: Duration(seconds: 2),
SnackBar(
content: const Text("shared_link_clipboard_copied_massage").tr(),
duration: const Duration(seconds: 2),
),
);
});
@ -310,7 +313,7 @@ class SharedLinkEditPage extends HookConsumerWidget {
context.autoPop();
},
child: const Text(
"Done",
"share_done",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
@ -353,7 +356,7 @@ class SharedLinkEditPage extends HookConsumerWidget {
context: context,
gravity: ToastGravity.BOTTOM,
toastType: ToastType.error,
msg: 'Error while creating shared link',
msg: 'shared_link_create_error'.tr(),
);
}
}