Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
desktop
>
firefox7
> mozilla-language.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File mozilla-language.patch of Package firefox7
# HG changeset patch # User Wolfgang Rosenauer <wr@rosenauer.org> # Parent 0d6917b8f28f6e0398dbf329dda4932ba4f997c2 Bug 583793 - Firefox interface language set to LANG, ignores LANGUAGE diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleService.cpp --- a/intl/locale/src/nsLocaleService.cpp +++ b/intl/locale/src/nsLocaleService.cpp @@ -160,16 +160,17 @@ nsLocaleService::nsLocaleService(void) nsRefPtr<nsLocale> resultLocale(new nsLocale()); NS_ENSURE_TRUE(resultLocale, ); #ifdef MOZ_WIDGET_QT const char* lang = QLocale::system().name().toAscii(); #else // Get system configuration const char* lang = getenv("LANG"); + const char* language = getenv("LANGUAGE"); #endif nsAutoString xpLocale, platformLocale; nsAutoString category, category_platform; int i; for( i = 0; i < LocaleListLength; i++ ) { nsresult result; @@ -188,16 +189,21 @@ nsLocaleService::nsLocaleService(void) } else { CopyASCIItoUTF16(lang, platformLocale); result = nsPosixLocale::GetXPLocale(lang, xpLocale); } } if (NS_FAILED(result)) { return; } + // LANGUAGE is overriding LC_MESSAGES + if (i == LC_MESSAGES && language && *language) { + CopyASCIItoUTF16(language, platformLocale); + result = nsPosixLocale::GetXPLocale(language, xpLocale); + } resultLocale->AddCategory(category, xpLocale); resultLocale->AddCategory(category_platform, platformLocale); } mSystemLocale = do_QueryInterface(resultLocale); mApplicationLocale = do_QueryInterface(resultLocale); #endif // XP_UNIX #ifdef XP_OS2