Skip to content

A cross platform Audiobookshelf client for Android and iOS

Dart

Localize the books-this-year hide and restore text

Barnabas2f053eee9560
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb
index 5cdb46f1..91539b3d 100644
--- a/lib/l10n/app_en.arb
+++ b/lib/l10n/app_en.arb
@@ -349,6 +349,32 @@
"statsEpisodesFinished": "Episodes",
"statsBooksThisYear": "Books this year",
"statsEpisodesThisYear": "Episodes this year",
+ "statsRemoveFromYearTitle": "Remove from this year",
+ "statsRemoveFromYearWithDate": "The finished date will still be {date} on the server. This only removes \"{title}\" from your Absorb books-this-year list.",
+ "@statsRemoveFromYearWithDate": {
+ "placeholders": {
+ "date": { "type": "String" },
+ "title": { "type": "String" }
+ }
+ },
+ "statsRemoveFromYearNoDate": "The finished date stays on the server. This only removes \"{title}\" from your Absorb books-this-year list.",
+ "@statsRemoveFromYearNoDate": {
+ "placeholders": {
+ "title": { "type": "String" }
+ }
+ },
+ "statsRemovedFromYear": "Removed from this year",
+ "statsAddBackToYearTitle": "Add back to this year",
+ "statsAddBackToYearBody": "Add \"{title}\" back to your Absorb books-this-year list?",
+ "@statsAddBackToYearBody": {
+ "placeholders": {
+ "title": { "type": "String" }
+ }
+ },
+ "statsAddBack": "Add back",
+ "statsAddedBackToYear": "Added back to this year",
+ "statsHiddenFromYear": "Hidden from this year",
+ "statsNothingHidden": "Nothing hidden",
"statsDaysActive": "Days Active",
"statsDailyAverage": "Daily Average",
"statsLast7Days": "Last 7 Days",
diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart
index be0402db..40742219 100644
--- a/lib/l10n/app_localizations.dart
+++ b/lib/l10n/app_localizations.dart
@@ -1318,6 +1318,66 @@ abstract class AppLocalizations {
/// **'Episodes this year'**
String get statsEpisodesThisYear;
+ /// No description provided for @statsRemoveFromYearTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Remove from this year'**
+ String get statsRemoveFromYearTitle;
+
+ /// No description provided for @statsRemoveFromYearWithDate.
+ ///
+ /// In en, this message translates to:
+ /// **'The finished date will still be {date} on the server. This only removes \"{title}\" from your Absorb books-this-year list.'**
+ String statsRemoveFromYearWithDate(String date, String title);
+
+ /// No description provided for @statsRemoveFromYearNoDate.
+ ///
+ /// In en, this message translates to:
+ /// **'The finished date stays on the server. This only removes \"{title}\" from your Absorb books-this-year list.'**
+ String statsRemoveFromYearNoDate(String title);
+
+ /// No description provided for @statsRemovedFromYear.
+ ///
+ /// In en, this message translates to:
+ /// **'Removed from this year'**
+ String get statsRemovedFromYear;
+
+ /// No description provided for @statsAddBackToYearTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Add back to this year'**
+ String get statsAddBackToYearTitle;
+
+ /// No description provided for @statsAddBackToYearBody.
+ ///
+ /// In en, this message translates to:
+ /// **'Add \"{title}\" back to your Absorb books-this-year list?'**
+ String statsAddBackToYearBody(String title);
+
+ /// No description provided for @statsAddBack.
+ ///
+ /// In en, this message translates to:
+ /// **'Add back'**
+ String get statsAddBack;
+
+ /// No description provided for @statsAddedBackToYear.
+ ///
+ /// In en, this message translates to:
+ /// **'Added back to this year'**
+ String get statsAddedBackToYear;
+
+ /// No description provided for @statsHiddenFromYear.
+ ///
+ /// In en, this message translates to:
+ /// **'Hidden from this year'**
+ String get statsHiddenFromYear;
+
+ /// No description provided for @statsNothingHidden.
+ ///
+ /// In en, this message translates to:
+ /// **'Nothing hidden'**
+ String get statsNothingHidden;
+
/// No description provided for @statsDaysActive.
///
/// In en, this message translates to:
diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart
index 3a5ceb4e..aaebbb3a 100644
--- a/lib/l10n/app_localizations_de.dart
+++ b/lib/l10n/app_localizations_de.dart
@@ -666,6 +666,42 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episoden dieses Jahr';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Aktive Tage';
diff --git a/lib/l10n/app_localizations_el.dart b/lib/l10n/app_localizations_el.dart
index 59eff987..24e909f1 100644
--- a/lib/l10n/app_localizations_el.dart
+++ b/lib/l10n/app_localizations_el.dart
@@ -661,6 +661,42 @@ class AppLocalizationsEl extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episodes this year';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Days Active';
diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart
index af9bf3a0..15c964ce 100644
--- a/lib/l10n/app_localizations_en.dart
+++ b/lib/l10n/app_localizations_en.dart
@@ -661,6 +661,42 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episodes this year';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Days Active';
diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart
index 4319a1c4..f98653b4 100644
--- a/lib/l10n/app_localizations_es.dart
+++ b/lib/l10n/app_localizations_es.dart
@@ -661,6 +661,42 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episodes this year';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Days Active';
diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart
index dca92003..2373902a 100644
--- a/lib/l10n/app_localizations_fr.dart
+++ b/lib/l10n/app_localizations_fr.dart
@@ -663,6 +663,42 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episodes this year';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Days Active';
diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart
index 19da1bdb..bd4653dd 100644
--- a/lib/l10n/app_localizations_it.dart
+++ b/lib/l10n/app_localizations_it.dart
@@ -661,6 +661,42 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episodes this year';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Days Active';
diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart
index c6148200..2fd14ea6 100644
--- a/lib/l10n/app_localizations_ja.dart
+++ b/lib/l10n/app_localizations_ja.dart
@@ -661,6 +661,42 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episodes this year';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Days Active';
diff --git a/lib/l10n/app_localizations_no.dart b/lib/l10n/app_localizations_no.dart
index 85a7d3d1..1353393d 100644
--- a/lib/l10n/app_localizations_no.dart
+++ b/lib/l10n/app_localizations_no.dart
@@ -661,6 +661,42 @@ class AppLocalizationsNo extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episodes this year';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Days Active';
diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart
index 3dd21b1d..df7a5283 100644
--- a/lib/l10n/app_localizations_pt.dart
+++ b/lib/l10n/app_localizations_pt.dart
@@ -661,6 +661,42 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episodes this year';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Days Active';
diff --git a/lib/l10n/app_localizations_ro.dart b/lib/l10n/app_localizations_ro.dart
index ea38eee0..904b6e31 100644
--- a/lib/l10n/app_localizations_ro.dart
+++ b/lib/l10n/app_localizations_ro.dart
@@ -661,6 +661,42 @@ class AppLocalizationsRo extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episodes this year';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Days Active';
diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart
index f944693a..eb01f567 100644
--- a/lib/l10n/app_localizations_ru.dart
+++ b/lib/l10n/app_localizations_ru.dart
@@ -662,6 +662,42 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get statsEpisodesThisYear => 'Episodes this year';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => 'Days Active';
diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart
index 6722a4da..895a0eaf 100644
--- a/lib/l10n/app_localizations_zh.dart
+++ b/lib/l10n/app_localizations_zh.dart
@@ -650,6 +650,42 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get statsEpisodesThisYear => '今年单集';
+ @override
+ String get statsRemoveFromYearTitle => 'Remove from this year';
+
+ @override
+ String statsRemoveFromYearWithDate(String date, String title) {
+ return 'The finished date will still be $date on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String statsRemoveFromYearNoDate(String title) {
+ return 'The finished date stays on the server. This only removes \"$title\" from your Absorb books-this-year list.';
+ }
+
+ @override
+ String get statsRemovedFromYear => 'Removed from this year';
+
+ @override
+ String get statsAddBackToYearTitle => 'Add back to this year';
+
+ @override
+ String statsAddBackToYearBody(String title) {
+ return 'Add \"$title\" back to your Absorb books-this-year list?';
+ }
+
+ @override
+ String get statsAddBack => 'Add back';
+
+ @override
+ String get statsAddedBackToYear => 'Added back to this year';
+
+ @override
+ String get statsHiddenFromYear => 'Hidden from this year';
+
+ @override
+ String get statsNothingHidden => 'Nothing hidden';
+
@override
String get statsDaysActive => '活跃天数';
diff --git a/lib/widgets/finished_books_this_year_sheet.dart b/lib/widgets/finished_books_this_year_sheet.dart
index 5b63c7f9..8cadeae8 100644
--- a/lib/widgets/finished_books_this_year_sheet.dart
+++ b/lib/widgets/finished_books_this_year_sheet.dart
@@ -113,13 +113,13 @@ class _FinishedBooksThisYearSheetState
final confirmed = await showDialog<bool>(
context: context,
builder: (ctx) => AlertDialog(
- title: const Text('Remove from this year'),
+ title: Text(l.statsRemoveFromYearTitle),
content: Text(dateStr != null
- ? 'The finished date will still be $dateStr on the server. This only removes "$title" from your Absorb books-this-year list.'
- : 'The finished date stays on the server. This only removes "$title" from your Absorb books-this-year list.'),
+ ? l.statsRemoveFromYearWithDate(dateStr, title)
+ : l.statsRemoveFromYearNoDate(title)),
actions: [
TextButton(onPressed: () => Navigator.pop(ctx, false), child: Text(l.cancel)),
- FilledButton(onPressed: () => Navigator.pop(ctx, true), child: const Text('Remove')),
+ FilledButton(onPressed: () => Navigator.pop(ctx, true), child: Text(l.remove)),
],
),
);
@@ -127,7 +127,7 @@ class _FinishedBooksThisYearSheetState
await context.read<LibraryProvider>().hideFromThisYear(itemId);
if (!mounted) return;
setState(() => _items.removeWhere((it) => (it['id'] as String?) == itemId));
- showOverlayToast(context, 'Removed from this year', icon: Icons.remove_circle_outline_rounded);
+ showOverlayToast(context, l.statsRemovedFromYear, icon: Icons.remove_circle_outline_rounded);
}
/// Long-press action while viewing hidden books: add one back so it counts
@@ -137,11 +137,11 @@ class _FinishedBooksThisYearSheetState
final confirmed = await showDialog<bool>(
context: context,
builder: (ctx) => AlertDialog(
- title: const Text('Add back to this year'),
- content: Text('Add "$title" back to your Absorb books-this-year list?'),
+ title: Text(l.statsAddBackToYearTitle),
+ content: Text(l.statsAddBackToYearBody(title)),
actions: [
TextButton(onPressed: () => Navigator.pop(ctx, false), child: Text(l.cancel)),
- FilledButton(onPressed: () => Navigator.pop(ctx, true), child: const Text('Add back')),
+ FilledButton(onPressed: () => Navigator.pop(ctx, true), child: Text(l.statsAddBack)),
],
),
);
@@ -149,7 +149,7 @@ class _FinishedBooksThisYearSheetState
await context.read<LibraryProvider>().unhideFromThisYear(itemId);
if (!mounted) return;
setState(() => _items.removeWhere((it) => (it['id'] as String?) == itemId));
- showOverlayToast(context, 'Added back to this year', icon: Icons.check_circle_outline_rounded);
+ showOverlayToast(context, l.statsAddedBackToYear, icon: Icons.check_circle_outline_rounded);
}
@override
@@ -166,7 +166,7 @@ class _FinishedBooksThisYearSheetState
Icon(Icons.auto_stories_rounded, size: 20, color: cs.primary),
const SizedBox(width: 10),
Expanded(
- child: Text(_showHidden ? 'Hidden from this year' : l.statsBooksThisYear,
+ child: Text(_showHidden ? l.statsHiddenFromYear : l.statsBooksThisYear,
style: tt.titleMedium?.copyWith(fontWeight: FontWeight.w600),
maxLines: 1,
overflow: TextOverflow.ellipsis),
@@ -201,7 +201,7 @@ class _FinishedBooksThisYearSheetState
? const Center(child: CircularProgressIndicator())
: _items.isEmpty
? Center(
- child: Text(_showHidden ? 'Nothing hidden' : l.noBooksFound,
+ child: Text(_showHidden ? l.statsNothingHidden : l.noBooksFound,
style: tt.bodyLarge
?.copyWith(color: cs.onSurfaceVariant)))
: _gridView