mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-01 08:45:16 +08:00
feat: Per-app language preferences
This commit is contained in:
@@ -37,6 +37,8 @@ android {
|
|||||||
|
|
||||||
/** 添加 App Center Secret 到 BuildConfig */
|
/** 添加 App Center Secret 到 BuildConfig */
|
||||||
buildConfigField('String', 'APP_CENTER_SECRET', "\"${getAppCenterSecret()}\"")
|
buildConfigField('String', 'APP_CENTER_SECRET', "\"${getAppCenterSecret()}\"")
|
||||||
|
|
||||||
|
resourceConfigurations += ["en", "ja", "zh_CN", "zh_HK", "zh_MO", "zh_TW"]
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
@@ -17,7 +17,8 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.AppErrorsTracking">
|
android:theme="@style/Theme.AppErrorsTracking"
|
||||||
|
android:localeConfig="@xml/locales_config">
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="xposedmodule"
|
android:name="xposedmodule"
|
||||||
|
9
app/src/main/res/xml/locales_config.xml
Normal file
9
app/src/main/res/xml/locales_config.xml
Normal file
@@ -0,0 +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-config>
|
@@ -35,6 +35,8 @@ android {
|
|||||||
|
|
||||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
consumerProguardFiles 'consumer-rules.pro'
|
consumerProguardFiles 'consumer-rules.pro'
|
||||||
|
|
||||||
|
resourceConfigurations += ["en", "ja", "zh_CN", "zh_HK", "zh_MO", "zh_TW"]
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
@@ -8,7 +8,8 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.AppErrorsDemo">
|
android:theme="@style/Theme.AppErrorsDemo"
|
||||||
|
android:localeConfig="@xml/locales_config">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.activity.MainActivity"
|
android:name=".ui.activity.MainActivity"
|
||||||
|
9
demo-app/src/main/res/xml/locales_config.xml
Normal file
9
demo-app/src/main/res/xml/locales_config.xml
Normal file
@@ -0,0 +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-config>
|
Reference in New Issue
Block a user