feat(i18n): German localization foundation + locale-aware date picker #704

Merged
raisondetredev merged 1 commit from refs/pull/704/head into main 2026-06-30 23:16:26 +02:00
raisondetredev commented 2026-06-30 23:14:58 +02:00 (Migrated from codeberg.org)

Phase 1 of German support, and it fixes the Sunday-start date picker for PDF study deadlines.

The calendar fix

The weekday picker (showDatePicker in the PDF deadline sheet) started the week on Sunday only because the app hard-pinned supportedLocales: [Locale('en')] — generic English starts on Sunday, while the app's own heatmap/week views are already Monday-first. Now the app follows the device locale (en, de), so a German/EU device resolves to de and Material's date picker starts on Monday.

Foundation

Stands up the gen_l10n pipeline that didn't exist yet:

  • flutter: generate: true, l10n.yaml
  • lib/l10n/app_en.arb (template) + app_de.arb + generated AppLocalizations
  • main.dart: AppLocalizations.delegate + AppLocalizations.supportedLocales, locale follows the device; untranslated keys fall back to English

Pilot

The PDF deadline sheet (the picker's own screen, ~17 strings) is translated end-to-end as the established pattern for the rest of the app. Its widget test now installs the localization delegates; the English assertions are unchanged.

Scope

This is the foundation + one feature. The full app is ~980 strings across 532 files / 33 feature areas — those land in follow-up PRs, area by area. flutter analyze clean on the touched files; the deadline-sheet widget tests pass.

Note: needed a flutter pub get to repoint .dart_tool/package_config.json from a root-owned /root/.pub-cache (a prior sudo'd pub get) to your user cache — unrelated to this change but it was blocking gen-l10n's format step locally.

Phase 1 of German support, and it fixes the **Sunday-start date picker** for PDF study deadlines. ## The calendar fix The weekday picker (`showDatePicker` in the PDF deadline sheet) started the week on **Sunday** only because the app hard-pinned `supportedLocales: [Locale('en')]` — generic English starts on Sunday, while the app's own heatmap/week views are already Monday-first. Now the app **follows the device locale** (en, de), so a German/EU device resolves to `de` and Material's date picker starts on **Monday**. ## Foundation Stands up the `gen_l10n` pipeline that didn't exist yet: - `flutter: generate: true`, `l10n.yaml` - `lib/l10n/app_en.arb` (template) + `app_de.arb` + generated `AppLocalizations` - `main.dart`: `AppLocalizations.delegate` + `AppLocalizations.supportedLocales`, locale follows the device; untranslated keys fall back to English ## Pilot The PDF deadline sheet (the picker's own screen, ~17 strings) is translated **end-to-end** as the established pattern for the rest of the app. Its widget test now installs the localization delegates; the English assertions are unchanged. ## Scope This is the **foundation + one feature**. The full app is ~980 strings across 532 files / 33 feature areas — those land in follow-up PRs, area by area. `flutter analyze` clean on the touched files; the deadline-sheet widget tests pass. Note: needed a `flutter pub get` to repoint `.dart_tool/package_config.json` from a root-owned `/root/.pub-cache` (a prior sudo'd pub get) to your user cache — unrelated to this change but it was blocking gen-l10n's format step locally.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-learn!704
No description provided.