From fee80815f000d7a4346b2da014eb029a4023dc51 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Tue, 26 Mar 2019 18:38:34 +0100 Subject: [PATCH] i18n: fix files --- src/be/nikiroo/fanfix/Instance.java | 7 +++++-- .../{resources.properties => resources_core.properties} | 0 ...esources_fr.properties => resources_core_fr.properties} | 0 src/be/nikiroo/fanfix/output/BasicOutput.java | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) rename src/be/nikiroo/fanfix/bundles/{resources.properties => resources_core.properties} (100%) rename src/be/nikiroo/fanfix/bundles/{resources_fr.properties => resources_core_fr.properties} (100%) 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(); } -- 2.27.0