Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 410755

Summary: NLS Bundle Caching does not seem to work with Dojo 1.7.4
Product: [ECD] Orion Reporter: Brian Svihovec <svihovec>
Component: ClientAssignee: 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:

Description Brian Svihovec CLA 2013-06-13 13:58:33 EDT
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.
Comment 1 John Arthorne CLA 2015-05-05 16:19:39 EDT
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