X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2FI18nManager.java;h=143d7c884b418584d9ffba8a242dffb95e404b0e;hp=b9ce3cc0e59e07888f7bd2cbfef679dcc065fea8;hb=1ee49ae3c8ef3aa2e63eadd458531e5f8bd4f92c;hpb=112bb0c9b46894adca9a33ed8c99ea712b253185 diff --git a/tim/prune/I18nManager.java b/tim/prune/I18nManager.java index b9ce3cc..143d7c8 100644 --- a/tim/prune/I18nManager.java +++ b/tim/prune/I18nManager.java @@ -86,22 +86,19 @@ public abstract class I18nManager */ public static String getText(String inKey) { - String value = null; // look in external props file if available - if (ExternalPropsFile != null) + if (ExternalPropsFile != null && ExternalPropsFile.containsKey(inKey)) { - value = ExternalPropsFile.getProperty(inKey); - if (value != null && !value.equals("")) - return value; + return ExternalPropsFile.getProperty(inKey); } // look in extra texts if available if (LocalTexts != null) { try { - value = LocalTexts.getString(inKey); - if (value != null && !value.equals("")) - return value; + if (LocalTexts.containsKey(inKey)) { + return LocalTexts.getString(inKey); + } } catch (MissingResourceException mre) {} } @@ -110,9 +107,9 @@ public abstract class I18nManager { try { - value = EnglishTexts.getString(inKey); - if (value != null && !value.equals("")) - return value; + if (EnglishTexts.containsKey(inKey)) { + return EnglishTexts.getString(inKey); + } } catch (MissingResourceException mre) {} }