Skip to content
This repository was archived by the owner on May 26, 2024. It is now read-only.

Commit 710cad4

Browse files
committed
hotfix
1 parent 61d95ba commit 710cad4

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import 'package:system_theme/system_theme.dart';
2727
import 'package:window_manager/window_manager.dart';
2828

2929
final bool micaSupported = SysInfo.operatingSystemName.contains('Windows 11');
30+
final supportedLocales = ['en', 'de', 'pl', 'ru'];
3031
Box box = Hive.box('data');
3132
String applicationDocumentsDirectory = '';
3233

@@ -48,7 +49,7 @@ void main() async {
4849
await StorageHelper.initialiseHive();
4950
var delegate = await LocalizationDelegate.create(
5051
fallbackLocale: 'en',
51-
supportedLocales: ['en', 'de', 'pl', 'ru'],
52+
supportedLocales: supportedLocales,
5253
preferences: TranslatePreferences(),
5354
);
5455
if (micaSupported) {

lib/widgets/navigation_bar.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class _NavigationBarState extends State<NavigationBar> {
4949

5050
@override
5151
void initState() {
52-
Jiffy.locale(AppLocale().getLocale().languageCode);
52+
Jiffy.locale(supportedLocales.contains(AppLocale().getLocale().languageCode) ? AppLocale().getLocale().languageCode : 'en');
5353
Timer.run(() {
5454
try {
5555
ProfileService.generateFiles();

0 commit comments

Comments
 (0)