#7736 closed defect (fixed)
themeTeseter InlineEditBox/TimeTextBox example broken
Reported by: | bill | Owned by: | Adam Peller |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Dijit - Form | Version: | 1.2beta |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In themeTester.html on the InlineEditBox/TimeTextBox example, it originally says "9:00 AM".
This works fine in the 1.1 release (http://download.dojotoolkit.org/release-1.1.1/dojo-release-1.1.1/dijit/themes/themeTester.html) but fails in the latest, http://download.dojotoolkit.org/release-1.2.0rc2/dojo-release-1.2.0rc2/dijit/themes/themeTester.html.
Apparently because "9:00 AM" is no longer valid (and it needs to be "9:00 a.m."). Failure in the sense that as soon as you click it, it turns yellow.
Not sure if we should just update themeTester.html or if we want to classify this as a regression.
(The other thing that changed is that direct input of "9:00 AM" to a TimeTextBox is rejected.
Change History (7)
comment:1 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
So the localizations for en-us did change from 'AM' to 'a.m.' in the latest CLDR. You're right, it may be a separate regression that AM isn't tolerated; we always tried to tolerate both forms with and without periods.
However, the problem here is that the test is not localized. A user running in a non-English locale which uses something other than 'am' would have seen this error all along. I guess normally the server would be responsible for providing correctly localized inline data. I set it up to insert the proper localization at onLoad time.
comment:3 Changed 12 years ago by
Milestone: | tbd → 1.2 |
---|
comment:5 Changed 12 years ago by
OK, then the real issue is #7739.
Dijit's policy is that the server has to localize and translate all text that's part of the HTML page, including the content of InlineEditBoxes. (The exception is value=... fields for NumberTextBox etc.) That's documented in http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/advanced-editing-and-display/inlineeditbox and http://docs.dojocampus.org/dijit/InlineEditBox.
Let's be careful in adding JS code to test files like [15341] to do translation/localization on the client. I don't want to set that example as the standard, since the recommendation is to translate and localize on the server. Since test_InlineEditBox.html and themeTester.html are static HTML files, they were only meant to run in an English locale.
comment:6 Changed 12 years ago by
Yeah, I understand, it's troubling that I put in code to generate inline content in the page. The only other alternative I can think of is to fix the locale of the page by putting in something like djConfig.locale='en-us'; at the top, otherwise the test will basically fail depending on who runs the test. If you think we should take that approach, reopen and let me know.
comment:7 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
(In [15341]) Initialize InlineEditBoxes? with properly localized data. Fixes #7736