incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1229416 - in /incubator/lcf/trunk: CHANGES.txt framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
Date Mon, 09 Jan 2012 23:12:38 GMT
Author: kwright
Date: Mon Jan  9 23:12:38 2012
New Revision: 1229416

URL: http://svn.apache.org/viewvc?rev=1229416&view=rev
Log:
Fix for CONNECTORS-370.

Modified:
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1229416&r1=1229415&r2=1229416&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Mon Jan  9 23:12:38 2012
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 0.5-dev =====================
 
+CONNECTORS-370: Fix the use of MessageFormat for expanding
+message arguments so that the proper locale is used.
+(Karl Wright)
+
 CONNECTORS-365: Internationalize SharePoint connector fully.
 (Hitoshi Ozawa, Karl Wright)
 

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java?rev=1229416&r1=1229415&r2=1229416&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
(original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
Mon Jan  9 23:12:38 2012
@@ -150,7 +150,9 @@ public class Messages
     String formatMessage;
     if (args != null)
     {
-      formatMessage = MessageFormat.format(message, args);
+      MessageFormat fm = new MessageFormat(message);
+      fm.setLocale(locale);
+      formatMessage = fm.format(args);
     }
     else
     {



Mime
View raw message