зеркало из https://github.com/mozilla/gecko-dev.git
mozilla tree r=tao, sr=alecf. commercial tree r=syd, sr=syd/shaver. lowercasing the first char in JS method calls to createBundle. removing the dead locale parameter in the CreateBundle() method call. 76332
This commit is contained in:
Родитель
217dd213c6
Коммит
54db7dffa3
|
@ -1159,9 +1159,8 @@ Localize(char *genericString, nsString &result)
|
|||
nsCRT::free(spec);
|
||||
return ret;
|
||||
}
|
||||
nsILocale *locale = nsnull;
|
||||
nsIStringBundle *bundle = nsnull;
|
||||
ret = pStringService->CreateBundle(spec, locale, &bundle);
|
||||
ret = pStringService->CreateBundle(spec, &bundle);
|
||||
nsCRT::free(spec);
|
||||
nsServiceManager::ReleaseService(kStringBundleServiceCID, pStringService);
|
||||
if (NS_FAILED(ret)) {
|
||||
|
|
|
@ -468,8 +468,7 @@ nsresult nsImageDocument::UpdateTitle( void )
|
|||
// Create a bundle for the localization
|
||||
NS_WITH_SERVICE(nsIStringBundleService, stringService, kStringBundleServiceCID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && stringService) {
|
||||
nsCOMPtr<nsILocale> locale = nsnull;
|
||||
rv = stringService->CreateBundle(NSIMAGEDOCUMENT_PROPERTIES_URI, locale, getter_AddRefs(bundle));
|
||||
rv = stringService->CreateBundle(NSIMAGEDOCUMENT_PROPERTIES_URI, getter_AddRefs(bundle));
|
||||
}
|
||||
if (NS_SUCCEEDED(rv) && bundle) {
|
||||
nsAutoString key;
|
||||
|
|
|
@ -67,7 +67,6 @@
|
|||
#include "nsIProgressEventSink.h"
|
||||
#include "nsIWebProgress.h"
|
||||
#include "nsILayoutHistoryState.h"
|
||||
#include "nsILocaleService.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsIFileStream.h"
|
||||
#include "nsISHistoryInternal.h"
|
||||
|
@ -4289,7 +4288,6 @@ NS_IMETHODIMP nsDocShell::LoadHistoryEntry(nsISHEntry* aEntry, PRUint32 aLoadTyp
|
|||
NS_ENSURE_SUCCESS(hEntry->GetURI(getter_AddRefs(uri)), NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(aEntry->GetReferrerURI(getter_AddRefs(referrerURI)), NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(aEntry->GetPostData(getter_AddRefs(postData)), NS_ERROR_FAILURE);
|
||||
|
||||
NS_ENSURE_SUCCESS(InternalLoad(uri, referrerURI, nsnull, PR_TRUE, PR_FALSE, nsnull,
|
||||
postData, nsnull, aLoadType, aEntry),
|
||||
NS_ERROR_FAILURE);
|
||||
|
@ -4521,17 +4519,10 @@ NS_IMETHODIMP nsDocShell::GetPromptAndStringBundle(nsIPrompt** aPrompt,
|
|||
{
|
||||
NS_ENSURE_SUCCESS(GetInterface(NS_GET_IID(nsIPrompt), (void**)aPrompt), NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsILocaleService> localeService(do_GetService(NS_LOCALESERVICE_CONTRACTID));
|
||||
NS_ENSURE_TRUE(localeService, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsILocale> locale;
|
||||
localeService->GetSystemLocale(getter_AddRefs(locale));
|
||||
NS_ENSURE_TRUE(locale, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> stringBundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID));
|
||||
NS_ENSURE_TRUE(stringBundleService, NS_ERROR_FAILURE);
|
||||
|
||||
NS_ENSURE_SUCCESS(stringBundleService->CreateBundle(DIALOG_STRING_URI, locale,
|
||||
NS_ENSURE_SUCCESS(stringBundleService->CreateBundle(DIALOG_STRING_URI,
|
||||
getter_AddRefs(aStringBundle)), NS_ERROR_FAILURE);
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -296,8 +296,7 @@ nsEditorShell::Init()
|
|||
NS_WARNING("ERROR: Failed to get StringBundle Service instance.\n");
|
||||
return res;
|
||||
}
|
||||
nsILocale* aLocale = nsnull;
|
||||
res = stringBundleService->CreateBundle(EDITOR_BUNDLE_URL, aLocale, getter_AddRefs(mStringBundle));
|
||||
res = stringBundleService->CreateBundle(EDITOR_BUNDLE_URL, getter_AddRefs(mStringBundle));
|
||||
|
||||
// XXX: why are we returning NS_OK here rather than res?
|
||||
// is it ok to fail to get a string bundle? if so, it should be documented.
|
||||
|
|
|
@ -296,8 +296,7 @@ nsEditorShell::Init()
|
|||
NS_WARNING("ERROR: Failed to get StringBundle Service instance.\n");
|
||||
return res;
|
||||
}
|
||||
nsILocale* aLocale = nsnull;
|
||||
res = stringBundleService->CreateBundle(EDITOR_BUNDLE_URL, aLocale, getter_AddRefs(mStringBundle));
|
||||
res = stringBundleService->CreateBundle(EDITOR_BUNDLE_URL, getter_AddRefs(mStringBundle));
|
||||
|
||||
// XXX: why are we returning NS_OK here rather than res?
|
||||
// is it ok to fail to get a string bundle? if so, it should be documented.
|
||||
|
|
|
@ -141,8 +141,7 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
|
|||
{
|
||||
nsCOMPtr<nsIStringBundle> stringBundle;
|
||||
char* propertyURL = "chrome://necko/locale/necko.properties";
|
||||
nsILocale *locale = nsnull;
|
||||
rv = sBundleService->CreateBundle(propertyURL, locale,
|
||||
rv = sBundleService->CreateBundle(propertyURL,
|
||||
getter_AddRefs(stringBundle));
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -96,7 +96,7 @@ nsHelperAppDialog.prototype = {
|
|||
.createInstance( nsIFilePicker );
|
||||
var bundle = Components.classes[ "@mozilla.org/intl/stringbundle;1" ]
|
||||
.getService( Components.interfaces.nsIStringBundleService )
|
||||
.CreateBundle( "chrome://global/locale/helperAppLauncher.properties", null );
|
||||
.createBundle( "chrome://global/locale/helperAppLauncher.properties");
|
||||
|
||||
var windowTitle = bundle.GetStringFromName( "saveDialogTitle" );
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsILocale.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIWalletService.h"
|
||||
#include "nsPrompt.h"
|
||||
|
|
|
@ -592,9 +592,8 @@ nsPromptService::GetLocaleString(const char *aKey, PRUnichar **aResult)
|
|||
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(kStringBundleServiceCID);
|
||||
nsCOMPtr<nsIStringBundle> stringBundle;
|
||||
nsILocale *locale = nsnull;
|
||||
|
||||
rv = stringService->CreateBundle(kCommonDialogsProperties, locale, getter_AddRefs(stringBundle));
|
||||
rv = stringService->CreateBundle(kCommonDialogsProperties, getter_AddRefs(stringBundle));
|
||||
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
|
||||
|
||||
rv = stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2(aKey).GetUnicode(), aResult);
|
||||
|
|
|
@ -268,9 +268,8 @@ CKutil_Localize(const PRUnichar *genericString) {
|
|||
PRUnichar *ptrv = nsnull;
|
||||
NS_WITH_SERVICE(nsIStringBundleService, pStringService, kStringBundleServiceCID, &ret);
|
||||
if (NS_SUCCEEDED(ret) && (nsnull != pStringService)) {
|
||||
nsCOMPtr<nsILocale> locale;
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
ret = pStringService->CreateBundle(LOCALIZATION, locale, getter_AddRefs(bundle));
|
||||
ret = pStringService->CreateBundle(LOCALIZATION, getter_AddRefs(bundle));
|
||||
if (NS_SUCCEEDED(ret) && bundle) {
|
||||
ret = bundle->GetStringFromName(genericString, &ptrv);
|
||||
if ( NS_SUCCEEDED(ret) && (ptrv) ) {
|
||||
|
|
|
@ -90,9 +90,7 @@ int main(PRInt32 argc, char *argv[])
|
|||
{
|
||||
nsCOMPtr<nsIStringBundle> stringBundle;
|
||||
char* propertyURL = "chrome://necko/locale/necko.properties";
|
||||
nsILocale *locale = nsnull;
|
||||
rv = bundleService->CreateBundle(propertyURL, locale,
|
||||
getter_AddRefs(stringBundle));
|
||||
rv = bundleService->CreateBundle(propertyURL, getter_AddRefs(stringBundle));
|
||||
}
|
||||
|
||||
NS_WITH_SERVICE(nsICookieService, cookieService, kCookieServiceCID, &rv);
|
||||
|
|
|
@ -346,7 +346,6 @@ nsP3PService::Init( ) {
|
|||
("P3PService: Creating string bundle.\n") );
|
||||
|
||||
rv = pStringBundleService->CreateBundle((const char *)xcsSpec,
|
||||
nsnull,
|
||||
getter_AddRefs( mStringBundle ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,6 @@ Wallet_Localize(char* genericString) {
|
|||
NS_RELEASE(url);
|
||||
return v.ToNewUnicode();
|
||||
}
|
||||
nsILocale* locale = nsnull;
|
||||
nsIStringBundle* bundle = nsnull;
|
||||
char* spec = nsnull;
|
||||
ret = url->GetSpec(&spec);
|
||||
|
@ -116,7 +115,7 @@ Wallet_Localize(char* genericString) {
|
|||
nsCRT::free(spec);
|
||||
return v.ToNewUnicode();
|
||||
}
|
||||
ret = pStringService->CreateBundle(spec, locale, &bundle);
|
||||
ret = pStringService->CreateBundle(spec, &bundle);
|
||||
nsCRT::free(spec);
|
||||
if (NS_FAILED(ret)) {
|
||||
printf("cannot create instance\n");
|
||||
|
|
|
@ -167,8 +167,7 @@ nsSecureBrowserUIImpl::Init(nsIDOMWindowInternal *window, nsIDOMElement *button)
|
|||
NS_WITH_SERVICE(nsIStringBundleService, service, kCStringBundleServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsILocale* locale = nsnull;
|
||||
rv = service->CreateBundle(SECURITY_STRING_BUNDLE_URL, locale, getter_AddRefs(mStringBundle));
|
||||
rv = service->CreateBundle(SECURITY_STRING_BUNDLE_URL, getter_AddRefs(mStringBundle));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// hook up to the form post notifications:
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
#include "nsAppDirectoryServiceDefs.h"
|
||||
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsILocale.h"
|
||||
#include "nsIFileSpec.h"
|
||||
#include "prmem.h"
|
||||
#include "prprf.h"
|
||||
|
@ -463,9 +462,8 @@ Wallet_Localize(char* genericString) {
|
|||
#endif
|
||||
return v.ToNewUnicode();
|
||||
}
|
||||
nsCOMPtr<nsILocale> locale;
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
ret = pStringService->CreateBundle(PROPERTIES_URL, locale, getter_AddRefs(bundle));
|
||||
ret = pStringService->CreateBundle(PROPERTIES_URL, getter_AddRefs(bundle));
|
||||
if (NS_FAILED(ret)) {
|
||||
#ifdef DEBUG
|
||||
printf("cannot create instance\n");
|
||||
|
|
|
@ -22,12 +22,9 @@
|
|||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIEnumerator.idl"
|
||||
#include "nsILocale.idl"
|
||||
|
||||
%{C++
|
||||
|
||||
#include "nsILocale.h"
|
||||
|
||||
// Define Contractid and CID
|
||||
// {D85A17C1-AA7C-11d2-9B8C-00805F8A16D9}
|
||||
#define NS_STRINGBUNDLESERVICE_CID \
|
||||
|
@ -94,10 +91,8 @@ interface nsIStringBundle : nsISupports
|
|||
[scriptable, uuid(D85A17C0-AA7C-11d2-9B8C-00805F8A16D9)]
|
||||
interface nsIStringBundleService : nsISupports
|
||||
{
|
||||
nsIStringBundle CreateBundle([const] in string aURLSpec,
|
||||
in nsILocale aLocale);
|
||||
nsIStringBundle CreateBundle([const] in string aURLSpec);
|
||||
nsIStringBundle CreateAsyncBundle([const] in string aURLSpec);
|
||||
|
||||
nsIStringBundle CreateExtensibleBundle([const] in string aRegistryKey);
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "nsIServiceManager.h"
|
||||
#include "nsID.h"
|
||||
#include "nsString.h"
|
||||
#include "nsILocale.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsAcceptLang.h"
|
||||
|
||||
|
@ -87,10 +86,10 @@ nsAcceptLang::GetAcceptLangFromLocale(const PRUnichar *aLocale, PRUnichar **_ret
|
|||
nsIStringBundle *bundle = nsnull;
|
||||
#if 1
|
||||
res = sBundleService->CreateBundle("resource:/res/language.properties",
|
||||
nsnull, &bundle);
|
||||
&bundle);
|
||||
#else
|
||||
res = sBundleService->CreateBundle("chrome://global/locale/languageNames.properties",
|
||||
nsnull, &bundle);
|
||||
&bundle);
|
||||
#endif
|
||||
PRUnichar *ptrv = nsnull;
|
||||
nsString lc_tmp(aLocale);
|
||||
|
@ -182,7 +181,7 @@ nsAcceptLang::GetLocaleFromAcceptLang(const PRUnichar *aName, PRUnichar **_retva
|
|||
nsIStringBundle *bundle = nsnull;
|
||||
/* shall we put the file in res/ instead ? */
|
||||
res = sBundleService->CreateBundle("chrome://global/locale/accept2locale.properties",
|
||||
nsnull, &bundle);
|
||||
&bundle);
|
||||
|
||||
PRUnichar *ptrv = nsnull;
|
||||
if (NS_OK == (res = bundle->GetStringFromName(acceptLang.GetUnicode(), &ptrv))) {
|
||||
|
|
|
@ -606,7 +606,7 @@ nsExtensibleStringBundle::Init(const char * aRegistryKey)
|
|||
res = registry->GetStringUTF8(key, "name", getter_Copies(name));
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
res = sbServ->CreateBundle(name, nsnull, getter_AddRefs(bundle));
|
||||
res = sbServ->CreateBundle(name, getter_AddRefs(bundle));
|
||||
if (NS_FAILED(res)) {
|
||||
res = components->Next();
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
@ -956,8 +956,7 @@ nsStringBundleService::recycleEntry(bundleCacheEntry_t *aEntry)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsStringBundleService::CreateBundle(const char* aURLSpec, nsILocale* aLocale,
|
||||
nsIStringBundle** aResult)
|
||||
nsStringBundleService::CreateBundle(const char* aURLSpec, nsIStringBundle** aResult)
|
||||
{
|
||||
#ifdef DEBUG_tao_
|
||||
printf("\n++ nsStringBundleService::CreateBundle ++\n");
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "nsIStringBundle.h"
|
||||
#include "nsIAcceptLang.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsILocale.h"
|
||||
#include <iostream.h>
|
||||
|
||||
#include "nsIIOService.h"
|
||||
|
@ -78,54 +77,9 @@ static NS_DEFINE_IID(kIAcceptLangIID, NS_IACCEPTLANG_IID);
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include "nsILocale.h"
|
||||
#include "nsILocaleService.h"
|
||||
#include "nsLocaleCID.h"
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
nsILocale*
|
||||
get_applocale(void)
|
||||
{
|
||||
nsresult result;
|
||||
nsILocale* locale;
|
||||
nsString* category;
|
||||
nsString* value;
|
||||
PRUnichar *lc_name_unichar;
|
||||
|
||||
// get a locale service
|
||||
nsCOMPtr<nsILocaleService> localeService = do_GetService(NS_LOCALESERVICE_CONTRACTID, &result);
|
||||
NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: get locale service failed");
|
||||
|
||||
//
|
||||
// test GetApplicationLocale
|
||||
//
|
||||
result = localeService->GetApplicationLocale(&locale);
|
||||
NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed");
|
||||
NS_ASSERTION(locale!=NULL,"nsLocaleTest: factory_get_locale failed");
|
||||
|
||||
//
|
||||
// test and make sure the locale is a valid Interface
|
||||
//
|
||||
locale->AddRef();
|
||||
|
||||
category = new nsString();
|
||||
category->AssignWithConversion("NSILOCALE_MESSAGES");
|
||||
value = new nsString();
|
||||
|
||||
result = locale->GetCategory(category->GetUnicode(),&lc_name_unichar);
|
||||
value->Assign(lc_name_unichar);
|
||||
NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed");
|
||||
NS_ASSERTION(value->Length()>0,"nsLocaleTest: factory_get_locale failed");
|
||||
|
||||
locale->Release();
|
||||
delete category;
|
||||
delete value;
|
||||
|
||||
return locale;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -189,15 +143,9 @@ main(int argc, char *argv[])
|
|||
}
|
||||
printf("\n ** created AcceptLang service\n");
|
||||
|
||||
nsILocale* locale = get_applocale();
|
||||
|
||||
nsIStringBundle* bundle = nsnull;
|
||||
|
||||
ret = service->CreateBundle(TEST_URL, locale, &bundle);
|
||||
|
||||
/* free it
|
||||
*/
|
||||
locale->Release();
|
||||
ret = service->CreateBundle(TEST_URL, &bundle);
|
||||
|
||||
if (NS_FAILED(ret)) {
|
||||
printf("cannot create instance\n");
|
||||
|
|
|
@ -895,8 +895,7 @@ nsFormControlHelper::GetLocalizedString(const char * aPropFileName, const char*
|
|||
nsXPIDLCString spec;
|
||||
rv = uri->GetSpec(getter_Copies(spec));
|
||||
if (NS_SUCCEEDED(rv) && spec) {
|
||||
nsCOMPtr<nsILocale> locale = nsnull;
|
||||
rv = stringService->CreateBundle(spec, locale, getter_AddRefs(bundle));
|
||||
rv = stringService->CreateBundle(spec, getter_AddRefs(bundle));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -895,8 +895,7 @@ nsFormControlHelper::GetLocalizedString(const char * aPropFileName, const char*
|
|||
nsXPIDLCString spec;
|
||||
rv = uri->GetSpec(getter_Copies(spec));
|
||||
if (NS_SUCCEEDED(rv) && spec) {
|
||||
nsCOMPtr<nsILocale> locale = nsnull;
|
||||
rv = stringService->CreateBundle(spec, locale, getter_AddRefs(bundle));
|
||||
rv = stringService->CreateBundle(spec, getter_AddRefs(bundle));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1280,7 +1280,6 @@ nsMenuFrame::BuildAcceleratorText(nsString& aAccelString)
|
|||
if (NS_SUCCEEDED(rv) && bundleService) {
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
rv = bundleService->CreateBundle("chrome://global/locale/keys.properties",
|
||||
nsnull,
|
||||
getter_AddRefs(bundle));
|
||||
|
||||
if (NS_SUCCEEDED(rv) && bundle) {
|
||||
|
|
|
@ -232,8 +232,7 @@ nsAbSyncDriver::GetString(const PRUnichar *aStringName)
|
|||
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res);
|
||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||
{
|
||||
nsILocale *locale = nsnull;
|
||||
res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(mStringBundle));
|
||||
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2998,8 +2998,7 @@ nsAbSync::GetString(const PRUnichar *aStringName)
|
|||
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res);
|
||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||
{
|
||||
nsILocale *locale = nsnull;
|
||||
res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(mStringBundle));
|
||||
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1737,8 +1737,7 @@ nsMessenger::InitStringBundle()
|
|||
kStringBundleServiceCID, &res);
|
||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||
{
|
||||
nsILocale *locale = nsnull;
|
||||
res = sBundleService->CreateBundle(propertyURL, locale,
|
||||
res = sBundleService->CreateBundle(propertyURL,
|
||||
getter_AddRefs(mStringBundle));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -409,7 +409,6 @@ nsMessengerMigrator::initializeStrings()
|
|||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
rv = bundleService->CreateBundle("chrome://messenger/locale/messenger.properties",
|
||||
nsnull,
|
||||
getter_AddRefs(bundle));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -898,7 +898,6 @@ nsMsgAccountManagerDataSource::getStringBundle()
|
|||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = strBundleService->CreateBundle("chrome://messenger/locale/prefs.properties",
|
||||
nsnull, // default locale
|
||||
getter_AddRefs(mStringBundle));
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ PRUnichar * nsMsgDBView::GetString(const PRUnichar *aStringName)
|
|||
char *propertyURL = MESSENGER_STRING_URL;
|
||||
nsCOMPtr<nsIStringBundleService> sBundleService = do_GetService(kStringBundleServiceCID, &res);
|
||||
if (NS_SUCCEEDED(res) && sBundleService)
|
||||
res = sBundleService->CreateBundle(propertyURL, nsnull, getter_AddRefs(mMessengerStringBundle));
|
||||
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mMessengerStringBundle));
|
||||
}
|
||||
|
||||
if (mMessengerStringBundle)
|
||||
|
|
|
@ -227,8 +227,7 @@ nsresult nsFolderCompactState::GetStatusFromMsgName(const char *statusMsgName, P
|
|||
kStringBundleServiceCID, &res);
|
||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||
{
|
||||
res = sBundleService->CreateBundle(propertyURL, nsnull,
|
||||
getter_AddRefs(stringBundle));
|
||||
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(stringBundle));
|
||||
}
|
||||
if (stringBundle)
|
||||
{
|
||||
|
|
|
@ -265,8 +265,7 @@ nsresult nsMsgOfflineManager::ShowStatus(const char *statusMsgName)
|
|||
kStringBundleServiceCID, &res);
|
||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||
{
|
||||
res = sBundleService->CreateBundle(propertyURL, nsnull,
|
||||
getter_AddRefs(mStringBundle));
|
||||
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));
|
||||
}
|
||||
}
|
||||
if (mStringBundle)
|
||||
|
|
|
@ -399,8 +399,7 @@ nsMsgPrintEngine::GetString(const PRUnichar *aStringName)
|
|||
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res);
|
||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||
{
|
||||
nsILocale *locale = nsnull;
|
||||
res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(mStringBundle));
|
||||
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,6 @@ nsMsgStatusFeedback::nsMsgStatusFeedback() :
|
|||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
bundleService->CreateBundle("chrome://messenger/locale/messenger.properties",
|
||||
nsnull,
|
||||
getter_AddRefs(mBundle));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,7 +188,6 @@ nsMsgFolder::initializeStrings()
|
|||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
rv = bundleService->CreateBundle("chrome://messenger/locale/messenger.properties",
|
||||
nsnull,
|
||||
getter_AddRefs(bundle));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -1276,8 +1276,7 @@ NS_IMETHODIMP nsMsgIncomingServer::DisplayOfflineMsg(nsIMsgWindow *aMsgWindow)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
rv = bundleService->CreateBundle(BASE_MSGS_URL, nsnull,
|
||||
getter_AddRefs(bundle));
|
||||
rv = bundleService->CreateBundle(BASE_MSGS_URL, getter_AddRefs(bundle));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (bundle)
|
||||
{
|
||||
|
|
|
@ -86,7 +86,7 @@ nsComposeStringService::InitializeStringBundle()
|
|||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(kStringBundleServiceCID);
|
||||
NS_ENSURE_TRUE(stringService, NS_ERROR_FAILURE);
|
||||
|
||||
NS_ENSURE_SUCCESS(stringService->CreateBundle(COMPOSE_BE_URL, nsnull, getter_AddRefs(mComposeStringBundle)),
|
||||
NS_ENSURE_SUCCESS(stringService->CreateBundle(COMPOSE_BE_URL, getter_AddRefs(mComposeStringBundle)),
|
||||
NS_ERROR_FAILURE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -1793,9 +1793,7 @@ nsresult nsImapIncomingServer::GetStringBundle()
|
|||
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res);
|
||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||
{
|
||||
nsILocale *locale = nsnull;
|
||||
|
||||
res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(m_stringBundle));
|
||||
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(m_stringBundle));
|
||||
}
|
||||
}
|
||||
return (m_stringBundle) ? NS_OK : res;
|
||||
|
|
|
@ -46,10 +46,8 @@ IMAPGetStringByID(PRInt32 stringID)
|
|||
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res);
|
||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||
{
|
||||
nsILocale *locale = nsnull;
|
||||
|
||||
nsIStringBundle* sBundle = nsnull;
|
||||
res = sBundleService->CreateBundle(propertyURL, locale, &sBundle);
|
||||
res = sBundleService->CreateBundle(propertyURL, &sBundle);
|
||||
|
||||
if (NS_SUCCEEDED(res))
|
||||
{
|
||||
|
|
|
@ -45,8 +45,7 @@ nsIStringBundle *nsEudoraStringBundle::GetStringBundle( void)
|
|||
|
||||
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && (nsnull != sBundleService)) {
|
||||
nsILocale * locale = nsnull;
|
||||
rv = sBundleService->CreateBundle(propertyURL, locale, &sBundle);
|
||||
rv = sBundleService->CreateBundle(propertyURL, &sBundle);
|
||||
}
|
||||
|
||||
m_pBundle = sBundle;
|
||||
|
|
|
@ -48,8 +48,7 @@ nsIStringBundle *nsOEStringBundle::GetStringBundle( void)
|
|||
|
||||
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && (nsnull != sBundleService)) {
|
||||
nsILocale * locale = nsnull;
|
||||
rv = sBundleService->CreateBundle(propertyURL, locale, &sBundle);
|
||||
rv = sBundleService->CreateBundle(propertyURL, &sBundle);
|
||||
}
|
||||
|
||||
m_pBundle = sBundle;
|
||||
|
|
|
@ -48,8 +48,7 @@ nsIStringBundle *nsOutlookStringBundle::GetStringBundle( void)
|
|||
|
||||
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && (nsnull != sBundleService)) {
|
||||
nsILocale * locale = nsnull;
|
||||
rv = sBundleService->CreateBundle(propertyURL, locale, &sBundle);
|
||||
rv = sBundleService->CreateBundle(propertyURL, &sBundle);
|
||||
}
|
||||
|
||||
m_pBundle = sBundle;
|
||||
|
|
|
@ -48,8 +48,7 @@ nsIStringBundle *nsImportStringBundle::GetStringBundle( void)
|
|||
|
||||
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && (nsnull != sBundleService)) {
|
||||
nsILocale * locale = nsnull;
|
||||
rv = sBundleService->CreateBundle(propertyURL, locale, &sBundle);
|
||||
rv = sBundleService->CreateBundle(propertyURL, &sBundle);
|
||||
}
|
||||
|
||||
m_pBundle = sBundle;
|
||||
|
|
|
@ -45,8 +45,7 @@ nsIStringBundle *nsTextStringBundle::GetStringBundle( void)
|
|||
|
||||
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && (nsnull != sBundleService)) {
|
||||
nsILocale * locale = nsnull;
|
||||
rv = sBundleService->CreateBundle(propertyURL, locale, &sBundle);
|
||||
rv = sBundleService->CreateBundle(propertyURL, &sBundle);
|
||||
}
|
||||
|
||||
m_pBundle = sBundle;
|
||||
|
|
|
@ -85,7 +85,7 @@ nsLocalStringService::InitializeStringBundle()
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
NS_ENSURE_TRUE(stringService, NS_ERROR_FAILURE);
|
||||
|
||||
rv = stringService->CreateBundle(LOCAL_MSGS_URL, nsnull, getter_AddRefs(mLocalStringBundle));
|
||||
rv = stringService->CreateBundle(LOCAL_MSGS_URL, getter_AddRefs(mLocalStringBundle));
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,6 @@ nsPop3IncomingServer::initializeStrings()
|
|||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
rv = bundleService->CreateBundle("chrome://messenger/locale/messenger.properties",
|
||||
nsnull,
|
||||
getter_AddRefs(bundle));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче