mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-21 20:55:41 +03:00
Extract translation from app module (#7975)
* Extract translation from app module - Prep for further extraction to modules in the nearish future * Subproject .gitignore
This commit is contained in:
parent
56826fb477
commit
d5c207d8a3
83 changed files with 50 additions and 16 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -10,10 +10,4 @@
|
|||
*/build
|
||||
/build
|
||||
*.apk
|
||||
app/**/output.json
|
||||
|
||||
# Hebrew assets are copied on build
|
||||
app/src/main/res/values-iw/
|
||||
|
||||
# Generated
|
||||
locales_config.xml
|
||||
app/**/output.json
|
|
@ -149,6 +149,8 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":i18n"))
|
||||
|
||||
// Compose
|
||||
implementation(compose.activity)
|
||||
implementation(compose.foundation)
|
||||
|
@ -280,8 +282,6 @@ dependencies {
|
|||
}
|
||||
|
||||
tasks {
|
||||
val localesConfigTask = registerLocalesConfigTask(project)
|
||||
|
||||
withType<Test> {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
|
@ -310,16 +310,11 @@ tasks {
|
|||
)
|
||||
}
|
||||
|
||||
// Duplicating Hebrew string assets due to some locale code issues on different devices
|
||||
val copyHebrewStrings by registering(Copy::class) {
|
||||
from("./src/main/res/values-he")
|
||||
into("./src/main/res/values-iw")
|
||||
include("**/*")
|
||||
}
|
||||
|
||||
|
||||
preBuild {
|
||||
val ktlintTask = if (System.getenv("GITHUB_BASE_REF") == null) formatKotlin else lintKotlin
|
||||
dependsOn(ktlintTask, copyHebrewStrings, localesConfigTask)
|
||||
dependsOn(ktlintTask)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
5
i18n/.gitignore
vendored
Normal file
5
i18n/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Hebrew assets are copied on build
|
||||
/src/main/res/values-iw/
|
||||
|
||||
# Generated
|
||||
locales_config.xml
|
37
i18n/build.gradle.kts
Normal file
37
i18n/build.gradle.kts
Normal file
|
@ -0,0 +1,37 @@
|
|||
plugins {
|
||||
id("com.android.library")
|
||||
kotlin("android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "eu.kanade.tachiyomi.i18n"
|
||||
compileSdk = AndroidConfig.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
minSdk = AndroidConfig.minSdk
|
||||
targetSdk = AndroidConfig.targetSdk
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
val localesConfigTask = registerLocalesConfigTask(project)
|
||||
|
||||
// Duplicating Hebrew string assets due to some locale code issues on different devices
|
||||
val copyHebrewStrings by registering(Copy::class) {
|
||||
from("./src/main/res/values-he")
|
||||
into("./src/main/res/values-iw")
|
||||
include("**/*")
|
||||
}
|
||||
|
||||
preBuild {
|
||||
dependsOn(copyHebrewStrings, localesConfigTask)
|
||||
}
|
||||
}
|
2
i18n/src/main/AndroidManifest.xml
Normal file
2
i18n/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest />
|
|
@ -36,3 +36,4 @@ dependencyResolutionManagement {
|
|||
|
||||
rootProject.name = "Tachiyomi"
|
||||
include(":app")
|
||||
include(":i18n")
|
||||
|
|
Loading…
Reference in a new issue