| Summary: | NLS Bundle Caching does not seem to work with Dojo 1.7.4 | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Brian Svihovec <svihovec> |
| Component: | Client | Assignee: | Project Inbox <orion.client-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 2.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html |
I have seen the following behavior when a message bundle is cached using Dojo 1.7.4 (the type of JS Runtime might not matter?). When the bundle is being cached, the object looks like the following in Chrome Debug: bundle: TMP __proto__: Object KEY1: A KEY2: B The bundle caching code in i18nUtil::setCachedMessageBundle invokes 'JSON.stringify(bundle)' on the object above and persists the value to the store. When the bundle is loaded, i18nUtil::getCachedMessageBundle invokes: var item = localStorage.getItem('orion/messageBundle/' + name); if (item) { var bundle = JSON.parse(item); if (bundle._expires && bundle._expires > new Date().getTime()) { delete bundle._expires; return bundle; } } the value of 'bundle' after JSON.parse(item) is: bundle: Object _expires: 1371146890200 __proto__: Object toString valueOf toLocalString (other native functions) The Key/Value pairs representing the NLS values are missing.