Merge branch 'develop_liyi' into canary_release

This commit is contained in:
Liuyf 2025-04-02 13:35:40 +08:00
commit 9f4ffbe573
3 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,6 @@
import 'dart:ui';
import 'package:get/get.dart';
import 'package:star_lock/app_settings/app_settings.dart';
import '../tools/app_manager.dart';
@ -54,8 +55,8 @@ extension ExtensionAppDept on AppDept {
const Locale fiL = Locale('fi', 'FI');
const Locale daL = Locale('da', 'DK');
const Locale ukL = Locale('uk', 'UA');
const Locale hiL = Locale('hi', 'HI');
const Locale urL = Locale('ur', 'UR');
const Locale hiL = Locale('hi', 'IN');
const Locale urL = Locale('ur', 'PK');
const Locale srCyrillic = Locale('sr', 'RS');
return [
@ -186,7 +187,6 @@ enum LanguageType {
hindi,
//
urdu,
}
extension ExtensionLanguageType on LanguageType {

View File

@ -78,6 +78,8 @@ class TranslationLoader {
static Map<String, String> _idMap = <String, String>{};
static Map<String, String> _fiMap = <String, String>{};
static Map<String, String> _daMap = <String, String>{};
static Map<String, String> _hiMap = <String, String>{};
static Map<String, String> _urMap = <String, String>{};
static Map<String, String> get zhDic => _zhMap;
static Map<String, String> get enDic => _enMap;
@ -118,6 +120,8 @@ class TranslationLoader {
static Map<String, String> get daDic => _daMap;
static Map<String, String> get ukMap => _ukMap;
static Map<String, String> get srMap => _srMap;
static Map<String, String> get hiMap => _hiMap;
static Map<String, String> get urMap => _urMap;
static Future<void> loadTranslation() async {
_zhMap = await _loadJsonFile('lan/lan_zh.json');
@ -159,6 +163,8 @@ class TranslationLoader {
_daMap = await _loadJsonFile('lan/lan_da.json');
_ukMap = await _loadJsonFile('lan/lan_uk.json');
_srMap = await _loadJsonFile('lan/lan_sr_cyrl.json');
_hiMap = await _loadJsonFile('lan/lan_hi.json');
_urMap = await _loadJsonFile('lan/lan_ur.json');
}
static Future<Map<String, String>> _loadJsonFile(String filePath) async =>

View File

@ -40,6 +40,8 @@ class TranslationMessage extends Translations {
'id_ID': TranslationLoader.idDic,
'fi_FI': TranslationLoader.fiDic,
'da_DK': TranslationLoader.daDic,
'hi_IN': TranslationLoader.hiMap,
'ur_PK': TranslationLoader.urMap,
};
void updateLocal(Locale l) => Get.updateLocale(l);