From 0818f0ade6580cfd9f6e3b5fb38fced7ea6b1eda Mon Sep 17 00:00:00 2001 From: WinCS <94188592+Meltartica@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:55:42 +0800 Subject: [PATCH] fix: `zh_CN` and `zh_TW` translations contributor link; improve: complexity in customize.sh This commit fixes the contributor link for Chinese translations and improves the complexity in customise.sh by reducing it. --- TRANSLATOR.md | 4 ++-- module/src/customize.sh | 26 ++++++-------------------- webroot/lang/zh_CN.json | 10 +++++----- webroot/lang/zh_TW.json | 14 +++++++------- 4 files changed, 20 insertions(+), 34 deletions(-) diff --git a/TRANSLATOR.md b/TRANSLATOR.md index a04dcc7..e74136c 100644 --- a/TRANSLATOR.md +++ b/TRANSLATOR.md @@ -6,8 +6,8 @@ - **ro_RO** by [@ExtremeXT](https://github.com/ExtremeXT) - **ru_RU** by [@Emulond](https://github.com/Emulond) - **vi_VN** by [@RainyXeon](https://github.com/RainyXeon) -- **zh_CN** by [@Meltartical](https://github.com/Meltartical) -- **zh_TW** by [@Meltartical](https://github.com/Meltartical) +- **zh_CN** by [@Meltartica](https://github.com/Meltartica) +- **zh_TW** by [@Meltartica](https://github.com/Meltartica) > [!NOTE] > Want to add your translation? Go to [Crowdin](https://crowdin.com/project/rezygisk) and translate! \ No newline at end of file diff --git a/module/src/customize.sh b/module/src/customize.sh index 47d4fea..d81d577 100644 --- a/module/src/customize.sh +++ b/module/src/customize.sh @@ -126,14 +126,9 @@ extract "$ZIPFILE" 'webroot/js/list/module.js' "$MODPATH/webroot/js/list" true extract "$ZIPFILE" 'webroot/js/list/settings.js' "$MODPATH/webroot/js/list" true extract "$ZIPFILE" 'webroot/js/list/language.js' "$MODPATH/webroot/js/list" true -extract "$ZIPFILE" 'webroot/lang/en_US.json' "$MODPATH/webroot/lang" true -extract "$ZIPFILE" 'webroot/lang/ja_JP.json' "$MODPATH/webroot/lang" true -extract "$ZIPFILE" 'webroot/lang/pt_BR.json' "$MODPATH/webroot/lang" true -extract "$ZIPFILE" 'webroot/lang/ro_RO.json' "$MODPATH/webroot/lang" true -extract "$ZIPFILE" 'webroot/lang/ru_RU.json' "$MODPATH/webroot/lang" true -extract "$ZIPFILE" 'webroot/lang/vi_VN.json' "$MODPATH/webroot/lang" true -extract "$ZIPFILE" 'webroot/lang/zh_CN.json' "$MODPATH/webroot/lang" true -extract "$ZIPFILE" 'webroot/lang/zh_TW.json' "$MODPATH/webroot/lang" true +for lang in en_US ja_JP pt_BR ro_RO ru_RU vi_VN zh_CN zh_TW; do + extract "$ZIPFILE" "webroot/lang/${lang}.json" "$MODPATH/webroot/lang" true +done extract "$ZIPFILE" 'webroot/js/modal/language.js' "$MODPATH/webroot/js/modal" true extract "$ZIPFILE" 'webroot/js/modal/errorHistory.js' "$MODPATH/webroot/js/modal" true @@ -146,18 +141,9 @@ extract "$ZIPFILE" 'webroot/css/fonts.css' "$MODPATH/webroot/css" true extract "$ZIPFILE" 'webroot/fonts/ProductSans-Italic.ttf' "$MODPATH/webroot/fonts" true extract "$ZIPFILE" 'webroot/fonts/ProductSans-Regular.ttf' "$MODPATH/webroot/fonts" true -extract "$ZIPFILE" 'webroot/assets/mark.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/tick.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/warn.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/light.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/dark.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/module.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/expand.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/settings.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/close.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/lang.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/content.svg' "$MODPATH/webroot/assets" true -extract "$ZIPFILE" 'webroot/assets/error.svg' "$MODPATH/webroot/assets" true +for svg in mark tick warn light dark module expand settings close lang content error; do + extract "$ZIPFILE" "webroot/assets/${svg}.svg" "$MODPATH/webroot/assets" true +done if [ "$ARCH" = "x86" ] || [ "$ARCH" = "x64" ]; then ui_print "- Extracting x86 libraries" diff --git a/webroot/lang/zh_CN.json b/webroot/lang/zh_CN.json index 42b1e39..bbb9a77 100644 --- a/webroot/lang/zh_CN.json +++ b/webroot/lang/zh_CN.json @@ -12,7 +12,7 @@ "partially": "ReZygisk部分正常运行!" }, "version": "版本", - "root": "根实现", + "root": "Root实现", "zygote": { "injected": "已注入", "notInjected": "注入失败", @@ -26,7 +26,7 @@ "settings": { "header": "设置", "daemonButton": { - "start": "开启", + "start": "启动", "stop": "停止", "exit": "退出" } @@ -43,12 +43,12 @@ }, "errorHistory": { "header": "错误记录", - "placeholder": "未发现任何错误!" + "placeholder": "未发现任何错误!" }, "switcher": { "font": { - "header": "Enable system font", - "description": "This option will enable system font in current WebUI. NOTE: May not be compatible with FlipFont" + "header": "使用系统字体", + "description": "此选项将在当前界面中使用系统字体。注意:可能与 FlipFont 不兼容" } } } diff --git a/webroot/lang/zh_TW.json b/webroot/lang/zh_TW.json index 16e845d..9be4bc1 100644 --- a/webroot/lang/zh_TW.json +++ b/webroot/lang/zh_TW.json @@ -13,7 +13,7 @@ "partially": "ReZygisk部分正常運作!" }, "version": "版本", - "root": "根實現", + "root": "Root實現", "zygote": { "injected": "已註入", "notInjected": "注入失敗", @@ -27,7 +27,7 @@ "settings": { "header": "設定", "daemonButton": { - "start": "開啟", + "start": "啟動", "stop": "停止", "exit": "退出" } @@ -35,8 +35,8 @@ "cmdErrors": { "ptrace64": "執行zygisk-ptrace64時發生錯誤", "ptrace32": "執行zygisk-ptrace32時發生錯誤", - "ls": "列出模塊zygisk文件夾中的文件時出現錯誤", - "cat": "讀取模塊module.prop時出現錯誤", + "ls": "列出模組zygisk文件夾中的文件時出現錯誤", + "cat": "讀取模組module.prop時出現錯誤", "find": "查找zygisk模塊時出現錯誤" }, "global": { @@ -44,12 +44,12 @@ }, "errorHistory": { "header": "錯誤記錄", - "placeholder": "未發現任何錯誤!" + "placeholder": "未發現任何錯誤!" }, "switcher": { "font": { - "header": "Enable system font", - "description": "This option will enable system font in current WebUI. NOTE: May not be compatible with FlipFont" + "header": "使用系統字體", + "description": "此選項將在目前介面中使用系統字體。注意:可能與 FlipFont 不相容" } } }