mirror of
https://github.com/immich-app/immich.git
synced 2024-11-15 09:59:00 -07:00
fix(mobile): translation for title (#10324)
* fix(memory): translation for title * chore: update memoery translation for dutch * refactor(translation): avoid incompatibility with i18n website * fix: lint errors
This commit is contained in:
parent
e77e87b936
commit
0fe152b1ef
@ -295,6 +295,8 @@
|
||||
"memories_check_back_tomorrow": "Check back tomorrow for more memories",
|
||||
"memories_start_over": "Start Over",
|
||||
"memories_swipe_to_close": "Swipe up to close",
|
||||
"memories_year_ago": "A year ago",
|
||||
"memories_years_ago": "{} years ago",
|
||||
"monthly_title_text_date_format": "MMMM y",
|
||||
"motion_photos_page_title": "Motion Photos",
|
||||
"multiselect_grid_edit_date_time_err_read_only": "Cannot edit date of read only asset(s), skipping",
|
||||
|
@ -295,6 +295,8 @@
|
||||
"memories_check_back_tomorrow": "明日もう一度確認してください",
|
||||
"memories_start_over": "始める",
|
||||
"memories_swipe_to_close": "上にスワイプして閉じる",
|
||||
"memories_year_ago": "過去1年間",
|
||||
"memories_years_ago": "過去{}年間",
|
||||
"monthly_title_text_date_format": "yyyy年 MM月",
|
||||
"motion_photos_page_title": "モーションフォト",
|
||||
"multiselect_grid_edit_date_time_err_read_only": "読み取り専用の項目の日付を変更できません",
|
||||
|
@ -295,6 +295,8 @@
|
||||
"memories_check_back_tomorrow": "Kom morgen terug voor meer herinneringen",
|
||||
"memories_start_over": "Opnieuw beginnen",
|
||||
"memories_swipe_to_close": "Swipe omhoog om te sluiten",
|
||||
"memories_year_ago": "1 jaar geleden",
|
||||
"memories_years_ago": "{} jaar geleden",
|
||||
"monthly_title_text_date_format": "MMMM y",
|
||||
"motion_photos_page_title": "Bewegende foto's",
|
||||
"multiselect_grid_edit_date_time_err_read_only": "Kan datum van alleen-lezen asset(s) niet wijzigen, overslaan",
|
||||
|
@ -295,6 +295,8 @@
|
||||
"memories_check_back_tomorrow": "明天再看",
|
||||
"memories_start_over": "再看一次",
|
||||
"memories_swipe_to_close": "上划关闭",
|
||||
"memories_year_ago": "1年前",
|
||||
"memories_years_ago": "{}年前",
|
||||
"monthly_title_text_date_format": "MMMM y",
|
||||
"motion_photos_page_title": "动图",
|
||||
"multiselect_grid_edit_date_time_err_read_only": "无法编辑只读项目的日期,跳过",
|
||||
|
@ -295,6 +295,8 @@
|
||||
"memories_check_back_tomorrow": "明天再看",
|
||||
"memories_start_over": "再看一次",
|
||||
"memories_swipe_to_close": "上划关闭",
|
||||
"memories_year_ago": "1年前",
|
||||
"memories_years_ago": "{}年前",
|
||||
"monthly_title_text_date_format": "MMMM y",
|
||||
"motion_photos_page_title": "动图",
|
||||
"multiselect_grid_edit_date_time_err_read_only": "无法编辑只读项目的日期,跳过",
|
||||
|
@ -295,6 +295,8 @@
|
||||
"memories_check_back_tomorrow": "Check back tomorrow for more memories",
|
||||
"memories_start_over": "Start Over",
|
||||
"memories_swipe_to_close": "Swipe up to close",
|
||||
"memories_year_ago": "1年前",
|
||||
"memories_years_ago": "{}年前",
|
||||
"monthly_title_text_date_format": "MMMM y",
|
||||
"motion_photos_page_title": "Motion Photos",
|
||||
"multiselect_grid_edit_date_time_err_read_only": "Cannot edit date of read only asset(s), skipping",
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:immich_mobile/models/memories/memory.model.dart';
|
||||
@ -8,8 +9,6 @@ import 'package:isar/isar.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
import '../utils/string_helper.dart';
|
||||
|
||||
final memoryServiceProvider = StateProvider<MemoryService>((ref) {
|
||||
return MemoryService(
|
||||
ref.watch(apiServiceProvider),
|
||||
@ -42,9 +41,12 @@ class MemoryService {
|
||||
final dbAssets =
|
||||
await _db.assets.getAllByRemoteId(assets.map((e) => e.id));
|
||||
if (dbAssets.isNotEmpty) {
|
||||
final String title = yearsAgo <= 1
|
||||
? 'memories_year_ago'.tr()
|
||||
: 'memories_years_ago'.tr(args: [yearsAgo.toString()]);
|
||||
memories.add(
|
||||
Memory(
|
||||
title: '$yearsAgo year${s(yearsAgo)} ago',
|
||||
title: title,
|
||||
assets: dbAssets,
|
||||
),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user