Merge pull request #1326 from OpenRefine/issue1325

Ignore empty language files introduced by Weblate
This commit is contained in:
Jacky 2017-11-14 08:06:59 -05:00 committed by GitHub
commit 7293585122
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
} }