mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Duplicate Hebrew strings on build for legacy locale code
This commit is contained in:
parent
be6a209fe9
commit
b2fba5083b
3 changed files with 16 additions and 6 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -6,4 +6,7 @@
|
||||||
.idea/
|
.idea/
|
||||||
*iml
|
*iml
|
||||||
*.iml
|
*.iml
|
||||||
*/build
|
*/build
|
||||||
|
|
||||||
|
# Hebrew assets are copied on build
|
||||||
|
app/src/main/res/values-iw/
|
||||||
|
|
|
@ -108,6 +108,10 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
androidExtensions {
|
||||||
|
experimental = true
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
// Modified dependencies
|
// Modified dependencies
|
||||||
|
@ -268,11 +272,14 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile).all {
|
||||||
kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlin.Experimental"]
|
kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlin.Experimental"]
|
||||||
}
|
}
|
||||||
|
|
||||||
androidExtensions {
|
// Duplicating Hebrew string assets due to some locale code issues on different devices
|
||||||
experimental = true
|
task copyResources(type: Copy) {
|
||||||
|
from './src/main/res/values-he'
|
||||||
|
into './src/main/res/values-iw'
|
||||||
|
include '**/*'
|
||||||
}
|
}
|
||||||
|
|
||||||
preBuild.dependsOn(lintKotlin)
|
preBuild.dependsOn(lintKotlin, copyResources)
|
||||||
lintKotlin.dependsOn(formatKotlin)
|
lintKotlin.dependsOn(formatKotlin)
|
||||||
|
|
||||||
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Standard")) {
|
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Standard")) {
|
||||||
|
|
|
@ -64,8 +64,8 @@ object LocaleHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Return Locale from string language code
|
/**
|
||||||
|
* Return Locale from string language code
|
||||||
*/
|
*/
|
||||||
private fun getLocale(lang: String): Locale {
|
private fun getLocale(lang: String): Locale {
|
||||||
val sp = lang.split("_", "-")
|
val sp = lang.split("_", "-")
|
||||||
|
|
Loading…
Reference in a new issue