feat(i18n): add Asturian (asturianu) as a language

Adds Asturianu, translated in full (345 strings), plus the wiring to
make a minority language work end to end — the OS language picker is an
unreliable way to reach it, so the in-app choice must be explicit and
remembered.

- Model Asturian as the real `ast` locale (honest, international-by-design),
  not a fake `es-AST` region — slang rejects a 3-letter region anyway.
- Flutter ships no Material/Cupertino/intl localizations for `ast`, so map
  the framework chrome to Spanish (`materialLocaleFor`); the app's own text
  stays Asturian via slang. Fixes an "Invalid locale ast" crash when the
  auto-backup date was formatted with intl.
- Persist the picked language in the keystore (LocaleStore) and restore it
  at startup so it survives restarts and wins over the device locale.
- Settings: add the Asturianu tile; compare the full AppLocale so `es` and
  `ast` aren't both marked selected.

Tests: LocaleStore round-trip, locale switch + Spanish-chrome fallback,
and a regression for the intl date crash under Asturian.
This commit is contained in:
vjrj 2026-07-10 15:43:33 +02:00
parent 8d1a66e7b8
commit c9c764e624
10 changed files with 695 additions and 15 deletions

View file

@ -360,8 +360,11 @@ class _AutoBackupTileState extends State<_AutoBackupTile> {
final subtitle = last == null
? t.backup.autoBackupNone
: t.backup.autoBackupLast(
// Format via the Localizations locale, not the raw app locale:
// Asturian (`ast`) has no `intl` date symbols and would throw,
// but it's mapped to Spanish for the framework (see app.dart).
date: DateFormat.yMMMd(
LocaleSettings.currentLocale.languageCode,
Localizations.localeOf(context).languageCode,
).format(last),
);
return ListTile(