[jira] Commented: (CLK-650) Load DateField translations from JDK
[ https://issues.apache.org/jira/browse/CLK-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883455#action_12883455 ] Finn Bock commented on CLK-650: --- The keys in DateField.properties are: date-title. The title attribute of the input field. calendar-image-title. The title attribute of the calendar image icon calendar-weekdays-heading. A comma separated list of abbreviated week day names starting with Sunday. The default value is "S,M,T,W,T,F,S". If not defined for a locale, the abbreviated week day names from the JDK is used. The names are used as column heading in the popup. calendar-ok. The label on the "OK" button. calendar-now. The label on the "Now" button. calendar-today. The label on the "Today" button. calendar-clear. The label on the "Clear" button. date-format-pattern. The pattern > Load DateField translations from JDK > > > Key: CLK-650 > URL: https://issues.apache.org/jira/browse/CLK-650 > Project: Click > Issue Type: Improvement > Components: extras >Affects Versions: 2.2.0 >Reporter: Bob Schellink >Assignee: Finn Bock >Priority: Minor > Fix For: 2.3.0-M1 > > Attachments: datefield.patch, datefield_no_js.patch > > > From CLK-624: > Before we all go ahead and submit translations for month and day names (and > abbreviations), I think it would make more sense for DateField to generate > these names from here: > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getWeekdays%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortWeekdays%28%29 > By creating the arrays from java's names we will AFAIK also instantly > "support" all language so that DateField.SUPPORTTED_LANGUAGES can be removed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (CLK-650) Load DateField translations from JDK
[ https://issues.apache.org/jira/browse/CLK-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882630#action_12882630 ] Adrian A. commented on CLK-650: --- > patch (with fix for multiple date fields) applied. Could you please describe for this "new" DateField what Keys really need to be translated to the various languages cause I see many inconsistencies between keys of the various languages? Thank you, Adrian. > Load DateField translations from JDK > > > Key: CLK-650 > URL: https://issues.apache.org/jira/browse/CLK-650 > Project: Click > Issue Type: Improvement > Components: extras >Affects Versions: 2.2.0 >Reporter: Bob Schellink >Assignee: Finn Bock >Priority: Minor > Fix For: 2.3.0-M1 > > Attachments: datefield.patch, datefield_no_js.patch > > > From CLK-624: > Before we all go ahead and submit translations for month and day names (and > abbreviations), I think it would make more sense for DateField to generate > these names from here: > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getWeekdays%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortWeekdays%28%29 > By creating the arrays from java's names we will AFAIK also instantly > "support" all language so that DateField.SUPPORTTED_LANGUAGES can be removed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (CLK-650) Load DateField translations from JDK
[ https://issues.apache.org/jira/browse/CLK-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882534#action_12882534 ] Finn Bock commented on CLK-650: --- > With regards to the default date format, it is quite easy to change globally > in an application page.properties files: > date-format-pattern=dd/MM/ I would not do that. Of the 135 locales in my jdk1.6, only 32 uses dd/MM/. It would IMO be better if the default pattern was taken from DateFormat.getDateInstance(MEDIUM) if date-format-pattern is unspecified. That way the default is reasonable and it is possible to override if the locales default is too old-fashioned or cumbersome. However, that is for another JIRA issue and patch. > Load DateField translations from JDK > > > Key: CLK-650 > URL: https://issues.apache.org/jira/browse/CLK-650 > Project: Click > Issue Type: Improvement > Components: extras >Affects Versions: 2.2.0 >Reporter: Bob Schellink >Assignee: Finn Bock >Priority: Minor > Attachments: datefield.patch, datefield_no_js.patch > > > From CLK-624: > Before we all go ahead and submit translations for month and day names (and > abbreviations), I think it would make more sense for DateField to generate > these names from here: > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getWeekdays%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortWeekdays%28%29 > By creating the arrays from java's names we will AFAIK also instantly > "support" all language so that DateField.SUPPORTTED_LANGUAGES can be removed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (CLK-650) Load DateField translations from JDK
[ https://issues.apache.org/jira/browse/CLK-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882501#action_12882501 ] Bob Schellink commented on CLK-650: --- Good points Finn. Think this can go in. We should add a note on the upgrade path about this change as it could affect existing systems, but probably in a good way. With regards to the default date format, it is quite easy to change globally in an application page.properties files: date-format-pattern=dd/MM/ Another optimization we could add is to define static defaults to cut down on the amount of setup options being rendered. For example we only need to render the JS options 'buttons, time, formatValue, and year_range' if the differ from the default value. If you don't have time to add this I'll try and get it done. > Load DateField translations from JDK > > > Key: CLK-650 > URL: https://issues.apache.org/jira/browse/CLK-650 > Project: Click > Issue Type: Improvement > Components: extras >Affects Versions: 2.2.0 >Reporter: Bob Schellink >Assignee: Finn Bock >Priority: Minor > Attachments: datefield.patch, datefield_no_js.patch > > > From CLK-624: > Before we all go ahead and submit translations for month and day names (and > abbreviations), I think it would make more sense for DateField to generate > these names from here: > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getWeekdays%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortWeekdays%28%29 > By creating the arrays from java's names we will AFAIK also instantly > "support" all language so that DateField.SUPPORTTED_LANGUAGES can be removed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (CLK-650) Load DateField translations from JDK
[ https://issues.apache.org/jira/browse/CLK-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882279#action_12882279 ] Finn Bock commented on CLK-650: --- I find it unreasonable to leave translations of day and month names to our users. Including English, we have 10 translations. 5 of them (da, de, fi, fr & pt) are so incorrect that the popup becomes useless. Try picking a date in october with a german (de) locale and press Submit: http://www.avoka.com/click-examples/form/extra-controls-form.htm The field value is "20 Oct 2010" and mesages is: Date Field ist ungültig. Das Datums-Format ist dd MMM And for all the languages for which we do not have a .js file, we demand that users must type in english month and day names! I would expect most uses of the DateField to use a number only date format to avoid these issues. I suppose we could generate cacheable javascript files with the correct day and month names for each locale with a custom ant task during the build but I find that to be overkill. Re. multiple date fields in formtables, then you are right, that is bug in my patch. The translations should only be added to the page once. I'll upload a new patch. > Load DateField translations from JDK > > > Key: CLK-650 > URL: https://issues.apache.org/jira/browse/CLK-650 > Project: Click > Issue Type: Improvement > Components: extras >Affects Versions: 2.2.0 >Reporter: Bob Schellink >Assignee: Finn Bock >Priority: Minor > Attachments: datefield.patch, datefield_no_js.patch > > > From CLK-624: > Before we all go ahead and submit translations for month and day names (and > abbreviations), I think it would make more sense for DateField to generate > these names from here: > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getWeekdays%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortWeekdays%28%29 > By creating the arrays from java's names we will AFAIK also instantly > "support" all language so that DateField.SUPPORTTED_LANGUAGES can be removed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (CLK-650) Load DateField translations from JDK
[ https://issues.apache.org/jira/browse/CLK-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881949#action_12881949 ] Bob Schellink commented on CLK-650: --- Thinking a about this today, one of the nice things about using Javascript to localize messages is the translations are externalized into a JS file which gets download once and cached by the browser. The proposed change will "inline" the translations, which becomes part of the page markup. It could have performance impact in a scenario where a page uses a FormTable with multiple datefield columns. PS: a bit off topic but we really should try and find a replacement for the DateField Javascript library. The JS popup library is now unmaintained and quite sluggish on IE. It is also tied to the Prototype library which doesn't play nice with other libraries. > Load DateField translations from JDK > > > Key: CLK-650 > URL: https://issues.apache.org/jira/browse/CLK-650 > Project: Click > Issue Type: Improvement > Components: extras >Affects Versions: 2.2.0 >Reporter: Bob Schellink >Assignee: Finn Bock >Priority: Minor > Attachments: datefield.patch, datefield_no_js.patch > > > From CLK-624: > Before we all go ahead and submit translations for month and day names (and > abbreviations), I think it would make more sense for DateField to generate > these names from here: > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortMonths%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getWeekdays%28%29 > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormatSymbols.html#getShortWeekdays%28%29 > By creating the arrays from java's names we will AFAIK also instantly > "support" all language so that DateField.SUPPORTTED_LANGUAGES can be removed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
