Author: craigmcc
Date: Fri Apr 29 17:57:29 2005
New Revision: 165366
URL: http://svn.apache.org/viewcvs?rev=165366&view=rev
Log:
Fix i18n problems when running on a server whose default locale is not English.
Thanks for the patch!
PR: Bugzilla #34658
Submitted By: Manfred Klug <manklu AT web.de>
Modified:
struts/shale/trunk/core-library/build.xml
struts/shale/trunk/use-cases/build.xml
struts/shale/trunk/use-cases/src/java/org/apache/shale/usecases/view/Domains.java
Modified: struts/shale/trunk/core-library/build.xml
URL:
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/build.xml?rev=165366&r1=165365&r2=165366&view=diff
==============================================================================
--- struts/shale/trunk/core-library/build.xml (original)
+++ struts/shale/trunk/core-library/build.xml Fri Apr 29 17:57:29 2005
@@ -264,6 +264,11 @@
<copy tofile="${build.home}/classes/META-INF/NOTICE.txt"
file="NOTICE.txt"/>
+ <!-- Copy the validator default message bundle to avoid problems if the
+ server locale is not English. -->
+ <copy
file="src/java/org/apache/shale/validator/messages.properties"
+
tofile="${build.home}/classes/org/apache/shale/validator/messages_en.properties"/>
+
</target>
Modified: struts/shale/trunk/use-cases/build.xml
URL:
http://svn.apache.org/viewcvs/struts/shale/trunk/use-cases/build.xml?rev=165366&r1=165365&r2=165366&view=diff
==============================================================================
--- struts/shale/trunk/use-cases/build.xml (original)
+++ struts/shale/trunk/use-cases/build.xml Fri Apr 29 17:57:29 2005
@@ -345,6 +345,11 @@
</fileset>
</copy>
+ <!-- Copy the default message bundle to avoid problems if the
+ server locale is not English. -->
+ <copy
file="src/java/org/apache/shale/usecases/view/Bundle.properties"
+
tofile="${build.home}/${context.path}/WEB-INF/classes/org/apache/shale/usecases/view/Bundle_en.properties"/>
+
</target>
Modified:
struts/shale/trunk/use-cases/src/java/org/apache/shale/usecases/view/Domains.java
URL:
http://svn.apache.org/viewcvs/struts/shale/trunk/use-cases/src/java/org/apache/shale/usecases/view/Domains.java?rev=165366&r1=165365&r2=165366&view=diff
==============================================================================
---
struts/shale/trunk/use-cases/src/java/org/apache/shale/usecases/view/Domains.java
(original)
+++
struts/shale/trunk/use-cases/src/java/org/apache/shale/usecases/view/Domains.java
Fri Apr 29 17:57:29 2005
@@ -109,7 +109,7 @@
int id = 0;
String label = null;
while (true) {
- label = messages.getMessage("category." + id);
+ label = messages.getMessage("category." + id, locale);
if (label == null) {
break;
}
@@ -168,7 +168,8 @@
while (supporteds.hasNext()) {
Locale supported = (Locale) supporteds.next();
item = new SelectItem(supported.toString(),
- messages.getMessage("locale." +
supported.toString()));
+ messages.getMessage("locale." +
supported.toString(),
+ locale));
list.add(item);
}
items = (SelectItem[]) list.toArray(new SelectItem[list.size()]);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]