[jboss-cvs] jboss-seam/src/main/org/jboss/seam/international ...
Gavin King
gavin.king at jboss.com
Tue Jul 10 12:46:58 EDT 2007
User: gavin
Date: 07/07/10 12:46:58
Modified: src/main/org/jboss/seam/international LocaleSelector.java
Messages.java
Log:
redesigned resource bundle handling
Revision Changes Path
1.7 +1 -1 jboss-seam/src/main/org/jboss/seam/international/LocaleSelector.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LocaleSelector.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/international/LocaleSelector.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- LocaleSelector.java 10 Jul 2007 10:23:20 -0000 1.6
+++ LocaleSelector.java 10 Jul 2007 16:46:58 -0000 1.7
@@ -63,7 +63,7 @@
public void select()
{
FacesContext.getCurrentInstance().getViewRoot().setLocale( getLocale() );
- Contexts.removeFromAllContexts("org.jboss.seam.core.resourceBundle");
+ //Contexts.removeFromAllContexts("org.jboss.seam.core.resourceBundle");
Contexts.removeFromAllContexts("org.jboss.seam.international.messages");
setCookieValueIfEnabled( getLocaleString() );
1.8 +5 -8 jboss-seam/src/main/org/jboss/seam/international/Messages.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Messages.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/international/Messages.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- Messages.java 10 Jul 2007 13:12:47 -0000 1.7
+++ Messages.java 10 Jul 2007 16:46:58 -0000 1.8
@@ -18,14 +18,13 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.core.ResourceBundle;
+import org.jboss.seam.core.SeamResourceBundle;
/**
- * Factory for a Map that interpolates messages defined in the
+ * Factory for a Map that contains interpolated messages defined in the
* Seam ResourceBundle.
*
- * @see org.jboss.seam.core.ResourceBundle
+ * @see org.jboss.seam.core.SeamResourceBundle
*
* @author Gavin King
*/
@@ -41,7 +40,7 @@
{
return new AbstractMap<String, String>()
{
- private java.util.ResourceBundle bundle = ResourceBundle.instance();
+ private java.util.ResourceBundle bundle = SeamResourceBundle.getBundle();
@Override
public String get(Object key)
@@ -61,9 +60,7 @@
//Just swallow
}
}
- return resource==null ?
- resourceKey :
- Interpolator.instance().interpolate(resource);
+ return resource==null ? resourceKey : resource;
}
else
{
More information about the jboss-cvs-commits
mailing list