1
0
MozillaFirefox/mozilla-language.patch
Wolfgang Rosenauer 09a0ed1d17 - update to Firefox 22.0 (bnc#825935)
* removed obsolete patches
    + mozilla-qcms-ppc.patch
    + mozilla-gstreamer-760140.patch
  * GStreamer support does not build on 12.1 anymore (build only
    on 12.2 and later)
- Fix qcms altivec include (mozilla-qcms-ppc.patch)

OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=340
2013-06-24 07:57:33 +00:00

49 lines
1.7 KiB
Diff

# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent df748bfc0eaca6dedf086cfd7167392416bfae27
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
@@ -127,16 +127,17 @@ nsLocaleService::nsLocaleService(void)
nsRefPtr<nsLocale> resultLocale(new nsLocale());
NS_ENSURE_TRUE_VOID(resultLocale);
#ifdef MOZ_WIDGET_QT
const char* lang = QLocale::system().name().toUtf8();
#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;
@@ -155,16 +156,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