Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1493 closed defect (fixed)

Fix xdomain loading to work with i18n resource bundles

Reported by: James Burke Owned by: James Burke
Priority: high Milestone:
Component: Loader Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

xdomain i18n resource loading is broken. Here are some quick notes on things I need to fix to get it to work:

Issue with nls.dojo_ flattened resources. When can we load them? Have to wait until dojo onload is about to fire, then don't fire, but instead trigger the preload to happen. Hmm. Ick.

For regular, non-flattened resource bundles:

  • Look for dojo.requireLocalization
  • Async load those packages, but only the first path, not all parent locales.
  • Have a task that will flatten resources but don't combine bundles.
  • Need to know if a language has a flattened bundle, or if we should grab root? Or is this is a build property where you tell it which ones you want to support? Makes it harder to share libraries with others. How can we register "supported languages" for a 3rd party package?
  • loader_xd.js: need to change dojo.hostenv.loadUri to return true/false. What about the callback? The i18n stuff seems to rely on it. So need to overwrite dojo.requireLocalization() and not do the callback. Then, when we make the xd.js file for nls files, do the module assignment code that happens in the loader.js callback. Don't have to worry parent locale stuff, because it should be flattened.

Change History (8)

comment:1 Changed 13 years ago by James Burke

(In [6183]) References #1493. These changes allow flattened resources in a custom build to be used in xdomain builds. There may be an encoding issues with the xd bundles, but this is a definite improvement. Still need to do the work of being able to xd load bundles that are not part of the custom build

comment:2 Changed 13 years ago by James Burke

(In [6189]) References #1493: this commit flattens the individual resources for use in xd loading. Still need the xd resources that use dojo.requireLocalization to use and load these flattened bundles.

comment:3 Changed 13 years ago by dylan

severity: normalblocker

comment:4 Changed 13 years ago by James Burke

Milestone: 0.40.4.1

This is partially working:

If you do a custom build that includes resources that use flattened bundles, that case will work.

What doesn't work right is trying to xd load a resource that uses bundles that was not part of the custom build. Pushing that work to 0.4.1.

comment:5 Changed 13 years ago by James Burke

(In [6569]) References #1493. Get i18n bundles to work with xd builds. Still need to do a bit more testing on windows to verify the changes before I push to trunk.

comment:6 Changed 13 years ago by James Burke

(In [6584]) References #1493. Fixes to get windows to build the xd files correctly. Good for trunk now.

comment:7 Changed 13 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [6590]) Fixes #1493, i18n bundle xdomain loading (merged from 0.4.1 branch)

comment:8 Changed 12 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.