Return-Path: Delivered-To: apmail-click-dev-archive@www.apache.org Received: (qmail 20153 invoked from network); 16 Feb 2010 09:43:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Feb 2010 09:43:05 -0000 Received: (qmail 79209 invoked by uid 500); 16 Feb 2010 09:43:05 -0000 Delivered-To: apmail-click-dev-archive@click.apache.org Received: (qmail 79172 invoked by uid 500); 16 Feb 2010 09:43:05 -0000 Mailing-List: contact dev-help@click.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@click.apache.org Delivered-To: mailing list dev@click.apache.org Received: (qmail 79164 invoked by uid 99); 16 Feb 2010 09:43:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2010 09:43:05 +0000 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gcwcd-click-development-2@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2010 09:42:55 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NhJwv-00066R-Gi for dev@click.apache.org; Tue, 16 Feb 2010 10:42:33 +0100 Received: from 85.122.62.212 ([85.122.62.212]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Feb 2010 10:42:33 +0100 Received: from a.adrian.tech by 85.122.62.212 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Feb 2010 10:42:33 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: dev@click.apache.org From: "Adrian A." Subject: Re: [jira] Updated: (CLK-624) Add missing translations for Date Field Date: Tue, 16 Feb 2010 10:42:10 +0100 Lines: 15 Message-ID: References: <1190490654.256041266092548592.JavaMail.jira@brutus.apache.org> <468978540.294761266310347998.JavaMail.jira@brutus.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 85.122.62.212 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 In-Reply-To: <468978540.294761266310347998.JavaMail.jira@brutus.apache.org> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org > This patch injects javascript that defines Date.month, Date.monthAbbreviations, Date.dayNames and Date.dayAbbreviations with values from DateFormatSymbols. With these definition the date string generated by the javascript calendar is always a valid date that can be parsed by java's dateparser. So the list of supported languages are then no longer needed. > > Regarding the remaining translations, I would *strongly* prefer that they were read from the DateField property file and injected into the javascript the same way as month names. So that all string are translated in the same way. +1 for this Java approach (for all languages of course). It's the same way it's done for the CountrySelect control, where it's the responsibility of the JDK to generate the country names and country ISO codes (it does that for much more languages we could possibly translate to). Even, more, IMHO if there are other i18n messages in the JDK that we could re-use in other components, it might be a good idea to collect that info in a WIKI page, so that future components don't have to "reinvent the wheel" :). Adrian.