Skip to content

An open-source cross-platform alternative to AirDrop

i18n: rename Chinese files to use region codes

Tien Do Nam33eba09e4081
diff --git a/assets/i18n/_missing_translations_zh_CN.json b/assets/i18n/_missing_translations_zh_CN.json
new file mode 100644
index 00000000..4781a423
--- /dev/null
+++ b/assets/i18n/_missing_translations_zh_CN.json
@@ -0,0 +1,6 @@
+{
+ "@@info": [
+ "Here are translations that exist in <en> but not in <zh-CN>.",
+ "After editing this file, you can run 'flutter pub run slang apply --locale=zh-CN' to quickly apply the newly added translations."
+ ]
+}
diff --git a/assets/i18n/_missing_translations_zh_Hant_HK.json b/assets/i18n/_missing_translations_zh_HK.json
similarity index 62%
rename from assets/i18n/_missing_translations_zh_Hant_HK.json
rename to assets/i18n/_missing_translations_zh_HK.json
index f23d0108..ec3fee3a 100644
--- a/assets/i18n/_missing_translations_zh_Hant_HK.json
+++ b/assets/i18n/_missing_translations_zh_HK.json
@@ -1,7 +1,7 @@
{
"@@info": [
- "Here are translations that exist in <en> but not in <zh-Hant-HK>.",
- "After editing this file, you can run 'flutter pub run slang apply --locale=zh-Hant-HK' to quickly apply the newly added translations."
+ "Here are translations that exist in <en> but not in <zh-HK>.",
+ "After editing this file, you can run 'flutter pub run slang apply --locale=zh-HK' to quickly apply the newly added translations."
],
"settingsTab": {
"general": {
diff --git a/assets/i18n/_missing_translations_zh_Hans.json b/assets/i18n/_missing_translations_zh_Hans.json
deleted file mode 100644
index ebd18bd8..00000000
--- a/assets/i18n/_missing_translations_zh_Hans.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "@@info": [
- "Here are translations that exist in <en> but not in <zh-Hans>.",
- "After editing this file, you can run 'flutter pub run slang apply --locale=zh-Hans' to quickly apply the newly added translations."
- ]
-}
diff --git a/assets/i18n/_missing_translations_zh_Hant_TW.json b/assets/i18n/_missing_translations_zh_Hant_TW.json
deleted file mode 100644
index bba9f681..00000000
--- a/assets/i18n/_missing_translations_zh_Hant_TW.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "@@info": [
- "Here are translations that exist in <en> but not in <zh-Hant-TW>.",
- "After editing this file, you can run 'flutter pub run slang apply --locale=zh-Hant-TW' to quickly apply the newly added translations."
- ]
-}
diff --git a/assets/i18n/_missing_translations_zh_TW.json b/assets/i18n/_missing_translations_zh_TW.json
new file mode 100644
index 00000000..5eb2ea06
--- /dev/null
+++ b/assets/i18n/_missing_translations_zh_TW.json
@@ -0,0 +1,6 @@
+{
+ "@@info": [
+ "Here are translations that exist in <en> but not in <zh-TW>.",
+ "After editing this file, you can run 'flutter pub run slang apply --locale=zh-TW' to quickly apply the newly added translations."
+ ]
+}
diff --git a/assets/i18n/_unused_translations.json b/assets/i18n/_unused_translations.json
index 07e970ea..6de4bea9 100644
--- a/assets/i18n/_unused_translations.json
+++ b/assets/i18n/_unused_translations.json
@@ -35,7 +35,7 @@
"tr": {},
"uk": {},
"ur": {},
- "zh-Hans": {},
- "zh-Hant-HK": {},
- "zh-Hant-TW": {}
+ "zh-CN": {},
+ "zh-HK": {},
+ "zh-TW": {}
}
diff --git a/assets/i18n/strings_zh-Hans.i18n.json b/assets/i18n/strings_zh-CN.i18n.json
similarity index 100%
rename from assets/i18n/strings_zh-Hans.i18n.json
rename to assets/i18n/strings_zh-CN.i18n.json
diff --git a/assets/i18n/strings_zh-Hant_HK.i18n.json b/assets/i18n/strings_zh-HK.i18n.json
similarity index 100%
rename from assets/i18n/strings_zh-Hant_HK.i18n.json
rename to assets/i18n/strings_zh-HK.i18n.json
diff --git a/assets/i18n/strings_zh-Hant_TW.i18n.json b/assets/i18n/strings_zh-TW.i18n.json
similarity index 100%
rename from assets/i18n/strings_zh-Hant_TW.i18n.json
rename to assets/i18n/strings_zh-TW.i18n.json
diff --git a/lib/theme.dart b/lib/theme.dart
index a9bdd3db..f2bd9fc7 100644
--- a/lib/theme.dart
+++ b/lib/theme.dart
@@ -58,7 +58,7 @@ ThemeData getTheme(Brightness brightness, ColorScheme? colorScheme) {
// https://github.com/localsend/localsend/issues/52
fontFamily: checkPlatform([TargetPlatform.windows])
- ? ([AppLocale.zhHans, AppLocale.zhHantHk, AppLocale.zhHantTw, AppLocale.ko, AppLocale.ja].contains(LocaleSettings.currentLocale)
+ ? ([AppLocale.zhCn, AppLocale.zhHk, AppLocale.zhTw, AppLocale.ko, AppLocale.ja].contains(LocaleSettings.currentLocale)
? 'Microsoft YaHei UI'
: 'Segoe UI Variable Display')
: null,