Modify refactor the locales config code

This commit is contained in:
2023-05-09 11:51:11 +08:00
parent 3a7c97a1ac
commit 4afe549a8d
6 changed files with 18 additions and 19 deletions

View File

@@ -37,8 +37,6 @@ android {
/** 添加 App Center Secret 到 BuildConfig */
buildConfigField('String', 'APP_CENTER_SECRET', "\"${getAppCenterSecret()}\"")
resourceConfigurations += ["en", "ja", "zh_CN", "zh_HK", "zh_MO", "zh_TW"]
}
buildTypes {

View File

@@ -15,10 +15,11 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:localeConfig="@xml/locales_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppErrorsTracking"
android:localeConfig="@xml/locales_config">
tools:targetApi="tiramisu">
<meta-data
android:name="xposedmodule"

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
<locale android:name="en"/> <!-- English -->
<locale android:name="ja"/> <!-- Japanese -->
<locale android:name="zh-Hans-CN"/> <!-- Chinese (Simplified) -->
<locale android:name="zh-Hant-HK"/> <!-- Chinese (Hong Kong) -->
<locale android:name="zh-Hant-MO"/> <!-- Chinese (Macau) -->
<locale android:name="zh-Hant-TW"/> <!-- Chinese (Taiwan) -->
<locale android:name="en" />
<locale android:name="ja" />
<locale android:name="zh-Hans-CN" />
<locale android:name="zh-Hant-HK" />
<locale android:name="zh-Hant-MO" />
<locale android:name="zh-Hant-TW" />
</locale-config>

View File

@@ -35,8 +35,6 @@ android {
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
consumerProguardFiles 'consumer-rules.pro'
resourceConfigurations += ["en", "ja", "zh_CN", "zh_HK", "zh_MO", "zh_TW"]
}
buildTypes {

View File

@@ -1,15 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:name=".application.DemoApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:localeConfig="@xml/locales_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppErrorsDemo"
android:localeConfig="@xml/locales_config">
tools:targetApi="tiramisu">
<activity
android:name=".ui.activity.MainActivity"

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
<locale android:name="en"/> <!-- English -->
<locale android:name="ja"/> <!-- Japanese -->
<locale android:name="zh-Hans-CN"/> <!-- Chinese (Simplified) -->
<locale android:name="zh-Hant-HK"/> <!-- Chinese (Hong Kong) -->
<locale android:name="zh-Hant-MO"/> <!-- Chinese (Macau) -->
<locale android:name="zh-Hant-TW"/> <!-- Chinese (Taiwan) -->
<locale android:name="en" />
<locale android:name="ja" />
<locale android:name="zh-Hans-CN" />
<locale android:name="zh-Hant-HK" />
<locale android:name="zh-Hant-MO" />
<locale android:name="zh-Hant-TW" />
</locale-config>