X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2FI18nManager.java;h=349db3fcaff83bace412ebdf02e459b28d1e9199;hp=143d7c884b418584d9ffba8a242dffb95e404b0e;hb=c0387c124840c9407e040600fda88f3c3e8f6aa6;hpb=1ee49ae3c8ef3aa2e63eadd458531e5f8bd4f92c diff --git a/tim/prune/I18nManager.java b/tim/prune/I18nManager.java index 143d7c8..349db3f 100644 --- a/tim/prune/I18nManager.java +++ b/tim/prune/I18nManager.java @@ -87,18 +87,18 @@ public abstract class I18nManager public static String getText(String inKey) { // look in external props file if available - if (ExternalPropsFile != null && ExternalPropsFile.containsKey(inKey)) + if (ExternalPropsFile != null) { - return ExternalPropsFile.getProperty(inKey); + String extText = ExternalPropsFile.getProperty(inKey); + if (extText != null) return extText; } // look in extra texts if available if (LocalTexts != null) { try { - if (LocalTexts.containsKey(inKey)) { - return LocalTexts.getString(inKey); - } + String localText = LocalTexts.getString(inKey); + if (localText != null) return localText; } catch (MissingResourceException mre) {} } @@ -107,9 +107,8 @@ public abstract class I18nManager { try { - if (EnglishTexts.containsKey(inKey)) { - return EnglishTexts.getString(inKey); - } + String engText = EnglishTexts.getString(inKey); + if (engText != null) return engText; } catch (MissingResourceException mre) {} }