|
Lines 13-23
Link Here
|
| 13 |
**********************************************************************/ |
13 |
**********************************************************************/ |
| 14 |
|
14 |
|
| 15 |
import java.text.MessageFormat; |
15 |
import java.text.MessageFormat; |
| 16 |
import java.util.Locale; |
|
|
| 17 |
import java.util.MissingResourceException; |
16 |
import java.util.MissingResourceException; |
| 18 |
import java.util.ResourceBundle; |
17 |
import java.util.ResourceBundle; |
| 19 |
|
18 |
|
| 20 |
import org.eclipse.hyades.logging.adapter.internal.util.UtilConstants; |
19 |
import org.eclipse.hyades.logging.adapter.internal.util.UtilConstants; |
|
|
20 |
import org.eclipse.hyades.logging.core.LoggingCoreUtilities; |
| 21 |
|
21 |
|
| 22 |
/** |
22 |
/** |
| 23 |
* This class contains various operations to retrieve translated messages. |
23 |
* This class contains various operations to retrieve translated messages. |
|
Lines 40-46
Link Here
|
| 40 |
public static String getString(String key) { |
40 |
public static String getString(String key) { |
| 41 |
|
41 |
|
| 42 |
//Load ResourceBundle: |
42 |
//Load ResourceBundle: |
| 43 |
if (resourceBundle == null) { |
43 |
if (resourceBundle == null || !resourceBundle.getLocale().equals(LoggingCoreUtilities.getClientLocale())) { |
| 44 |
|
44 |
|
| 45 |
/* Bugzilla 106671 - the non plugin.xml strings like messages have |
45 |
/* Bugzilla 106671 - the non plugin.xml strings like messages have |
| 46 |
* been moved from plugin.properties to a file called |
46 |
* been moved from plugin.properties to a file called |
|
Lines 53-59
Link Here
|
| 53 |
* eclipse and non-eclipse environments. |
53 |
* eclipse and non-eclipse environments. |
| 54 |
*/ |
54 |
*/ |
| 55 |
try { |
55 |
try { |
| 56 |
resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME, Locale.getDefault()); |
56 |
resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME, LoggingCoreUtilities.getClientLocale()); |
| 57 |
} |
57 |
} |
| 58 |
catch (MissingResourceException m) { |
58 |
catch (MissingResourceException m) { |
| 59 |
// Cannot find resource bundle. Return the key. |
59 |
// Cannot find resource bundle. Return the key. |