mirror of
https://github.com/gsantner/dandelion
synced 2025-09-09 18:29:47 +02:00
Merge c60e363d3c
into 774c5bec59
This commit is contained in:
commit
03059c7b67
2 changed files with 13 additions and 3 deletions
|
@ -153,6 +153,16 @@ public class LanguagePreference extends ListPreference {
|
|||
ret = ret.substring(0, ret.indexOf(" ") + 1) + "Simplified" + ret.substring(ret.indexOf(" "));
|
||||
} else if (localeAndroidCode.equals("zh-rTW")) {
|
||||
ret = ret.substring(0, ret.indexOf(" ") + 1) + "Traditional" + ret.substring(ret.indexOf(" "));
|
||||
} else if (localeAndroidCode.equals("sr-rRS")) {
|
||||
ret = ret.substring(0, ret.indexOf(" ") + 1) + "Latin" + ret.substring(ret.indexOf(" "));
|
||||
} else if (localeAndroidCode.startsWith("sr")) {
|
||||
ret = ret.substring(0, ret.indexOf(" ") + 1) + "Cyrillic" + ret.substring(ret.indexOf(" "));
|
||||
} else if (localeAndroidCode.equals("fil")) {
|
||||
ret = ret.substring(0, ret.indexOf("(") + 1) + "Philippines)";
|
||||
} else if (localeAndroidCode.equals("kmr")) {
|
||||
ret = "Kurdish Kurmanji (کورمانجی)";
|
||||
} else if (localeAndroidCode.equals("ckb")) {
|
||||
ret = "Kurdish Sorani (" + ret.split("\\(")[1];
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -83,15 +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-", ""))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return '{' + langs.collect { "\"${it}\"" }.join(",") + '}'
|
||||
return '{' + langs.sort().collect { "\"${it}\"" }.join(",") + '}'
|
||||
}
|
||||
|
||||
ext.getGitHash = { ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue