i18n: Support per app language settings
This commit is contained in:
parent
7efaf30c75
commit
a5ee00e4cc
|
@ -14,8 +14,8 @@ android {
|
||||||
applicationId = "dev.beefers.vendetta.manager"
|
applicationId = "dev.beefers.vendetta.manager"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 33
|
targetSdk = 33
|
||||||
versionCode = 1070
|
versionCode = 1071
|
||||||
versionName = "1.0.7"
|
versionName = "1.0.71"
|
||||||
|
|
||||||
buildConfigField("String", "GIT_BRANCH", "\"${getCurrentBranch()}\"")
|
buildConfigField("String", "GIT_BRANCH", "\"${getCurrentBranch()}\"")
|
||||||
buildConfigField("String", "GIT_COMMIT", "\"${getLatestCommit()}\"")
|
buildConfigField("String", "GIT_COMMIT", "\"${getLatestCommit()}\"")
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
android:fullBackupContent="@xml/backup_rules"
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
|
android:localeConfig="@xml/locales_config"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@drawable/ic_launcher"
|
android:roundIcon="@drawable/ic_launcher"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package dev.beefers.vendetta.manager.ui.components
|
package dev.beefers.vendetta.manager.ui.components
|
||||||
|
|
||||||
|
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.basicMarquee
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
|
@ -17,6 +19,7 @@ import androidx.compose.ui.graphics.painter.Painter
|
||||||
import androidx.compose.ui.graphics.vector.ImageVector
|
import androidx.compose.ui.graphics.vector.ImageVector
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
|
||||||
|
@OptIn(ExperimentalFoundationApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun RowScope.SegmentedButton(
|
fun RowScope.SegmentedButton(
|
||||||
icon: Any,
|
icon: Any,
|
||||||
|
@ -54,7 +57,9 @@ fun RowScope.SegmentedButton(
|
||||||
Text(
|
Text(
|
||||||
text = text,
|
text = text,
|
||||||
style = MaterialTheme.typography.labelLarge,
|
style = MaterialTheme.typography.labelLarge,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = MaterialTheme.colorScheme.primary,
|
||||||
|
maxLines = 1,
|
||||||
|
modifier = Modifier.basicMarquee()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<locale android:name="af-rZA"/>
|
||||||
|
<locale android:name="ar-rSA"/>
|
||||||
|
<locale android:name="ca-rES"/>
|
||||||
|
<locale android:name="cs-rCZ"/>
|
||||||
|
<locale android:name="da-rDK"/>
|
||||||
|
<locale android:name="de-rDE"/>
|
||||||
|
<locale android:name="el-rGR"/>
|
||||||
|
<locale android:name="en-rUS"/>
|
||||||
|
<locale android:name="es-rES"/>
|
||||||
|
<locale android:name="fi-rFI"/>
|
||||||
|
<locale android:name="fr-rFR"/>
|
||||||
|
<locale android:name="hu-rHU"/>
|
||||||
|
<locale android:name="it-rIT"/>
|
||||||
|
<locale android:name="iw-rIL"/>
|
||||||
|
<locale android:name="ja-rJP"/>
|
||||||
|
<locale android:name="ko-rKR"/>
|
||||||
|
<locale android:name="nl-rNL"/>
|
||||||
|
<locale android:name="no-rNO"/>
|
||||||
|
<locale android:name="pl-rPL"/>
|
||||||
|
<locale android:name="pt-rBR"/>
|
||||||
|
<locale android:name="pt-rPT"/>
|
||||||
|
<locale android:name="ro-rRO"/>
|
||||||
|
<locale android:name="ru-rRU"/>
|
||||||
|
<locale android:name="sr-rSP"/>
|
||||||
|
<locale android:name="sv-rSE"/>
|
||||||
|
<locale android:name="tr-rTR"/>
|
||||||
|
<locale android:name="uk-rUA"/>
|
||||||
|
<locale android:name="vi-rVN"/>
|
||||||
|
<locale android:name="zh-rCN"/>
|
||||||
|
<locale android:name="zh-rTW"/>
|
||||||
|
</locale-config>
|
|
@ -1,7 +1,7 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.1.0-alpha02" apply false
|
id("com.android.application") version "8.1.0-alpha11" apply false
|
||||||
id("com.android.library") version "8.1.0-alpha02" apply false
|
id("com.android.library") version "8.1.0-alpha11" apply false
|
||||||
kotlin("android") version "1.7.20" apply false
|
kotlin("android") version "1.7.20" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue