Merge branch 'claude/mystifying-meitner-3b8553': fix Asturian boot-splash locale
This commit is contained in:
commit
a96049dd36
2 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue