Skip to content

Commit

Permalink
localization: add full localization (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
wfleischer authored Nov 20, 2024
1 parent 7ddbd1a commit 0733c20
Show file tree
Hide file tree
Showing 30 changed files with 683 additions and 105 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.history
.svn/
migrate_working_dir/
i18n_untranslated.json

# IntelliJ related
*.iml
Expand Down
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ PODS:
- Flutter (1.0.0)
- integration_test (0.0.1):
- Flutter
- package_info_plus (0.4.5):
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
Expand All @@ -11,6 +13,7 @@ PODS:
DEPENDENCIES:
- Flutter (from `Flutter`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

Expand All @@ -19,6 +22,8 @@ EXTERNAL SOURCES:
:path: Flutter
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
url_launcher_ios:
Expand All @@ -27,6 +32,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe

Expand Down
5 changes: 4 additions & 1 deletion l10n.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
arb-dir: lib/src/localization
template-arb-file: app_en.arb
nullable-getter: false
output-localization-file: app_localizations.dart
template-arb-file: app_en.arb
untranslated-messages-file: i18n_untranslated.json
use-escaping: true
10 changes: 2 additions & 8 deletions lib/src/app.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:nwt_reading/src/settings/stories/theme_mode_story.dart';
import 'package:nwt_reading/src/theme.dart';
Expand All @@ -19,15 +18,10 @@ class App extends ConsumerWidget {
return MaterialApp(
debugShowCheckedModeBanner: false,
restorationScopeId: 'app',
localizationsDelegates: const [
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
onGenerateTitle: (BuildContext context) =>
AppLocalizations.of(context)!.appTitle,
AppLocalizations.of(context).appTitle,
theme: lightTheme,
darkTheme: darkTheme,
themeMode: themeMode,
Expand Down
40 changes: 40 additions & 0 deletions lib/src/localization/app_cz.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"@@locale": "cs",
"@@comment": "(c) searchwork.org",
"appTitle": "Čtení NWT",
"plansPageTitle": "Plány čtení Bible",
"plansPageNoPlanYet": "Zatím žádný plán čtení Bible. Přidej jeden.",
"plansPageAddPlanTooltip": "Přidat",
"plansPageCardRemainingDays": "{remainingDays}d",
"schedulePageJumpToBookmarkTooltip": "Přejít na záložku",
"schedulePageEventCommonEraTerm": "{isCE, select, true{n. l.} other{př. n. l.}}",
"schedulePageToggleReadDialogTitle": "Přepínání čtení",
"schedulePageToggleReadDialogText": "Chceš označit všechny předchozí sekce jako přečtené a všechny následující jako nepřečtené?",
"planEditPageTitle": "Upravit plán",
"planEditPageChronologicalLabel": "chronologicky",
"planEditPageSequentialLabel": "sekvenčně",
"planEditPageAsWrittenLabel": "jak je napsáno",
"planEditPageThreeMonthsLabel": "3 měsíce",
"planEditPageSixMonthsLabel": "6 měsíců",
"planEditPageOneYearLabel": "1 rok",
"planEditPageTwoYearsLabel": "2 roky",
"planEditPageFourYearsLabel": "4 roky",
"planEditPageLanguageLabel": "Jazyk",
"planEditPageWithTargetDateTitle": "S cílovým datem",
"planEditPageWithTargetDateSubtitle": "Sleduj denní čtení s cílovým datem.",
"planEditPageWithTargetDateStatusSubtitle": "Cílové datum je {targetDate}. Jsi {direction, select, other{v plánu} ahead{{deviationDays} dní napřed} behind{{deviationDays} dní pozadu}} s čtením.",
"planEditPageResetTargetDateTitle": "Resetovat cílové datum",
"planEditPageResetTargetDateSubtitle": "Změň cílové datum na {targetDate}, aby ses držel plánu čtení.",
"planEditPageResetTargetDateDialogTitle": "Potvrdit resetování cílového data",
"planEditPageResetTargetDateDialogText": "Chceš změnit cílové datum, aby ses držel plánu čtení?",
"planEditPageShowEventsTitle": "Zobrazit události",
"planEditPageShowEventsSubtitle": "Zobraz v sekcích události s daty, kdy se staly.",
"planEditPageShowLocationsTitle": "Zobrazit místa",
"planEditPageShowLocationsSubtitle": "Zobraz v sekcích zmíněná místa.",
"settingsPageTitle": "Nastavení",
"settingsPageSystemLabel": "systém",
"settingsPageLightLabel": "světlý",
"settingsPageDarkLabel": "tmavý",
"settingsPageVersionLabel": "Verze",
"settingsPageCopyrightLabel": "Autorská práva"
}
47 changes: 38 additions & 9 deletions lib/src/localization/app_de.arb
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
{
"appTitle": "NWT Reading",
"planEditPageTitle": "Editiere Plan",
"@planEditPageTitle": {
"description": "Der Titel der editiere Plan Seite"
},
"plansPageTitle": "Biblelese-Pläne",
"noPlanYet": "Noch kein Bibelleseplan da. Füge einen hinzu.",
"addPlanTooltip": "Hinzufügen",
"goToBookmarkTooltip": "Springe zum Lesezeichen"
"@@locale": "de",
"@@comment": "(c) searchwork.org",
"appTitle": "NWT Lesen",
"plansPageTitle": "Bibel-Lesepläne",
"plansPageNoPlanYet": "Noch kein Bibel-Leseplan. Füge einen hinzu.",
"plansPageAddPlanTooltip": "Hinzufügen",
"plansPageCardRemainingDays": "{remainingDays}T",
"schedulePageJumpToBookmarkTooltip": "Springe zum Lesezeichen",
"schedulePageEventCommonEraTerm": "{isCE, select, true{u. Z.} other{v. u. Z.}}",
"schedulePageToggleReadDialogTitle": "Lesestatus ändern",
"schedulePageToggleReadDialogText": "Möchtest du alle vorherigen Abschnitte als gelesen und alle folgenden als ungelesen markieren?",
"planEditPageTitle": "Plan bearbeiten",
"planEditPageChronologicalLabel": "chronologisch",
"planEditPageSequentialLabel": "sequenziell",
"planEditPageAsWrittenLabel": "wie geschrieben",
"planEditPageThreeMonthsLabel": "3 Monate",
"planEditPageSixMonthsLabel": "6 Monate",
"planEditPageOneYearLabel": "1 Jahr",
"planEditPageTwoYearsLabel": "2 Jahre",
"planEditPageFourYearsLabel": "4 Jahre",
"planEditPageLanguageLabel": "Sprache",
"planEditPageWithTargetDateTitle": "Mit Zieltermin",
"planEditPageWithTargetDateSubtitle": "Verfolge das tägliche Lesen mit einem Zieltermin.",
"planEditPageWithTargetDateStatusSubtitle": "Der Zieltermin ist {targetDate}. Du bist {direction, select, other{im Zeitplan} ahead{{deviationDays} Tage voraus} behind{{deviationDays} Tage im Rückstand}} mit dem Lesen.",
"planEditPageResetTargetDateTitle": "Zieltermin zurücksetzen",
"planEditPageResetTargetDateSubtitle": "Ändere den Zieltermin auf {targetDate}, um im Zeitplan zu sein.",
"planEditPageResetTargetDateDialogTitle": "Zurücksetzen des Zieltermins bestätigen",
"planEditPageResetTargetDateDialogText": "Möchtest du den Zieltermin ändern, um im Zeitplan zu sein?",
"planEditPageShowEventsTitle": "Ereignisse anzeigen",
"planEditPageShowEventsSubtitle": "Zeige in den Abschnitten Ereignisse mit Daten an, wann sie passiert sind.",
"planEditPageShowLocationsTitle": "Orte anzeigen",
"planEditPageShowLocationsSubtitle": "Zeige in den Abschnitten die erwähnten Orte an.",
"settingsPageTitle": "Einstellungen",
"settingsPageSystemLabel": "System",
"settingsPageLightLabel": "Hell",
"settingsPageDarkLabel": "Dunkel",
"settingsPageVersionLabel": "Version",
"settingsPageCopyrightLabel": "Urheberrecht"
}
171 changes: 164 additions & 7 deletions lib/src/localization/app_en.arb
Original file line number Diff line number Diff line change
@@ -1,17 +1,174 @@
{
"@@locale": "en",
"@@comment": "(c) searchwork.org",
"appTitle": "NWT Reading",
"@appTitle": {
"description": "The title of the application"
},
"planEditPageTitle": "Edit Plan",
"@planEditPageTitle": {
"description": "The title of the edit plan page"
},
"plansPageTitle": "Bible Reading Plans",
"@plansPageTitle": {
"description": "The title of the plans page"
},
"noPlanYet": "No Bible reading plan yet. Try adding one.",
"addPlanTooltip": "Add",
"goToBookmarkTooltip": "Jump to bookmark"
"plansPageNoPlanYet": "No Bible reading plan yet. Add one.",
"@plansPageNoPlanYet": {
"description": "The message on the plans page when there is no plan yet"
},
"plansPageAddPlanTooltip": "Add",
"@plansPageAddPlanTooltip": {
"description": "The tooltip on the add plan button on the plans page"
},
"plansPageCardRemainingDays": "{remainingDays}d",
"@plansPageCardRemainingDays": {
"description": "Displaying the remaining days on the card (number of days with a suffix d as abbreviation for days)",
"placeholders": {
"remainingDays": {
"type": "num"
}
}
},
"schedulePageJumpToBookmarkTooltip": "Jump to bookmark",
"@schedulePageJumpToBookmarkTooltip": {
"description": "The tooltip on the jump to bookmark button on the schedule page"
},
"schedulePageEventCommonEraTerm": "{isCE, select, true{C.E.} other{B.C.E}}",
"@schedulePageEventCommonEraTerm": {
"description": "The common era term in the events on the schedule page.",
"placeholders": {
"isCE": {
"type": "String"
}
}
},
"schedulePageToggleReadDialogTitle": "Toggling read",
"@schedulePageToggleReadDialogTitle": {
"description": "The title on the toggle read confirmation dialog on the schedule page"
},
"schedulePageToggleReadDialogText": "Do you want to set all prior sections as been read and all following to unread?",
"@schedulePageToggleReadDialogText": {
"description": "The text on the toggle read confirmation dialog on the schedule page"
},
"planEditPageTitle": "Edit Plan",
"@planEditPageTitle": {
"description": "The title of the plan edit page"
},
"planEditPageChronologicalLabel": "chronological",
"@planEditPageChronologicalLabel": {
"description": "The chronological segment label on the plan edit page"
},
"planEditPageSequentialLabel": "sequential",
"@planEditPageSequentialLabel": {
"description": "The sequential segment label on the plan edit page"
},
"planEditPageAsWrittenLabel": "as written",
"@planEditPageAsWrittenLabel": {
"description": "The as written segment label on the plan edit page"
},
"planEditPageThreeMonthsLabel": "3 months",
"@planEditPageThreeMonthsLabel": {
"description": "The three months segment label on the plan edit page"
},
"planEditPageSixMonthsLabel": "6 months",
"@planEditPageSixMonthsLabel": {
"description": "The six months segment label on the plan edit page"
},
"planEditPageOneYearLabel": "1 year",
"@planEditPageOneYearLabel": {
"description": "The one year segment label on the plan edit page"
},
"planEditPageTwoYearsLabel": "2 years",
"@planEditPageTwoYearsLabel": {
"description": "The two years segment label on the plan edit page"
},
"planEditPageFourYearsLabel": "4 years",
"@planEditPageFourYearsLabel": {
"description": "The four years segment label on the plan edit page"
},
"planEditPageLanguageLabel": "Language",
"@planEditPageLanguageLabel": {
"description": "The language label on the plan edit page"
},
"planEditPageWithTargetDateTitle": "With Target Date",
"@planEditPageWithTargetDateTitle": {
"description": "The with target date title on the plan edit page"
},
"planEditPageWithTargetDateSubtitle": "Track daily reading with a target date.",
"@planEditPageWithTargetDateSubtitle": {
"description": "The with target date subtitle on the plan edit page"
},
"planEditPageWithTargetDateStatusSubtitle": "The target date is {targetDate}. You are {direction, select, other{on time} ahead{{deviationDays} days ahead} behind{{deviationDays} days behind}} with reading.",
"@planEditPageWithTargetDateStatusSubtitle": {
"description": "The with target date status subtitle on the plan edit page",
"placeholders": {
"targetDate": {
"type": "String"
},
"direction": {
"type": "String"
},
"deviationDays": {
"type": "num"
}
}
},
"planEditPageResetTargetDateTitle": "Reset Target Date",
"@planEditPageResetTargetDateTitle": {
"description": "The reset target date title on the plan edit page"
},
"planEditPageResetTargetDateSubtitle": "Change target date to {targetDate} to be on time with reading.",
"@planEditPageResetTargetDateSubtitle": {
"description": "The reset target date subtitle on the plan edit page",
"placeholders": {
"targetDate": {
"type": "String"
}
}
},
"planEditPageResetTargetDateDialogTitle": "Confirm resetting target date",
"@planEditPageResetTargetDateDialogTitle": {
"description": "The title on the reset target date confirmation dialog on the plan edit page"
},
"planEditPageResetTargetDateDialogText": "Do you want to change the target date to be on time with reading?",
"@planEditPageResetTargetDateDialogText": {
"description": "The text on the reset target date confirmation dialog on the plan edit page"
},
"planEditPageShowEventsTitle": "Show Events",
"@planEditPageShowEventsTitle": {
"description": "The show events title on the plan edit page"
},
"planEditPageShowEventsSubtitle": "Show in the sections events with dates, when they happened.",
"@planEditPageShowEventsSubtitle": {
"description": "The show events subtitle on the plan edit page"
},
"planEditPageShowLocationsTitle": "Show Locations",
"@planEditPageShowLocationsTitle": {
"description": "The show locations title on the plan edit page"
},
"planEditPageShowLocationsSubtitle": "Show in the sections the referred locations.",
"@planEditPageShowLocationsSubtitle": {
"description": "The show locations subtitle on the plan edit page"
},
"settingsPageTitle": "Settings",
"@settingsPageTitle": {
"description": "The title of the settings page"
},
"settingsPageSystemLabel": "system",
"@settingsPageSystemLabel": {
"description": "The system segment label on the settings page"
},
"settingsPageLightLabel": "light",
"@settingsPageLightLabel": {
"description": "The light segment label on the settings page"
},
"settingsPageDarkLabel": "dark",
"@settingsPageDarkLabel": {
"description": "The dark segment label on the settings page"
},
"settingsPageVersionLabel": "Version",
"@settingsPageVersionLabel": {
"description": "The version label on the settings page"
},
"settingsPageCopyrightLabel": "Copyright",
"@settingsPageCopyrightLabel": {
"description": "The copyright label on the settings page"
}
}
40 changes: 40 additions & 0 deletions lib/src/localization/app_es.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"@@locale": "es",
"@@comment": "(c) searchwork.org",
"appTitle": "Lectura NWT",
"plansPageTitle": "Planes de Lectura de la Biblia",
"plansPageNoPlanYet": "Aún no hay un plan de lectura de la Biblia. Añade uno.",
"plansPageAddPlanTooltip": "Añadir",
"plansPageCardRemainingDays": "{remainingDays}d",
"schedulePageJumpToBookmarkTooltip": "Saltar al marcador",
"schedulePageEventCommonEraTerm": "{isCE, select, true{d.C.} other{a.C.}}",
"schedulePageToggleReadDialogTitle": "Alternar lectura",
"schedulePageToggleReadDialogText": "¿Quieres marcar todas las secciones anteriores como leídas y todas las siguientes como no leídas?",
"planEditPageTitle": "Editar Plan",
"planEditPageChronologicalLabel": "cronológico",
"planEditPageSequentialLabel": "secuencial",
"planEditPageAsWrittenLabel": "como está escrito",
"planEditPageThreeMonthsLabel": "3 meses",
"planEditPageSixMonthsLabel": "6 meses",
"planEditPageOneYearLabel": "1 año",
"planEditPageTwoYearsLabel": "2 años",
"planEditPageFourYearsLabel": "4 años",
"planEditPageLanguageLabel": "Idioma",
"planEditPageWithTargetDateTitle": "Con Fecha Objetivo",
"planEditPageWithTargetDateSubtitle": "Sigue la lectura diaria con una fecha objetivo.",
"planEditPageWithTargetDateStatusSubtitle": "La fecha objetivo es {targetDate}. Estás {direction, select, other{en el horario} ahead{{deviationDays} días adelantado} behind{{deviationDays} días atrasado}} con la lectura.",
"planEditPageResetTargetDateTitle": "Restablecer Fecha Objetivo",
"planEditPageResetTargetDateSubtitle": "Cambia la fecha objetivo a {targetDate} para estar en el horario de lectura.",
"planEditPageResetTargetDateDialogTitle": "Confirmar restablecimiento de fecha objetivo",
"planEditPageResetTargetDateDialogText": "¿Quieres cambiar la fecha objetivo para estar en el horario de lectura?",
"planEditPageShowEventsTitle": "Mostrar Eventos",
"planEditPageShowEventsSubtitle": "Muestra en las secciones los eventos con fechas, cuando ocurrieron.",
"planEditPageShowLocationsTitle": "Mostrar Ubicaciones",
"planEditPageShowLocationsSubtitle": "Muestra en las secciones las ubicaciones mencionadas.",
"settingsPageTitle": "Configuraciones",
"settingsPageSystemLabel": "sistema",
"settingsPageLightLabel": "claro",
"settingsPageDarkLabel": "oscuro",
"settingsPageVersionLabel": "Versión",
"settingsPageCopyrightLabel": "Derechos de autor"
}
Loading

0 comments on commit 0733c20

Please sign in to comment.