X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fbundles%2FStringIdBundle.java;h=e94c05b448eb3ba3231035f9999ec4dbb22d40b7;hb=48f14dc96bd27521e0c36ca227f3f3a2df3e5213;hp=0b129e49eedbbb50640ed64e2625ac584671e1ea;hpb=d4f4f8c9fe6ef29c42c1af95fa3168ed84ac45e5;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/bundles/StringIdBundle.java b/src/be/nikiroo/fanfix/bundles/StringIdBundle.java index 0b129e4..e94c05b 100644 --- a/src/be/nikiroo/fanfix/bundles/StringIdBundle.java +++ b/src/be/nikiroo/fanfix/bundles/StringIdBundle.java @@ -2,7 +2,6 @@ package be.nikiroo.fanfix.bundles; import java.io.File; import java.io.IOException; -import java.util.Locale; import be.nikiroo.utils.resources.TransBundle; @@ -12,8 +11,6 @@ import be.nikiroo.utils.resources.TransBundle; * @author niki */ public class StringIdBundle extends TransBundle { - private String lang; - /** * Create a translation service for the given language (will fall back to * the default one i not found). @@ -23,18 +20,6 @@ public class StringIdBundle extends TransBundle { */ public StringIdBundle(String lang) { super(StringId.class, Target.resources, lang); - this.lang = lang; - } - - /** - * Return the currently used language as a String. - * - * @return the language - * - * @deprecated use the call from {@link TransBundle} when available - */ - public Locale getLanguage() { - return getLocaleFor(lang); } /** @@ -52,39 +37,4 @@ public class StringIdBundle extends TransBundle { new StringIdBundle(null).updateFile(path); System.out.println("Path updated: " + path); } - - /** - * Return the {@link Locale} representing the given language. - * - * @param language - * the language to initialise, in the form "en-GB" or "fr" for - * instance - * - * @return the corresponding {@link Locale} or the default {@link Locale} if - * it is not known - * - * @deprecated Use the call from {@link TransBundle} when available. - */ - static private Locale getLocaleFor(String language) { - Locale locale; - - if (language == null) { - locale = Locale.getDefault(); - } else { - language = language.replaceAll("_", "-"); - String lang = language; - String country = null; - if (language.contains("-")) { - lang = language.split("-")[0]; - country = language.split("-")[1]; - } - - if (country != null) - locale = new Locale(lang, country); - else - locale = new Locale(lang); - } - - return locale; - } }