Michael, Thank you for the patch! It is wonderful to see people from the community stepping up with these kinds of fixes and improvements.
Alas, we can't use the patch if provided via the email list; per Apache guidelines, all patches must be added as attachments to a JIRA issue. This gives you a chance to definitively click the "I'm giving all rights to the ASF" button, which is important for maintaining the license purity of the Apache Tapestry source code. Thanks for your help, Howard P.S. This behavior, localization of those two buttons, is already part of Tapestry 5.4. On Tue, Nov 13, 2012 at 5:50 AM, Michael Wyraz <[email protected]>wrote: > From 38237c181334aa28dec7394755732c**b19353f4b5 Tue, 13 Nov 2012 14:49:46 > +0100 > From: Michael Wyraz <[email protected]> > Date: Tue, 13 Nov 2012 14:37:57 +0100 > Subject: [PATCH] TAP5-1027 DatePicker component: "None", "Today" buttons > localisation > > diff --git > a/tapestry-core/src/main/java/**org/apache/tapestry5/corelib/**components/DateField.java > b/tapestry-core/src/main/java/**org/apache/tapestry5/corelib/** > components/DateField.java > index 39ed01b..edf61bb 100644 > --- a/tapestry-core/src/main/java/**org/apache/tapestry5/corelib/** > components/DateField.java > +++ b/tapestry-core/src/main/java/**org/apache/tapestry5/corelib/** > components/DateField.java > @@ -245,6 +245,7 @@ > spec.put("parseURL", resources.createEventLink("** > parse").toURI()); > spec.put("formatURL", resources.createEventLink("** > format").toURI()); > > + > support.addScript("DatePicker.**buttonToday='%s';DatePicker.**buttonNone='%s'", > messages.get("datepicker-**button-today"),messages.get("** > datepicker-button-none")); > support.addInitializerCall("**dateField", spec); > } > > diff --git a/tapestry-core/src/main/**resources/org/apache/** > tapestry5/corelib/components/**DateField.properties > b/tapestry-core/src/main/**resources/org/apache/** > tapestry5/corelib/components/**DateField.properties > index d1f326f..4cb37f9 100644 > --- a/tapestry-core/src/main/**resources/org/apache/** > tapestry5/corelib/components/**DateField.properties > +++ b/tapestry-core/src/main/**resources/org/apache/** > tapestry5/corelib/components/**DateField.properties > @@ -13,3 +13,5 @@ > # limitations under the License. > > date-value-not-parseable=Date value '%s' is not parseable. > +datepicker-button-today=Today > +datepicker-button-none=None > diff --git a/tapestry-core/src/main/**resources/org/apache/** > tapestry5/corelib/components/**DateField_de.properties > b/tapestry-core/src/main/**resources/org/apache/** > tapestry5/corelib/components/**DateField_de.properties > index 27c7282..e697f18 100644 > --- a/tapestry-core/src/main/**resources/org/apache/** > tapestry5/corelib/components/**DateField_de.properties > +++ b/tapestry-core/src/main/**resources/org/apache/** > tapestry5/corelib/components/**DateField_de.properties > @@ -13,3 +13,5 @@ > # limitations under the License. > > date-value-not-parseable=**Datumswert '%s' kann nicht geparst werden. > +datepicker-button-today=heute > +datepicker-button-none=kein > diff --git a/tapestry-core/src/main/**resources/org/apache/** > tapestry5/datepicker_106/js/**datepicker.js b/tapestry-core/src/main/** > resources/org/apache/**tapestry5/datepicker_106/js/**datepicker.js > index 5033ad4..5b95c6e 100644 > --- a/tapestry-core/src/main/**resources/org/apache/** > tapestry5/datepicker_106/js/**datepicker.js > +++ b/tapestry-core/src/main/**resources/org/apache/** > tapestry5/datepicker_106/js/**datepicker.js > @@ -90,6 +90,8 @@ > "May", "June", "July", "August", > "September", "October", "November", "December"]; > DatePicker.days = ["m", "t", "w", "t", "f", "s", "s"]; > +DatePicker.buttonToday = "Today"; > +DatePicker.buttonNone = "None"; > > > // Function invoked whenever the selected date changes, whether by > @@ -187,7 +189,7 @@ > this._todayButton = doc.createElement("button"); > this._todayButton.className = "todayButton"; > this._todayButton.**setAttribute("type", "button"); > - this._todayButton.appendChild(**doc.createTextNode("Today")); > + this._todayButton.appendChild(**doc.createTextNode(DatePicker.** > buttonToday)); > td.appendChild(this._**todayButton); > tr.appendChild(td); > > @@ -200,7 +202,7 @@ > this._noneButton = doc.createElement("button"); > this._noneButton.className = "noneButton"; > this._noneButton.setAttribute(**"type", "button"); > - this._noneButton.appendChild(**doc.createTextNode("None")); > + this._noneButton.appendChild(**doc.createTextNode(DatePicker.** > buttonNone)); > td.appendChild(this._**noneButton); > tr.appendChild(td); > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > dev-unsubscribe@tapestry.**apache.org<[email protected]> > For additional commands, e-mail: [email protected] > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
