mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00: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:
parent
f5ce3deb3a
commit
6d310d6297
14 changed files with 181 additions and 72 deletions
|
|
@ -30,7 +30,7 @@ class AlbumOptionsPage extends HookConsumerWidget {
|
|||
Navigator.pop(context);
|
||||
ImmichToast.show(
|
||||
context: context,
|
||||
msg: "Error leaving/removing from album",
|
||||
msg: "shared_album_section_people_action_error".tr(),
|
||||
toastType: ToastType.error,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
);
|
||||
|
|
@ -81,7 +81,7 @@ class AlbumOptionsPage extends HookConsumerWidget {
|
|||
actions = [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.exit_to_app_rounded),
|
||||
title: const Text("Leave album"),
|
||||
title: const Text("shared_album_section_people_action_leave").tr(),
|
||||
onTap: leaveAlbum,
|
||||
),
|
||||
];
|
||||
|
|
@ -91,7 +91,7 @@ class AlbumOptionsPage extends HookConsumerWidget {
|
|||
actions = [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.person_remove_rounded),
|
||||
title: const Text("Remove user from album"),
|
||||
title: const Text("shared_album_section_people_remove_user").tr(),
|
||||
onTap: () => removeUserFromAlbum(user),
|
||||
),
|
||||
];
|
||||
|
|
@ -130,11 +130,11 @@ class AlbumOptionsPage extends HookConsumerWidget {
|
|||
style: TextStyle(color: Colors.grey[500]),
|
||||
),
|
||||
trailing: const Text(
|
||||
"Owner",
|
||||
"shared_album_section_people_owner_label",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
).tr(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ class AlbumOptionsPage extends HookConsumerWidget {
|
|||
subtitle:
|
||||
const Text("shared_album_activity_setting_subtitle").tr(),
|
||||
),
|
||||
buildSectionTitle("PEOPLE"),
|
||||
buildSectionTitle("shared_album_section_people_title".tr()),
|
||||
buildOwnerInfo(),
|
||||
buildSharedUsersList(),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ class LoginForm extends HookConsumerWidget {
|
|||
TextButton.icon(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () => serverEndpoint.value = null,
|
||||
label: const Text('Back'),
|
||||
label: const Text('login_form_back_button_text').tr(),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ class AssetsInBoundBottomSheetState extends ConsumerState<MapPageBottomSheet> {
|
|||
|
||||
Widget buildDragHandle(ScrollController scrollController) {
|
||||
final textToDisplay = assetsInBound.value.isNotEmpty
|
||||
? "${assetsInBound.value.length} photo${assetsInBound.value.length > 1 ? "s" : ""}"
|
||||
? "map_assets_in_bounds".plural(assetsInBound.value.length)
|
||||
: "map_no_assets_in_bounds".tr();
|
||||
final dragHandle = Container(
|
||||
height: 60,
|
||||
|
|
|
|||
|
|
@ -76,18 +76,21 @@ class MapSettingsDialog extends HookConsumerWidget {
|
|||
showRelativeDate.value = value!;
|
||||
},
|
||||
dropdownMenuEntries: [
|
||||
const DropdownMenuEntry(value: 0, label: "All"),
|
||||
const DropdownMenuEntry(
|
||||
DropdownMenuEntry(
|
||||
value: 0,
|
||||
label: "map_settings_date_range_option_all".tr(),
|
||||
),
|
||||
DropdownMenuEntry(
|
||||
value: 1,
|
||||
label: "Past 24 hours",
|
||||
label: "map_settings_date_range_option_days".plural(1),
|
||||
),
|
||||
const DropdownMenuEntry(
|
||||
DropdownMenuEntry(
|
||||
value: 7,
|
||||
label: "Past 7 days",
|
||||
label: "map_settings_date_range_option_days".plural(7),
|
||||
),
|
||||
const DropdownMenuEntry(
|
||||
DropdownMenuEntry(
|
||||
value: 30,
|
||||
label: "Past 30 days",
|
||||
label: "map_settings_date_range_option_days".plural(30),
|
||||
),
|
||||
DropdownMenuEntry(
|
||||
value: now
|
||||
|
|
@ -102,7 +105,7 @@ class MapSettingsDialog extends HookConsumerWidget {
|
|||
),
|
||||
)
|
||||
.inDays,
|
||||
label: "Past year",
|
||||
label: "map_settings_date_range_option_years".plural(1),
|
||||
),
|
||||
DropdownMenuEntry(
|
||||
value: now
|
||||
|
|
@ -117,7 +120,7 @@ class MapSettingsDialog extends HookConsumerWidget {
|
|||
),
|
||||
)
|
||||
.inDays,
|
||||
label: "Past 3 years",
|
||||
label: "map_settings_date_range_option_years".plural(3),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/modules/map/ui/map_thumbnail.dart';
|
||||
|
|
@ -64,18 +65,18 @@ class CuratedPlacesRow extends CuratedRow {
|
|||
),
|
||||
),
|
||||
),
|
||||
const Align(
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 10),
|
||||
child: Text(
|
||||
"Your Map",
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
child: const Text(
|
||||
"search_page_your_map",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
).tr(),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
|
@ -27,15 +28,15 @@ class PersonNameEditForm extends HookConsumerWidget {
|
|||
|
||||
return AlertDialog(
|
||||
title: const Text(
|
||||
"Add a name",
|
||||
"search_page_person_add_name_dialog_title",
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
).tr(),
|
||||
content: SingleChildScrollView(
|
||||
child: TextFormField(
|
||||
controller: controller,
|
||||
autofocus: true,
|
||||
decoration: const InputDecoration(
|
||||
hintText: 'Name',
|
||||
decoration: InputDecoration(
|
||||
hintText: 'search_page_person_add_name_dialog_hint'.tr(),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -49,12 +50,12 @@ class PersonNameEditForm extends HookConsumerWidget {
|
|||
);
|
||||
},
|
||||
child: Text(
|
||||
"Cancel",
|
||||
"search_page_person_add_name_dialog_cancel",
|
||||
style: TextStyle(
|
||||
color: Colors.red[300],
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
).tr(),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
|
|
@ -70,12 +71,12 @@ class PersonNameEditForm extends HookConsumerWidget {
|
|||
);
|
||||
},
|
||||
child: Text(
|
||||
"Save",
|
||||
"search_page_person_add_name_dialog_save",
|
||||
style: TextStyle(
|
||||
color: context.primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
).tr(),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
|
@ -52,9 +53,9 @@ class PersonResultPage extends HookConsumerWidget {
|
|||
ListTile(
|
||||
leading: const Icon(Icons.edit_outlined),
|
||||
title: const Text(
|
||||
'Edit name',
|
||||
'search_page_person_edit_name',
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
).tr(),
|
||||
onTap: showEditNameDialog,
|
||||
),
|
||||
],
|
||||
|
|
@ -72,15 +73,15 @@ class PersonResultPage extends HookConsumerWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Add a name',
|
||||
'search_page_person_add_name_title',
|
||||
style: context.textTheme.titleSmall?.copyWith(
|
||||
color: context.themeData.colorScheme.secondary,
|
||||
),
|
||||
),
|
||||
).tr(),
|
||||
Text(
|
||||
'Find them fast by name with search',
|
||||
'search_page_person_add_name_subtitle',
|
||||
style: context.textTheme.labelSmall,
|
||||
),
|
||||
).tr(),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class SearchPage extends HookConsumerWidget {
|
|||
).tr(),
|
||||
),
|
||||
ListTile(
|
||||
title: Text('Screenshots', style: categoryTitleStyle).tr(),
|
||||
title: Text('search_page_screenshots', style: categoryTitleStyle).tr(),
|
||||
leading: Icon(
|
||||
Icons.screenshot,
|
||||
color: categoryIconColor,
|
||||
|
|
|
|||
|
|
@ -68,11 +68,10 @@ class AdvancedSettings extends HookConsumerWidget {
|
|||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: Text(
|
||||
// Not translated because the levels are only English
|
||||
"Log level: $logLevel",
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
title: const Text(
|
||||
"advanced_settings_log_level_title",
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
).tr(args: [logLevel]),
|
||||
subtitle: Slider(
|
||||
value: levelId.value.toDouble(),
|
||||
onChanged: (double v) => levelId.value = v.toInt(),
|
||||
|
|
|
|||
|
|
@ -42,12 +42,12 @@ class LocalStorageSettings extends HookConsumerWidget {
|
|||
children: [
|
||||
ListTile(
|
||||
title: Text(
|
||||
"Duplicated Assets (${cacheItemCount.value})",
|
||||
"cache_settings_duplicated_assets_title",
|
||||
style: context.textTheme.labelLarge
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
).tr(),
|
||||
).tr(args: ["${cacheItemCount.value}"]),
|
||||
subtitle: const Text(
|
||||
"Photos and videos that are black listed by the app",
|
||||
"cache_settings_duplicated_assets_subtitle",
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
),
|
||||
|
|
@ -55,7 +55,7 @@ class LocalStorageSettings extends HookConsumerWidget {
|
|||
trailing: TextButton(
|
||||
onPressed: cacheItemCount.value > 0 ? clearCache : null,
|
||||
child: Text(
|
||||
"CLEAR",
|
||||
"cache_settings_duplicated_assets_clear_button",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: cacheItemCount.value > 0 ? Colors.red : Colors.grey,
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue