CustomDatepicker mixin is missing locale
rjmveloso opened this issue · comments
CustomDatepicker needs locale attribute on spec on Java side.
There's a private getLocale method that is not being used.
Currently we are also experiencing the same issue.
ThreadLocale contains some Language and Country Locale
The CustomDatepicker creates a link to the following resource
http://localhost:8080/modules.gz/tjq/vendor/ui/i18n/jquery.ui.datepicker-en_GB.js
This resource does not exist, the correct locale format is "en-GB".
There is code in CustomDatepicker which handles correct local string generation, but its not called.
It looks like a standard Locale.toString ist used.
ConfigureHTMLElementFilter
writes the ThreadLocale to the Element as Attribute data-locale
.
This data-locale
is directly used by the javascript.
This is a major issue regarding i18n.
As the core authors are based in france, this must be an issue also for them?
The date picker will never work for fr_CH, fr_IT, fr_BE and so on...
Quick fix would be replacing all "_" (Underscores) by "-" (Minus) in
Line 2 of tapestry5-jquery/src/main/resources/META-INF/modules/tjq/customdatepicker.js
Hello Thomas,
Thank's for the feedback.
This should be fix now in latest snapshot version.