Merge branch 'claude/mystifying-meitner-3b8553': fix Asturian boot-splash locale

This commit is contained in:
vjrj 2026-07-10 20:23:38 +02:00
commit a96049dd36
2 changed files with 3 additions and 2 deletions

View file

@ -267,7 +267,6 @@ class TaneApp extends StatelessWidget {
/// localizations can serve. Asturian (`ast`) has none, so it borrows Spanish /// localizations can serve. Asturian (`ast`) has none, so it borrows Spanish
/// (`es`) for the framework chrome; the app's own strings stay Asturian (they /// (`es`) for the framework chrome; the app's own strings stay Asturian (they
/// come from slang, not from `Localizations`). All other locales pass through. /// come from slang, not from `Localizations`). All other locales pass through.
@visibleForTesting
Locale materialLocaleFor(Locale locale) => Locale materialLocaleFor(Locale locale) =>
locale.languageCode == 'ast' ? const Locale('es') : locale; locale.languageCode == 'ast' ? const Locale('es') : locale;

View file

@ -112,7 +112,9 @@ class BootstrapSplash extends StatelessWidget {
return MaterialApp( return MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
theme: buildTaneTheme(), theme: buildTaneTheme(),
locale: TranslationProvider.of(context).flutterLocale, // Asturian (`ast`) has no bundled Material/Cupertino localizations, so map
// it to Spanish for the framework chrome same as the main app (app.dart).
locale: materialLocaleFor(TranslationProvider.of(context).flutterLocale),
supportedLocales: AppLocaleUtils.supportedLocales, supportedLocales: AppLocaleUtils.supportedLocales,
localizationsDelegates: const [ localizationsDelegates: const [
GlobalMaterialLocalizations.delegate, GlobalMaterialLocalizations.delegate,