Changeset 7590

Show
Ignore:
Timestamp:
03/14/07 12:42:45 (22 months ago)
Author:
jburke
Message:

Fix for xdomain 18n resource loading. Previous change to get local i18n bundles to work was flawed. Also rolling back previous buildUtilXd.js since I do not think it is part of the problem. Fixed a test for IE.

Location:
branches/0.4
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/0.4/buildscripts/buildUtilXd.js

    r7587 r7590  
    113113 
    114114        //Final XD file contents. 
    115         var provideString = 'dojo.provide("' + moduleName + '.nls.' + (localeName ? localeName + '.' : '') + bundleName + '");'; 
    116  
    117         fileContents = provideString 
     115        fileContents = 'dojo.provide("' + moduleName + '.nls.' + (localeName ? localeName + '.' : '') + bundleName + '");' 
    118116                         + 'dojo.hostenv.xdLoadFlattenedBundle("' + moduleName + '", "' + bundleName 
    119117                   + '", "' + localeName + '", ' + fileContents + ');'; 
    120118 
    121         //Now make a proper xd.js file out of the content, but 
    122         //only include the dojo.provide statement. We'll leave the bundle contents outside of the 
    123         //xd wrapper. 
    124         var bundleContents = buildUtilXd.makeXdContents(provideString, baseRelativePath, prefixes); 
    125          
    126         //Just inline the real contents right in the file. Its ok if bundles are evaluated right 
    127         //away since they don't have dependencies. 
    128         bundleContents += fileContents; 
    129          
    130         return bundleContents; 
     119        //Now make a proper xd.js file out of the content. 
     120        return buildUtilXd.makeXdContents(fileContents, baseRelativePath, prefixes); 
    131121} 
    132122//END makeXdBundleContents function 
  • branches/0.4/src/loader_xd.js

    r7581 r7590  
    119119                this.xdOrderedReqs.push(module); 
    120120 
    121                 //Add to waiting packages. 
    122                 //Only add it if not a non-xdomain i18n resource bundle. 
    123                 if(currentIsXDomain && uri.indexOf("/nls/") == -1){ 
     121                //Add to waiting packages if it is an xdomain resource. 
     122                if(currentIsXDomain){ 
    124123                        this.xdInFlight[module] = true; 
    125                 } 
    126  
    127                 //Increment inFlightCount 
    128                 //This will stop the modulesLoaded from firing all the way. 
    129                 this.inFlightCount++; 
    130                                  
     124 
     125                        //Increment inFlightCount 
     126                        //This will stop the modulesLoaded from firing all the way. 
     127                        this.inFlightCount++; 
     128                } 
     129 
    131130                //Start timer 
    132131                if(!this.xdTimer){ 
  • branches/0.4/tests/i18n/test_strings.html

    r7572 r7590  
    66                        djConfig = {  
    77                                isDebug: true, 
    8                                 baseScriptUri: "../../", //for xdomain testing. 
     8                                baseScriptUri: "../../" //for xdomain testing. 
    99                        }; 
    1010                </script>