fix hebrew

This commit is contained in:
goapunk
2018-05-30 15:10:39 +02:00
parent 695b543ba9
commit 1834146ad0
2 changed files with 14 additions and 1 deletions

View File

@@ -4,3 +4,4 @@ build
local.properties
.settings
src/main/assets/*.zip
src/main/res/values-iw

View File

@@ -300,13 +300,25 @@ task verifyTranslations {
}
}
folders.each { n ->
if (!translations.remove(n)) {
if (!translations.remove(n) && n != 'iw') {
throw new GradleException("Translation " + n + " is missing in $file")
}
}
if (translations.size() != 0)
throw new GradleException("Translations\n" + translations.join("\n")
+ "\nhave no matching value folder")
// Some devices use iw instead of he for hebrew
def hebrew_legacy = new File("briar-android/src/main/res/values-iw")
def hebrew = new File("briar-android/src/main/res/values-he")
// Copy values-he to values-iw
if (hebrew.exists()) {
hebrew_legacy.mkdir()
copy {
from 'src/main/res/values-he'
into 'src/main/res/values-iw'
}
}
}
}