Author: blabno
Date: 2011-11-22 01:11:32 -0500 (Tue, 22 Nov 2011)
New Revision: 22966
Modified:
sandbox/trunk/ui/schedule/ui/src/main/java/org/richfaces/renderkit/html/scripts/ScheduleMessages.java
Log:
ScheduleMessages fix.
Modified:
sandbox/trunk/ui/schedule/ui/src/main/java/org/richfaces/renderkit/html/scripts/ScheduleMessages.java
===================================================================
---
sandbox/trunk/ui/schedule/ui/src/main/java/org/richfaces/renderkit/html/scripts/ScheduleMessages.java 2011-11-22
06:10:56 UTC (rev 22965)
+++
sandbox/trunk/ui/schedule/ui/src/main/java/org/richfaces/renderkit/html/scripts/ScheduleMessages.java 2011-11-22
06:11:32 UTC (rev 22966)
@@ -38,7 +38,9 @@
StringBuilder out = new StringBuilder();
out.append("RichFaces.ui.Schedule.prototype.messages=jQuery.extend(RichFaces.ui.Schedule.prototype.messages,{");
Iterator<Locale> supportedLocales = application.getSupportedLocales();
+ int localeCount = 0;
while (supportedLocales.hasNext()) {
+ localeCount++;
Locale locale = supportedLocales.next();
ResourceBundle applicationBundle =
ResourceBundle.getBundle(application.getMessageBundle(), locale, loader);
ResourceBundle stockBundle = ResourceBundle.getBundle(BUNDLE_NAME, locale,
loader);
@@ -60,7 +62,9 @@
"prevYear", "nextYear", "today",
"month", "day", "week"});
out.append("},");
}
- out.delete(out.length() - 1, out.length());
+ if (localeCount > 0) {
+ out.delete(out.length() - 1, out.length());
+ }
out.append("})");
try {
// TODO where to get encoding from? It should match properties file's
encoding, but probably be converted to response encoding
Show replies by date