fix: i18n

This commit is contained in:
levi committed 2022-12-13 14:39:51 +08:00
1 parent bf5c7655f2
commit a5f72a22c3
2 files changed
+10 -3

No files matched your search

+8 -1
View File
@@ -147,7 +147,10 @@ class AppController extends GetxController {
extra.themeMode = ThemeMode.system.name;
}
if (extra.locale.isEmpty) {
extra.locale = getLocaleKey(ui.window.locale);
final systemLocale = getLocaleKey(ui.window.locale);
extra.locale = messages.keys.containsKey(systemLocale)
? systemLocale
: getLocaleKey(fallbackLocale);
}
if (extra.bt.trackerSubscribeUrls.isEmpty) {
// default select all tracker subscribe urls
@@ -159,6 +162,10 @@ class AppController extends GetxController {
'${await ExternalPath.getExternalStoragePublicDirectory(ExternalPath.DIRECTORY_DOWNLOADS)}/com.gopeed';
return;
}
if (Util.isIOS()) {
config.downloadDir = 'Documents';
return;
}
if (config.downloadDir.isEmpty) {
if (Util.isWeb()) {