From: <jde...@us...> - 2012-01-08 05:05:49
|
Revision: 15761 http://pcgen.svn.sourceforge.net/pcgen/?rev=15761&view=rev Author: jdempsey Date: 2012-01-08 05:05:42 +0000 (Sun, 08 Jan 2012) Log Message: ----------- Fix bug: Language settings do not work * Fix initialisation of LanguageBundle for unit tests Issue#: CODE-1150 Modified Paths: -------------- sandbox/uisync/code/src/java/pcgen/system/LanguageBundle.java Modified: sandbox/uisync/code/src/java/pcgen/system/LanguageBundle.java =================================================================== --- sandbox/uisync/code/src/java/pcgen/system/LanguageBundle.java 2012-01-08 05:03:41 UTC (rev 15760) +++ sandbox/uisync/code/src/java/pcgen/system/LanguageBundle.java 2012-01-08 05:05:42 UTC (rev 15761) @@ -97,6 +97,11 @@ */ private static String getProperty(String key) { + if (bundle == null) + { + init(); + } + String value = null; try { @@ -114,8 +119,12 @@ * Initialises the LanguageBundle loading the appropriate bundles * depending on the system Locale and the option selected in preferences. */ - static void init() + static synchronized void init() { + if (bundle != null) + { + Logging.log(Logging.WARNING, "Reinitialising the language bundle."); + } Locale locale = Locale.getDefault(); Logging.log(Logging.INFO, "Initialising langauge bundle with locale '" + locale + "'."); try This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |