mirror of
https://github.com/gsantner/dandelion
synced 2025-09-09 18:29:47 +02:00
Fix language preference: Properly show all languages (PR #1453 by @gsantner)
(cherry picked from commit 7ff1f1389d69df9ac2c0e041600451649325ac85)
This commit is contained in:
parent
774c5bec59
commit
1c688a3479
1 changed files with 3 additions and 2 deletions
|
@ -83,14 +83,15 @@ static String findUsedAndroidLocales() {
|
|||
Set<String> langs = new HashSet<>()
|
||||
new File('.').eachFileRecurse(groovy.io.FileType.DIRECTORIES) {
|
||||
final foldername = it.name
|
||||
if (foldername.startsWith('values-') && !it.canonicalPath.contains("build" + File.separator + "intermediates") && !it.canonicalPath.contains("gradle" + File.separator + "daemon")) {
|
||||
if (foldername.contains('values-') && !it.absolutePath.contains("build" + File.separator + "intermediates") && !foldername.matches(".*values-((.*[0-9])|(land)|(port)).*")) {
|
||||
new File(it.toString()).eachFileRecurse(groovy.io.FileType.FILES) {
|
||||
if (it.name.toLowerCase().endsWith(".xml") && it.getCanonicalFile().getText('UTF-8').contains("<string")) {
|
||||
if (it.exists() && it.name.toLowerCase().endsWith(".xml") && it.getText('UTF-8').contains("<string")) {
|
||||
langs.add(foldername.replace("values-", ""))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
langs = langs.sort()
|
||||
return '{' + langs.collect { "\"${it}\"" }.join(",") + '}'
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue