Skip to content

Commit

Permalink
High Priority: System Language incorrectly detected
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkbee1 committed Sep 19, 2024
1 parent 2c346a5 commit 69f83dd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions l10n.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
nullable-getter: false
untranslated-messages-file: lib/l10n/untranslated.json
preferred-supported-locales: en
7 changes: 7 additions & 0 deletions lib/lang/cubit/lang_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ class LangCubit extends Cubit<LangState> {
if (AppLocalizations.supportedLocales
.contains(Locale(newLocale.languageCode))) {
emit(LangState(languageType: newlanguageType, locale: newLocale));
} else {
emit(
LangState(
languageType: newlanguageType,
locale: const Locale('en'),
),
);
}
}
}
16 changes: 8 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -651,10 +651,10 @@ packages:
dependency: "direct main"
description:
name: dio
sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260"
sha256: "0dfb6b6a1979dac1c1245e17cef824d7b452ea29bd33d3467269f9bef3715fb0"
url: "https://pub.dev"
source: hosted
version: "5.7.0"
version: "5.6.0"
dio_cache_interceptor:
dependency: transitive
description:
Expand Down Expand Up @@ -699,10 +699,10 @@ packages:
dependency: "direct main"
description:
name: ed25519_hd_key
sha256: "326608234e986ea826a5db4cf4cd6826058d860875a3fff7926c0725fe1a604d"
sha256: "31e191ec97492873067e46dc9cc0c7d55170559c83a478400feffa0627acaccf"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.3.0"
eip1559:
dependency: transitive
description:
Expand Down Expand Up @@ -1876,10 +1876,10 @@ packages:
dependency: transitive
description:
name: pinenacl
sha256: e5fb0bce1717b7f136f35ee98b5c02b3e6383211f8a77ca882fa7812232a07b9
sha256: "57e907beaacbc3c024a098910b6240758e899674de07d6949a67b52fd984cbdf"
url: "https://pub.dev"
source: hosted
version: "0.3.4"
version: "0.6.0"
platform:
dependency: transitive
description:
Expand Down Expand Up @@ -2408,8 +2408,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "7534512ff7c874251e5b1e1a426f5822a3837b51"
resolved-ref: "7534512ff7c874251e5b1e1a426f5822a3837b51"
ref: "85070e8ddafe5140c0bfd2cb9d569ecf986e7234"
resolved-ref: "85070e8ddafe5140c0bfd2cb9d569ecf986e7234"
url: "https://github.com/autonomy-system/tezart.git"
source: git
version: "2.0.4"
Expand Down

0 comments on commit 69f83dd

Please sign in to comment.