From ccc50d720efa7d386f184015be4371b61db852fc Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Tue, 19 Sep 2023 05:10:35 +0800 Subject: [PATCH] feat: add i18n strings --- .../apperrorstracking/locale/LocaleString.kt | 14 +++++++++++++- .../src/main/res/values-ja/strings.xml | 2 ++ .../src/main/res/values-zh-rCN/strings.xml | 2 ++ .../src/main/res/values-zh-rHK/strings.xml | 2 ++ .../src/main/res/values-zh-rMO/strings.xml | 2 ++ .../src/main/res/values-zh-rTW/strings.xml | 2 ++ .../src/main/res/values/strings.xml | 2 ++ 7 files changed, 25 insertions(+), 1 deletion(-) rename {app => module-app}/src/main/java/com/fankes/apperrorstracking/locale/LocaleString.kt (97%) rename {app => module-app}/src/main/res/values-ja/strings.xml (97%) rename {app => module-app}/src/main/res/values-zh-rCN/strings.xml (97%) rename {app => module-app}/src/main/res/values-zh-rHK/strings.xml (97%) rename {app => module-app}/src/main/res/values-zh-rMO/strings.xml (97%) rename {app => module-app}/src/main/res/values-zh-rTW/strings.xml (97%) rename {app => module-app}/src/main/res/values/strings.xml (97%) diff --git a/app/src/main/java/com/fankes/apperrorstracking/locale/LocaleString.kt b/module-app/src/main/java/com/fankes/apperrorstracking/locale/LocaleString.kt similarity index 97% rename from app/src/main/java/com/fankes/apperrorstracking/locale/LocaleString.kt rename to module-app/src/main/java/com/fankes/apperrorstracking/locale/LocaleString.kt index 21c12b0..994a4d9 100644 --- a/app/src/main/java/com/fankes/apperrorstracking/locale/LocaleString.kt +++ b/module-app/src/main/java/com/fankes/apperrorstracking/locale/LocaleString.kt @@ -49,7 +49,7 @@ object LocaleString { */ private val resources get() = baseContext?.resources ?: basePackageParam?.moduleAppResources ?: baseResources - ?: error("LocaleString must bind an instance first") + ?: error("LocaleString must bind an instance first") /** * 绑定并初始化 @@ -562,4 +562,16 @@ object LocaleString { /** @string Automatic generated */ fun recordCount(vararg objArrs: Any) = R.string.record_count.bind(*objArrs) + + /** @string Automatic generated */ + val ciNoticeDialogTitle get() = ciNoticeDialogTitle() + + /** @string Automatic generated */ + fun ciNoticeDialogTitle(vararg objArrs: Any) = R.string.ci_notice_dialog_title.bind(*objArrs) + + /** @string Automatic generated */ + val ciNoticeDialogContent get() = ciNoticeDialogContent() + + /** @string Automatic generated */ + fun ciNoticeDialogContent(vararg objArrs: Any) = R.string.ci_notice_dialog_content.bind(*objArrs) } \ No newline at end of file diff --git a/app/src/main/res/values-ja/strings.xml b/module-app/src/main/res/values-ja/strings.xml similarity index 97% rename from app/src/main/res/values-ja/strings.xml rename to module-app/src/main/res/values-ja/strings.xml index 1f5dec4..3cff8b6 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/module-app/src/main/res/values-ja/strings.xml @@ -146,4 +146,6 @@ %1$s に投稿\n\n変更ログ\n\n%2$s 更新 %1$s の合計紀錄 + CI 自動ビルド手順 + コミット ID %1$s の CI 自動ビルドを使用しています。\n\nコードが送信された後、自動的にトリガーされてビルドされ、自動的にコンパイルされてリリースされますが、安定性についてはテストされていません。ご自身の責任で使用してください。 \ No newline at end of file diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/module-app/src/main/res/values-zh-rCN/strings.xml similarity index 97% rename from app/src/main/res/values-zh-rCN/strings.xml rename to module-app/src/main/res/values-zh-rCN/strings.xml index e11c34e..f538295 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/module-app/src/main/res/values-zh-rCN/strings.xml @@ -146,4 +146,6 @@ 发布于 %1$s\n\n更新日志\n\n%2$s 更新 共 %1$s 条记录 + CI 自动构建说明 + 你正在使用的是 CI 自动构建版本,Commit ID 为 %1$s。\n\n它是由代码提交后自动触发并构建、自动编译发布的,并未经任何稳定性测试,使用风险自负。 \ No newline at end of file diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/module-app/src/main/res/values-zh-rHK/strings.xml similarity index 97% rename from app/src/main/res/values-zh-rHK/strings.xml rename to module-app/src/main/res/values-zh-rHK/strings.xml index c22399c..1ac4f7b 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/module-app/src/main/res/values-zh-rHK/strings.xml @@ -146,4 +146,6 @@ 發佈於 %1$s\n\n更新日誌\n\n%2$s 升級 共 %1$s 條紀錄 + CI 自動建置說明 + 你正在使用的是 CI 自動建置版本,Commit ID 為 %1$s。\n\n它是由程式碼提交後自動觸發並建置、自動編譯發布的,並未經任何穩定性測試,使用風險自負。 \ No newline at end of file diff --git a/app/src/main/res/values-zh-rMO/strings.xml b/module-app/src/main/res/values-zh-rMO/strings.xml similarity index 97% rename from app/src/main/res/values-zh-rMO/strings.xml rename to module-app/src/main/res/values-zh-rMO/strings.xml index 988738b..6288b38 100644 --- a/app/src/main/res/values-zh-rMO/strings.xml +++ b/module-app/src/main/res/values-zh-rMO/strings.xml @@ -146,4 +146,6 @@ 發佈於 %1$s\n\n更新日誌\n\n%2$s 升級 共 %1$s 條紀錄 + CI 自動建置說明 + 你正在使用的是 CI 自動建置版本,Commit ID 為 %1$s。\n\n它是由程式碼提交後自動觸發並建置、自動編譯發布的,並未經任何穩定性測試,使用風險自負。 \ No newline at end of file diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/module-app/src/main/res/values-zh-rTW/strings.xml similarity index 97% rename from app/src/main/res/values-zh-rTW/strings.xml rename to module-app/src/main/res/values-zh-rTW/strings.xml index 391419d..fc32d9e 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/module-app/src/main/res/values-zh-rTW/strings.xml @@ -146,4 +146,6 @@ 發佈於 %1$s\n\n更新日誌\n\n%2$s 升級 共 %1$s 條紀錄 + CI 自動建置說明 + 你正在使用的是 CI 自動建置版本,Commit ID 為 %1$s。\n\n它是由程式碼提交後自動觸發並建置、自動編譯發布的,並未經任何穩定性測試,使用風險自負。 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/module-app/src/main/res/values/strings.xml similarity index 97% rename from app/src/main/res/values/strings.xml rename to module-app/src/main/res/values/strings.xml index 18f7f6b..ec850c7 100644 --- a/app/src/main/res/values/strings.xml +++ b/module-app/src/main/res/values/strings.xml @@ -147,4 +147,6 @@ Released on %1$s\n\nChangelog\n\n%2$s Update %1$s records found + CI Auto Build Instruction + You are using a CI automated build with Commit ID %1$s.\n\nIt is automatically triggered and built after the code is committed, automatically compiled and released, and has not been tested for stability, use it at your own risk. \ No newline at end of file