diff --git a/app/lint.xml b/app/lint.xml
index 3dbcef650..805f69b92 100644
--- a/app/lint.xml
+++ b/app/lint.xml
@@ -11,11 +11,13 @@
-
+
+
+
-
+
diff --git a/app/translations.gradle b/app/translations.gradle
index 43b8f510f..a846213cd 100644
--- a/app/translations.gradle
+++ b/app/translations.gradle
@@ -79,18 +79,39 @@ task excludeNonTranslatables {
.toSet()
def all = english.collect { it['@name'] }.toSet()
def translatable = all - nonTranslatable
+ def inMultiline = false
+ def endBlockName = ""
allStringsResourceFiles { f ->
if (f != englishFile) {
def newLines = f.readLines()
.collect { line ->
- def matcher = line =~ /name="([^"]*)".*<\//
- if (matcher.find()) {
- def name = matcher.group(1)
- if (!line.contains('excludeNonTranslatables') && !translatable.contains(name)) {
- return " "
+ if (!inMultiline) {
+ def singleLineMatcher = line =~ /name="([^"]*)".*<\//
+ if (singleLineMatcher.find()) {
+ def name = singleLineMatcher.group(1)
+ if (!line.contains('excludeNonTranslatables') && !translatable.contains(name)) {
+ return " "
+ }
+ } else {
+ def multilineStartMatcher = line =~ /<(.*) .?name="([^"]*)".*/
+ if (multilineStartMatcher.find()) {
+ endBlockName = multilineStartMatcher.group(1)
+ def name = multilineStartMatcher.group(2)
+ if (!line.contains('excludeNonTranslatables') && !translatable.contains(name)) {
+ inMultiline = true;
+ return " "
}
}
+
return line
}