From: Niki Roo Date: Tue, 26 Mar 2019 17:38:34 +0000 (+0100) Subject: i18n: fix files X-Git-Tag: fanfix-swing-0.0.1~12^2~191 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=fee80815f000d7a4346b2da014eb029a4023dc51;p=fanfix-swing.git i18n: fix files --- diff --git a/src/be/nikiroo/fanfix/Instance.java b/src/be/nikiroo/fanfix/Instance.java index b4af5e83..cacbbfe3 100644 --- a/src/be/nikiroo/fanfix/Instance.java +++ b/src/be/nikiroo/fanfix/Instance.java @@ -545,8 +545,11 @@ public class Instance { private static String getLang() { String lang = config.getString(Config.LANG); - if (System.getenv("LANG") != null && !System.getenv("LANG").isEmpty()) { - lang = System.getenv("LANG"); + if (lang == null | lang.isEmpty()) { + if (System.getenv("LANG") != null + && !System.getenv("LANG").isEmpty()) { + lang = System.getenv("LANG"); + } } if (lang != null && lang.isEmpty()) { diff --git a/src/be/nikiroo/fanfix/bundles/resources.properties b/src/be/nikiroo/fanfix/bundles/resources_core.properties similarity index 100% rename from src/be/nikiroo/fanfix/bundles/resources.properties rename to src/be/nikiroo/fanfix/bundles/resources_core.properties diff --git a/src/be/nikiroo/fanfix/bundles/resources_fr.properties b/src/be/nikiroo/fanfix/bundles/resources_core_fr.properties similarity index 100% rename from src/be/nikiroo/fanfix/bundles/resources_fr.properties rename to src/be/nikiroo/fanfix/bundles/resources_core_fr.properties diff --git a/src/be/nikiroo/fanfix/output/BasicOutput.java b/src/be/nikiroo/fanfix/output/BasicOutput.java index dc6fe51d..f3e31417 100644 --- a/src/be/nikiroo/fanfix/output/BasicOutput.java +++ b/src/be/nikiroo/fanfix/output/BasicOutput.java @@ -65,10 +65,10 @@ public abstract class BasicOutput { String desc = Instance.getTrans().getStringX(id, this.name()); if (desc == null) { - desc = Instance.getTrans().getString(id, this); + desc = Instance.getTrans().getString(id, this.toString()); } - if (desc == null) { + if (desc == null || desc.isEmpty()) { desc = this.toString(); }