Tweak locale fallback logic
This commit is contained in:
parent
88572fd7af
commit
3c03ff738d
@ -1,4 +1,3 @@
|
||||
[](https://codemagic.io/apps/62c5bf4e59f5e09fd24b0994/62c5bf4e59f5e09fd24b0993/latest_build)
|
||||
# Wonderous
|
||||
<p align="center">
|
||||
<img src="https://user-images.githubusercontent.com/736973/187334196-b79e48b2-dbb8-4ea7-8aac-04dbc7e5159f.png#gh-dark-mode-only">
|
||||
|
@ -17,6 +17,9 @@ class LocaleLogic {
|
||||
// Uncomment for testing in chinese
|
||||
// locale = Locale('zh');
|
||||
}
|
||||
if (AppLocalizations.supportedLocales.contains(locale) == false) {
|
||||
locale = Locale('en');
|
||||
}
|
||||
_strings = await AppLocalizations.delegate.load(locale);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user