зеркало из https://github.com/mozilla/gecko-dev.git
Checking in for Jungshik Shin.
Fix for bug 195093. 'modernize' nsILocale and nsIPlatformCharset. r=smontagu sr=darin
This commit is contained in:
Родитель
3a9888d5b7
Коммит
2e490df717
|
@ -685,7 +685,7 @@ function getStringBundle()
|
|||
const lsContractID = "@mozilla.org/intl/nslocaleservice;1";
|
||||
const lsIID = Components.interfaces.nsILocaleService;
|
||||
const ls = Components.classes[lsContractID].getService(lsIID);
|
||||
var appLocale = ls.GetApplicationLocale();
|
||||
var appLocale = ls.getApplicationLocale();
|
||||
return sbs.createBundle(bundleURL, appLocale);
|
||||
}
|
||||
|
||||
|
|
|
@ -1013,9 +1013,9 @@ var BookmarksUtils = {
|
|||
var BUNDLESVC = Components.classes["@mozilla.org/intl/stringbundle;1"]
|
||||
.getService(Components.interfaces.nsIStringBundleService);
|
||||
var bookmarksBundle = "chrome://browser/locale/bookmarks/bookmarks.properties";
|
||||
this._bundle = BUNDLESVC.createBundle(bookmarksBundle, LOCALESVC.GetApplicationLocale());
|
||||
this._bundle = BUNDLESVC.createBundle(bookmarksBundle, LOCALESVC.getApplicationLocale());
|
||||
var brandBundle = "chrome://global/locale/brand.properties";
|
||||
this._brandShortName = BUNDLESVC.createBundle(brandBundle, LOCALESVC.GetApplicationLocale())
|
||||
this._brandShortName = BUNDLESVC.createBundle(brandBundle, LOCALESVC.getApplicationLocale())
|
||||
.GetStringFromName("brandShortName");
|
||||
}
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@
|
|||
var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
|
||||
.getService(Components.interfaces.nsIStringBundleService);
|
||||
var bundleURL = "chrome://global/locale/tabbrowser.properties";
|
||||
this._mStrBundle = stringBundleService.createBundle(bundleURL, localeService.GetApplicationLocale());
|
||||
this._mStrBundle = stringBundleService.createBundle(bundleURL, localeService.getApplicationLocale());
|
||||
}
|
||||
return this._mStrBundle;
|
||||
]]></getter>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
try {
|
||||
var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"]
|
||||
.getService(Components.interfaces.nsILocaleService);
|
||||
return localeService.GetApplicationLocale();
|
||||
return localeService.getApplicationLocale();
|
||||
}
|
||||
catch (ex) {
|
||||
return null;
|
||||
|
|
|
@ -154,7 +154,7 @@
|
|||
.getService(Components.interfaces.nsILocaleService);
|
||||
var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);
|
||||
var bundleURL = "chrome://global/locale/wizard.properties";
|
||||
this._bundle = stringBundleService.createBundle(bundleURL, localeService.GetApplicationLocale());
|
||||
this._bundle = stringBundleService.createBundle(bundleURL, localeService.getApplicationLocale());
|
||||
|
||||
// get anonymous content references
|
||||
this._wizardHeader = document.getAnonymousElementByAttribute(this, "anonid", "Header");
|
||||
|
|
|
@ -820,9 +820,9 @@ getUILangCountry(nsAString& aUILang, nsAString& aCountry)
|
|||
nsCOMPtr<nsILocaleService> localeService = do_GetService(NS_LOCALESERVICE_CONTRACTID, &result);
|
||||
NS_ASSERTION(NS_SUCCEEDED(result),"getUILangCountry: get locale service failed");
|
||||
|
||||
nsXPIDLString uiLang;
|
||||
result = localeService->GetLocaleComponentForUserAgent(getter_Copies(uiLang));
|
||||
aUILang = uiLang;
|
||||
result = localeService->GetLocaleComponentForUserAgent(aUILang);
|
||||
NS_ASSERTION(NS_SUCCEEDED(result),
|
||||
"getUILangCountry: get locale componet for user agent failed");
|
||||
result = getCountry(aUILang, aCountry);
|
||||
return result;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче