dojo.hostenv.preloadLocalizations(); var targetLocale = dojo.hostenv.normalizeLocale(locale); var bundlePackage = [moduleName, "nls", bundleName].join("."); 
dojo.hostenv.preloadLocalizations(); var targetLocale = dojo.hostenv.normalizeLocale(locale); var bundlePackage = [moduleName, "nls", bundleName].join("."); 
dojo.requireLocalization = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale, /*String?*/availableFlatLocales){// summary://	Declares translated resources and loads them if necessary, in the same style as dojo.require.//	Contents of the resource bundle are typically strings, but may be any name/value pair,//	represented in JSON format.  See also dojo.i18n.getLocalization.//// moduleName: name of the package containing the "nls" directory in which the bundle is found// bundleName: bundle name, i.e. the filename without the '.js' suffix// locale: the locale to load (optional)  By default, the browser's user locale as defined by dojo.locale// availableFlatLocales: A comma-separated list of the available, flattened locales for this bundle.// This argument should only be set by the build process.//// description://	Load translated resource bundles provided underneath the "nls" directory within a package.//	Translated resources may be located in different packages throughout the source tree.  For example,//	a particular widget may define one or more resource bundles, structured in a program as follows,//	where moduleName is mycode.mywidget and bundleNames available include bundleone and bundletwo://	...//	mycode///	 mywidget///	  nls///	   bundleone.js (the fallback translation, English in this example)//	   bundletwo.js (also a fallback translation)//	   de///	    bundleone.js//	    bundletwo.js//	   de-at///	    bundleone.js//	   en///	    (empty; use the fallback translation)//	   en-us///	    bundleone.js//	   en-gb///	    bundleone.js//	   es///	    bundleone.js//	    bundletwo.js//	  ...etc//	...//	Each directory is named for a locale as specified by RFC 3066, (http://www.ietf.org/rfc/rfc3066.txt),//	normalized in lowercase.  Note that the two bundles in the example do not define all the same variants.//	For a given locale, bundles will be loaded for that locale and all more general locales above it, including//	a fallback at the root directory.  For example, a declaration for the "de-at" locale will first//	load nls/de-at/bundleone.js, then nls/de/bundleone.js and finally nls/bundleone.js.  The data will//	be flattened into a single Object so that lookups will follow this cascading pattern.  An optional build//	step can preload the bundles to avoid data redundancy and the multiple network hits normally required to//	load these resources.	dojo.hostenv.preloadLocalizations();	var targetLocale = dojo.hostenv.normalizeLocale(locale); 	var bundlePackage = [moduleName, "nls", bundleName].join(".");//NOTE: When loading these resources, the packaging does not match what is on disk.  This is an// implementation detail, as this is just a private data structure to hold the loaded resources.// e.g. tests/hello/nls/en-us/salutations.js is loaded as the object tests.hello.nls.salutations.en_us={...}// The structure on disk is intended to be most convenient for developers and translators, but in memory// it is more logical and efficient to store in a different order.  Locales cannot use dashes, since the// resulting path will not evaluate as valid JS, so we translate them to underscores.		//Find the best-match locale to load if we have available flat locales.	var bestLocale = "";	if(availableFlatLocales){		var flatLocales = availableFlatLocales.split(",");		for(var i = 0; i < flatLocales.length; i++){			//Locale must match from start of string.			if(targetLocale.indexOf(flatLocales[i]) == 0){				if(flatLocales[i].length > bestLocale.length){					bestLocale = flatLocales[i];				}			}		}		if(!bestLocale){			bestLocale = "ROOT";		}			}	//See if the desired locale is already loaded.	var tempLocale = availableFlatLocales ? bestLocale : targetLocale;	var bundle = dojo.hostenv.findModule(bundlePackage);	var localizedBundle = null;	if(bundle){		if(djConfig.localizationComplete && bundle._built){return;}		var jsLoc = tempLocale.replace('-', '_');		var translationPackage = bundlePackage+"."+jsLoc;		localizedBundle = dojo.hostenv.findModule(translationPackage);	}	if(!localizedBundle){		bundle = dojo.hostenv.startPackage(bundlePackage);		var syms = dojo.hostenv.getModuleSymbols(moduleName);		var modpath = syms.concat("nls").join("/");		var parent;		dojo.hostenv.searchLocalePath(tempLocale, availableFlatLocales, function(loc){			var jsLoc = loc.replace('-', '_');			var translationPackage = bundlePackage + "." + jsLoc;			var loaded = false;			if(!dojo.hostenv.findModule(translationPackage)){				// Mark loaded whether it's found or not, so that further load attempts will not be made				dojo.hostenv.startPackage(translationPackage);				var module = [modpath];				if(loc != "ROOT"){module.push(loc);}				module.push(bundleName);				var filespec = module.join("/") + '.js';				loaded = dojo.hostenv.loadPath(filespec, null, function(hash){					// Use singleton with prototype to point to parent bundle, then mix-in result from loadPath					var clazz = function(){};					clazz.prototype = parent;					bundle[jsLoc] = new clazz();					for(var j in hash){ bundle[jsLoc][j] = hash[j]; }				});			}else{				loaded = true;			}			if(loaded && bundle[jsLoc]){				parent = bundle[jsLoc];			}else{				bundle[jsLoc] = parent;			}						if(availableFlatLocales){				//Stop the locale path searching if we know the availableFlatLocales, since				//the first call to this function will load the only bundle that is needed.				return true;			}		});	}	//Save the best locale bundle as the target locale bundle when we know the	//the available bundles.	if(availableFlatLocales && targetLocale != bestLocale){		bundle[targetLocale.replace('-', '_')] = bundle[bestLocale.replace('-', '_')];	}};
6315	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6315/2f1d2cb699c9d9329e8b782b0463156e211cb0f6/struts_dojo.js.uncompressed.js/buggy/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js