Refactor translation names & remove no translate unclear file
This commit is contained in:
parent
275ea6ed28
commit
321ceb797f
5 changed files with 12 additions and 33 deletions
2
OsmAnd/.gitignore
vendored
2
OsmAnd/.gitignore
vendored
|
@ -39,8 +39,6 @@ mx_*
|
||||||
valgrind/
|
valgrind/
|
||||||
bin/
|
bin/
|
||||||
dist/
|
dist/
|
||||||
res/values/no_translate.xml
|
|
||||||
res/values/skip_translate.xml
|
|
||||||
assets/specialphrases/*
|
assets/specialphrases/*
|
||||||
assets/voice/*
|
assets/voice/*
|
||||||
assets/fonts/*
|
assets/fonts/*
|
||||||
|
|
|
@ -4,10 +4,8 @@
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:icon="@mipmap/icon_nightly"
|
android:icon="@mipmap/icon_nightly"
|
||||||
|
android:label="@string/app_name_free"
|
||||||
tools:replace="android:icon">
|
tools:replace="android:icon">
|
||||||
<meta-data
|
|
||||||
android:name="com.facebook.sdk.ApplicationId"
|
|
||||||
android:value="fb792288460976727"/>
|
|
||||||
<activity
|
<activity
|
||||||
android:name="net.osmand.plus.activities.MapActivity"
|
android:name="net.osmand.plus.activities.MapActivity"
|
||||||
android:theme="@style/FirstSplashScreenNightlyFree"
|
android:theme="@style/FirstSplashScreenNightlyFree"
|
||||||
|
|
|
@ -106,15 +106,6 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task updateNoTranslate(type: Copy) {
|
|
||||||
from('.') {
|
|
||||||
include 'no_translate.xml'
|
|
||||||
filter {
|
|
||||||
line -> replaceNoTranslate(line);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
into 'res/values/'
|
|
||||||
}
|
|
||||||
|
|
||||||
task validateTranslate {
|
task validateTranslate {
|
||||||
println "Validating translations"
|
println "Validating translations"
|
||||||
|
@ -147,10 +138,6 @@ task collectVoiceAssets(type: Sync) {
|
||||||
include "**/*.js"
|
include "**/*.js"
|
||||||
}
|
}
|
||||||
|
|
||||||
task cleanNoTranslate(type: Delete) {
|
|
||||||
delete('res/values/no_translate.xml')
|
|
||||||
}
|
|
||||||
|
|
||||||
task collectFonts(type: Copy) {
|
task collectFonts(type: Copy) {
|
||||||
from "../../resources/fonts"
|
from "../../resources/fonts"
|
||||||
from "../../resources/rendering_styles/fonts"
|
from "../../resources/rendering_styles/fonts"
|
||||||
|
@ -262,7 +249,6 @@ task collectExternalResources {
|
||||||
copyMapShaderIcons,
|
copyMapShaderIcons,
|
||||||
copyMapPOIIcons,
|
copyMapPOIIcons,
|
||||||
copyLargePOIIcons,
|
copyLargePOIIcons,
|
||||||
updateNoTranslate,
|
|
||||||
validateTranslate,
|
validateTranslate,
|
||||||
copyWidgetIcons,
|
copyWidgetIcons,
|
||||||
copyWidgetIconsHdpi,
|
copyWidgetIconsHdpi,
|
||||||
|
|
|
@ -105,31 +105,42 @@ android {
|
||||||
nightlyFree {
|
nightlyFree {
|
||||||
dimension "version"
|
dimension "version"
|
||||||
applicationId "net.osmand.dev"
|
applicationId "net.osmand.dev"
|
||||||
|
resValue "string", "app_name", "OsmAnd Nightly"
|
||||||
|
resValue "string", "app_edition", System.getenv("APP_EDITION") ? System.getenv("APP_EDITION").toInteger() : ""
|
||||||
// resConfig "en"
|
// resConfig "en"
|
||||||
}
|
}
|
||||||
androidFull {
|
androidFull {
|
||||||
dimension "version"
|
dimension "version"
|
||||||
applicationId "net.osmand.plus"
|
applicationId "net.osmand.plus"
|
||||||
|
resValue "string", "app_name", "OsmAnd~"
|
||||||
|
resValue "string", "app_edition", System.getenv("APP_EDITION") ? System.getenv("APP_EDITION").toInteger() : ""
|
||||||
}
|
}
|
||||||
gplayFree {
|
gplayFree {
|
||||||
dimension "version"
|
dimension "version"
|
||||||
applicationId "net.osmand"
|
applicationId "net.osmand"
|
||||||
|
resValue "string", "app_name", "OsmAnd"
|
||||||
|
resValue "string", "app_edition", System.getenv("APP_EDITION") ? System.getenv("APP_EDITION").toInteger() : ""
|
||||||
}
|
}
|
||||||
gplayFull {
|
gplayFull {
|
||||||
dimension "version"
|
dimension "version"
|
||||||
applicationId "net.osmand.plus"
|
applicationId "net.osmand.plus"
|
||||||
|
resValue "string", "app_name", "OsmAnd+"
|
||||||
|
resValue "string", "app_edition", System.getenv("APP_EDITION") ? System.getenv("APP_EDITION").toInteger() : ""
|
||||||
}
|
}
|
||||||
amazonFree {
|
amazonFree {
|
||||||
dimension "version"
|
dimension "version"
|
||||||
applicationId "net.osmand"
|
applicationId "net.osmand"
|
||||||
|
resValue "string", "app_name", "OsmAnd"
|
||||||
}
|
}
|
||||||
amazonFull {
|
amazonFull {
|
||||||
dimension "version"
|
dimension "version"
|
||||||
applicationId "net.osmand.plus"
|
applicationId "net.osmand.plus"
|
||||||
|
resValue "string", "app_name", "OsmAnd+"
|
||||||
}
|
}
|
||||||
huawei {
|
huawei {
|
||||||
dimension "version"
|
dimension "version"
|
||||||
applicationId "net.osmand.huawei"
|
applicationId "net.osmand.huawei"
|
||||||
|
resValue "string", "app_name", "OsmAnd"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build that includes 3D OpenGL release
|
// Build that includes 3D OpenGL release
|
||||||
|
@ -153,19 +164,6 @@ android {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def replaceNoTranslate(line) {
|
|
||||||
if (line.contains("\"app_name\"") && System.getenv("TARGET_APP_PLUS_NAME")) {
|
|
||||||
return line.replaceAll(">[^<]*<", ">" + System.getenv("TARGET_APP_PLUS_NAME") + "<")
|
|
||||||
}
|
|
||||||
if (line.contains("\"app_name_free\"") && System.getenv("TARGET_APP_FREE_NAME")) {
|
|
||||||
return line.replaceAll(">[^<]*<", ">" + System.getenv("TARGET_APP_FREE_NAME") + "<")
|
|
||||||
}
|
|
||||||
if (line.contains("\"app_edition\"") && System.getenv("APP_EDITION")) {
|
|
||||||
return line.replaceAll(">[^<]*<", ">" + System.getenv("APP_EDITION") + "<")
|
|
||||||
}
|
|
||||||
return line;
|
|
||||||
}
|
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
android.applicationVariants.all { variant ->
|
android.applicationVariants.all { variant ->
|
||||||
variant.javaCompiler.dependsOn(collectExternalResources, buildOsmAndCore, cleanupDuplicatesInCore)
|
variant.javaCompiler.dependsOn(collectExternalResources, buildOsmAndCore, cleanupDuplicatesInCore)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">OsmAnd~</string>
|
<string name="app_name">OsmAnd~</string>
|
||||||
<string name="app_name_free">OsmAnd Nightly</string>
|
|
||||||
<!-- string name="app_version_suffix"></string -->
|
<!-- string name="app_version_suffix"></string -->
|
||||||
|
|
||||||
<!-- Not translatable -->
|
<!-- Not translatable -->
|
Loading…
Reference in a new issue