i18n: fix files
authorNiki Roo <niki@nikiroo.be>
Tue, 26 Mar 2019 17:38:34 +0000 (18:38 +0100)
committerNiki Roo <niki@nikiroo.be>
Tue, 26 Mar 2019 17:38:34 +0000 (18:38 +0100)
src/be/nikiroo/fanfix/Instance.java
src/be/nikiroo/fanfix/bundles/resources_core.properties [moved from src/be/nikiroo/fanfix/bundles/resources.properties with 100% similarity]
src/be/nikiroo/fanfix/bundles/resources_core_fr.properties [moved from src/be/nikiroo/fanfix/bundles/resources_fr.properties with 100% similarity]
src/be/nikiroo/fanfix/output/BasicOutput.java

index b4af5e836598bdce5a5bc6d0b04b1b8297bf6aff..cacbbfe33320c32df5002563105e643a9ac8c86a 100644 (file)
@@ -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()) {
index dc6fe51de2cb1d6e66c4bbe06af2e1850bf99847..f3e314171321d17e63cb98b12574181fc058fd1a 100644 (file)
@@ -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();
                        }