зеркало из https://github.com/mozilla/pjs.git
Bug 211004 - mailnews.reply_header_locale de-DE not working, patch by Christian Eyrich <ch.ey@gmx.net>, r=smontagu, sr=biesi
This commit is contained in:
Родитель
5d84cbb527
Коммит
d78bc142cf
|
@ -299,21 +299,26 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(nsLocaleService, nsILocaleService)
|
|||
NS_IMETHODIMP
|
||||
nsLocaleService::NewLocale(const nsAString &aLocale, nsILocale **_retval)
|
||||
{
|
||||
int i;
|
||||
nsresult result;
|
||||
nsresult result;
|
||||
|
||||
*_retval = (nsILocale*)nsnull;
|
||||
|
||||
nsLocale* resultLocale = new nsLocale();
|
||||
if (!resultLocale) return NS_ERROR_OUT_OF_MEMORY;
|
||||
*_retval = nsnull;
|
||||
|
||||
for(i=0;i<LocaleListLength;i++) {
|
||||
nsString category; category.AssignWithConversion(LocaleList[i]);
|
||||
result = resultLocale->AddCategory(category, aLocale);
|
||||
if (NS_FAILED(result)) { delete resultLocale; return result;}
|
||||
}
|
||||
nsLocale* resultLocale = new nsLocale();
|
||||
if (!resultLocale) return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return resultLocale->QueryInterface(NS_GET_IID(nsILocale),(void**)_retval);
|
||||
for (PRInt32 i = 0; i < LocaleListLength; i++) {
|
||||
nsString category; category.AssignWithConversion(LocaleList[i]);
|
||||
result = resultLocale->AddCategory(category, aLocale);
|
||||
if (NS_FAILED(result)) { delete resultLocale; return result;}
|
||||
#if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_BEOS)
|
||||
category.AppendLiteral("##PLATFORM");
|
||||
result = resultLocale->AddCategory(category, aLocale);
|
||||
if (NS_FAILED(result)) { delete resultLocale; return result;}
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_ADDREF(*_retval = resultLocale);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче