Merge pull request #1326 from OpenRefine/issue1325
Ignore empty language files introduced by Weblate
This commit is contained in:
commit
7293585122
@ -89,7 +89,7 @@ public class GetLanguagesCommand extends Command {
|
|||||||
String lang = file.getName().split("-")[1].split("\\.")[0];
|
String lang = file.getName().split("-")[1].split("\\.")[0];
|
||||||
if (!"en".equals(lang) && !"default".equals(lang)) {
|
if (!"en".equals(lang) && !"default".equals(lang)) {
|
||||||
JSONObject json = LoadLanguageCommand.loadLanguage(this.servlet, "core", lang);
|
JSONObject json = LoadLanguageCommand.loadLanguage(this.servlet, "core", lang);
|
||||||
if (json != null) {
|
if (json != null && json.has("name")) {
|
||||||
String label = json.getString("name");
|
String label = json.getString("name");
|
||||||
writeLangData(writer, lang, label);
|
writeLangData(writer, lang, label);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user