Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 91496 Details for
Bug 124556
Remote Log Import NL error messages not displayed correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch
RAC-NL-ISSUE.txt (text/plain), 13.68 KB, created by
Rohit Shetty
on 2008-03-04 06:50:36 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rohit Shetty
Created:
2008-03-04 06:50:36 EST
Size:
13.68 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.hyades.logging.parsers >Index: src/org/eclipse/hyades/logging/parsers/ParserUtilities.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.hyades.logging.parsers/src/org/eclipse/hyades/logging/parsers/ParserUtilities.java,v >retrieving revision 1.8 >diff -u -r1.8 ParserUtilities.java >--- src/org/eclipse/hyades/logging/parsers/ParserUtilities.java 24 Jan 2008 02:26:30 -0000 1.8 >+++ src/org/eclipse/hyades/logging/parsers/ParserUtilities.java 1 Mar 2008 21:16:38 -0000 >@@ -19,6 +19,7 @@ > import java.util.StringTokenizer; > > import org.eclipse.hyades.internal.logging.core.Constants; >+import org.eclipse.hyades.logging.core.LoggingCoreUtilities; > > /** > * >@@ -40,7 +41,7 @@ > if(key != null){ > > //Load ResourceBundle: >- if (resourceBundle == null) { >+ if (resourceBundle == null || !resourceBundle.getLocale().equals(LoggingCoreUtilities.getClientLocale())) { > /* Bugzilla 106671 - the non plugin.xml strings like messages have > * been moved from plugin.properties to a file called > * org.eclipse.hyades.logging.parsers.properties/messages.properties. >@@ -52,7 +53,7 @@ > * eclipse and non-eclipse environments. > */ > try { >- resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_LOCATION, Locale.getDefault()); >+ resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_LOCATION, LoggingCoreUtilities.getClientLocale()); > } > catch (MissingResourceException m) { > // Return the key if the resource bundle is not found. >@@ -129,7 +130,7 @@ > > if (key != null) { > >- Locale defaultLocale = Locale.getDefault(); >+ Locale defaultLocale = LoggingCoreUtilities.getClientLocale(); > > if ((locale != null) && (!locale.equals(defaultLocale))) { > >Index: src.import/org/eclipse/hyades/logging/parsers/importer/RemoteLogParserLoader.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.hyades.logging.parsers/src.import/org/eclipse/hyades/logging/parsers/importer/RemoteLogParserLoader.java,v >retrieving revision 1.16 >diff -u -r1.16 RemoteLogParserLoader.java >--- src.import/org/eclipse/hyades/logging/parsers/importer/RemoteLogParserLoader.java 17 Jan 2008 00:36:34 -0000 1.16 >+++ src.import/org/eclipse/hyades/logging/parsers/importer/RemoteLogParserLoader.java 1 Mar 2008 21:16:38 -0000 >@@ -237,13 +237,16 @@ > if(parserParameters.containsKey(LogParserConstants.CLIENT_LOCALE_LANGUAGE_KEY)){ > > String clientLanguage = ((String)(parserParameters.get(LogParserConstants.CLIENT_LOCALE_LANGUAGE_KEY))); >- >+ System.setProperty(LogParserConstants.CLIENT_LOCALE_LANGUAGE_KEY, clientLanguage); > if(parserParameters.containsKey(LogParserConstants.CLIENT_LOCALE_COUNTRY_KEY)){ > >- String clientCountry = ((String)(parserParameters.get(LogParserConstants.CLIENT_LOCALE_LANGUAGE_KEY))); >- >+ String clientCountry = ((String)(parserParameters.get(LogParserConstants.CLIENT_LOCALE_COUNTRY_KEY))); >+ System.setProperty(LogParserConstants.CLIENT_LOCALE_COUNTRY_KEY, clientCountry); >+ > if(parserParameters.containsKey(LogParserConstants.CLIENT_LOCALE_VARIANT_KEY)){ >- clientLocale = new Locale(clientLanguage,clientCountry,((String)(parserParameters.get(LogParserConstants.CLIENT_LOCALE_VARIANT_KEY)))); >+ String variant = (String) parserParameters.get(LogParserConstants.CLIENT_LOCALE_VARIANT_KEY); >+ System.setProperty(LogParserConstants.CLIENT_LOCALE_VARIANT_KEY, variant); >+ clientLocale = new Locale(clientLanguage,clientCountry,variant); > } > else{ > clientLocale = new Locale(clientLanguage,clientCountry); >@@ -254,7 +257,6 @@ > } > } > >- > //Assume this is a PreemptedLogger and recover if necessary: > if (logger instanceof IPreemptedLogger) { > >#P org.eclipse.tptp.platform.logging.events >Index: src/org/eclipse/hyades/internal/logging/core/internationalization/InternationalizationUtilities.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.logging.events/src/org/eclipse/hyades/internal/logging/core/internationalization/InternationalizationUtilities.java,v >retrieving revision 1.3 >diff -u -r1.3 InternationalizationUtilities.java >--- src/org/eclipse/hyades/internal/logging/core/internationalization/InternationalizationUtilities.java 24 Jan 2008 02:29:32 -0000 1.3 >+++ src/org/eclipse/hyades/internal/logging/core/internationalization/InternationalizationUtilities.java 1 Mar 2008 21:16:46 -0000 >@@ -3,6 +3,8 @@ > import java.util.Locale; > import java.util.StringTokenizer; > >+import org.eclipse.hyades.logging.core.LoggingCoreUtilities; >+ > /********************************************************************** > * Copyright (c) 2006, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials >@@ -116,7 +118,7 @@ > * @see InternationalizationUtilities#format(String, Object[], com.ibm.icu.util.ULocale) > */ > public static String format(String message, Object[] arguments) throws IllegalArgumentException { >- return (format(message, arguments, Locale.getDefault())); >+ return (format(message, arguments, LoggingCoreUtilities.getClientLocale())); > } > > /** >Index: src.cbe101/org/eclipse/hyades/logging/events/cbe/EventException.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.logging.events/src.cbe101/org/eclipse/hyades/logging/events/cbe/EventException.java,v >retrieving revision 1.3 >diff -u -r1.3 EventException.java >--- src.cbe101/org/eclipse/hyades/logging/events/cbe/EventException.java 24 Jan 2008 02:52:27 -0000 1.3 >+++ src.cbe101/org/eclipse/hyades/logging/events/cbe/EventException.java 1 Mar 2008 21:16:44 -0000 >@@ -7,6 +7,7 @@ > import java.util.ResourceBundle; > > import org.eclipse.hyades.internal.logging.core.internationalization.InternationalizationUtilities; >+import org.eclipse.hyades.logging.core.LoggingCoreUtilities; > > /********************************************************************** > * Copyright (c) 2005, 2008 IBM Corporation and others. >@@ -279,7 +280,7 @@ > * @return The localized exception message. > */ > public String getLocalizedMessage() { >- return getLocalizedMessage(Locale.getDefault()); >+ return getLocalizedMessage(LoggingCoreUtilities.getClientLocale()); > } > > /** >Index: src/org/eclipse/hyades/logging/core/LoggingCoreResourceBundle.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.logging.events/src/org/eclipse/hyades/logging/core/LoggingCoreResourceBundle.java,v >retrieving revision 1.4 >diff -u -r1.4 LoggingCoreResourceBundle.java >--- src/org/eclipse/hyades/logging/core/LoggingCoreResourceBundle.java 20 Feb 2008 18:44:40 -0000 1.4 >+++ src/org/eclipse/hyades/logging/core/LoggingCoreResourceBundle.java 1 Mar 2008 21:16:46 -0000 >@@ -63,10 +63,10 @@ > synchronized(RESOURCE_BUNDLE_NAME){ > > //Load the resource bundle: >- if (resourceBundle == null) { >+ if (resourceBundle == null || !resourceBundle.getLocale().equals(LoggingCoreUtilities.getClientLocale())) { > //Attempt to load the 'org.eclipse.hyades.logging.core.properties.message[_<language code>[_<country code>]].properties' resource bundle: > try { >- resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME); >+ resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME,LoggingCoreUtilities.getClientLocale()); > } > catch (MissingResourceException m) { > return key; >Index: src/org/eclipse/hyades/logging/core/LoggingCoreUtilities.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.logging.events/src/org/eclipse/hyades/logging/core/LoggingCoreUtilities.java,v >retrieving revision 1.3 >diff -u -r1.3 LoggingCoreUtilities.java >--- src/org/eclipse/hyades/logging/core/LoggingCoreUtilities.java 24 Jan 2008 02:29:31 -0000 1.3 >+++ src/org/eclipse/hyades/logging/core/LoggingCoreUtilities.java 1 Mar 2008 21:16:46 -0000 >@@ -513,4 +513,47 @@ > > return (InternationalizationUtilities.format(utcMilliseconds, dateFormatPattern, Locale.ENGLISH, "GMT")); > } >+ >+ public final static String CLIENT_LOCALE_LANGUAGE_KEY = "client_locale_language"; >+ public final static String CLIENT_LOCALE_COUNTRY_KEY = "client_locale_country"; >+ public final static String CLIENT_LOCALE_VARIANT_KEY = "client_locale_variant"; >+ >+ private static Locale _clientLocale = null; >+ >+ /** >+ * Returns either the Locale specified using System properties LoggingCoreUtilities.CLIENT_LOCALE_LANGUAGE_KEY, >+ * LoggingCoreUtilities.CLIENT_LOCALE_COUNTRY_KEY and LoggingCoreUtilities.CLIENT_LOCALE_VARIANT_KEY or the current Default Locale. >+ * @return Locale >+ */ >+ public static Locale getClientLocale() >+ { >+ if(_clientLocale == null) >+ { >+ String clientLanguage = System.getProperty(CLIENT_LOCALE_LANGUAGE_KEY); >+ >+ if(clientLanguage !=null) >+ { >+ String clientCountry = System.getProperty(CLIENT_LOCALE_COUNTRY_KEY); >+ >+ if(clientCountry!=null) >+ { >+ String variant = System.getProperty(CLIENT_LOCALE_VARIANT_KEY); >+ >+ if(variant!=null) >+ { >+ _clientLocale = new Locale(clientLanguage,clientCountry,variant); >+ } >+ else{ >+ _clientLocale = new Locale(clientLanguage,clientCountry); >+ } >+ } >+ else >+ { >+ _clientLocale = new Locale(clientLanguage); >+ } >+ } >+ } >+ >+ return _clientLocale!=null?_clientLocale:Locale.getDefault(); >+ } > } >\ No newline at end of file >Index: src.events/org/eclipse/tptp/logging/events/cbe/EventException.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.logging.events/src.events/org/eclipse/tptp/logging/events/cbe/EventException.java,v >retrieving revision 1.3 >diff -u -r1.3 EventException.java >--- src.events/org/eclipse/tptp/logging/events/cbe/EventException.java 24 Jan 2008 02:52:26 -0000 1.3 >+++ src.events/org/eclipse/tptp/logging/events/cbe/EventException.java 1 Mar 2008 21:16:46 -0000 >@@ -7,6 +7,7 @@ > import java.util.ResourceBundle; > > import org.eclipse.hyades.internal.logging.core.internationalization.InternationalizationUtilities; >+import org.eclipse.hyades.logging.core.LoggingCoreUtilities; > > /********************************************************************** > * Copyright (c) 2005, 2008 IBM Corporation and others. >@@ -274,7 +275,7 @@ > * @return The localized exception message. > */ > public String getLocalizedMessage() { >- return getLocalizedMessage(Locale.getDefault()); >+ return getLocalizedMessage(LoggingCoreUtilities.getClientLocale()); > } > > /** >#P org.eclipse.hyades.logging.adapter >Index: src/org/eclipse/hyades/logging/adapter/util/Messages.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.hyades.logging.adapter/src/org/eclipse/hyades/logging/adapter/util/Messages.java,v >retrieving revision 1.6 >diff -u -r1.6 Messages.java >--- src/org/eclipse/hyades/logging/adapter/util/Messages.java 24 Jan 2008 02:25:51 -0000 1.6 >+++ src/org/eclipse/hyades/logging/adapter/util/Messages.java 1 Mar 2008 21:16:51 -0000 >@@ -13,11 +13,11 @@ > **********************************************************************/ > > import java.text.MessageFormat; >-import java.util.Locale; > import java.util.MissingResourceException; > import java.util.ResourceBundle; > > import org.eclipse.hyades.logging.adapter.internal.util.UtilConstants; >+import org.eclipse.hyades.logging.core.LoggingCoreUtilities; > > /** > * This class contains various operations to retrieve translated messages. >@@ -40,7 +40,7 @@ > public static String getString(String key) { > > //Load ResourceBundle: >- if (resourceBundle == null) { >+ if (resourceBundle == null || !resourceBundle.getLocale().equals(LoggingCoreUtilities.getClientLocale())) { > > /* Bugzilla 106671 - the non plugin.xml strings like messages have > * been moved from plugin.properties to a file called >@@ -53,7 +53,7 @@ > * eclipse and non-eclipse environments. > */ > try { >- resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME, Locale.getDefault()); >+ resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME, LoggingCoreUtilities.getClientLocale()); > } > catch (MissingResourceException m) { > // Cannot find resource bundle. Return the key.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 124556
: 91496