mozilla-language.patch
changeset 994 9fc447b00040
parent 939 3604ed712e16
equal deleted inserted replaced
993:c360e9aac24a 994:9fc447b00040
     1 # HG changeset patch
     1 # HG changeset patch
     2 # User Wolfgang Rosenauer <wr@rosenauer.org>
     2 # User Wolfgang Rosenauer <wr@rosenauer.org>
     3 # Parent 5a29924228527f8882c83cf62d470963ea1ce62e
     3 # Parent 5a29924228527f8882c83cf62d470963ea1ce62e
     4 # Parent  4f39ed617c2f151a3a15903c7ae4471b66774e9e
     4 # Parent  242f2521ed48bb63b91582956b5e4af80bcb3378
     5 Bug 583793 - Firefox interface language set to LANG, ignores LANGUAGE
     5 Bug 583793 - Firefox interface language set to LANG, ignores LANGUAGE
     6 
     6 
     7 diff --git a/intl/locale/nsLocaleService.cpp b/intl/locale/nsLocaleService.cpp
     7 diff --git a/intl/locale/nsLocaleService.cpp b/intl/locale/nsLocaleService.cpp
     8 --- a/intl/locale/nsLocaleService.cpp
     8 --- a/intl/locale/nsLocaleService.cpp
     9 +++ b/intl/locale/nsLocaleService.cpp
     9 +++ b/intl/locale/nsLocaleService.cpp
    10 @@ -114,16 +114,17 @@ nsLocaleService::nsLocaleService(void)
    10 @@ -116,16 +116,17 @@ nsLocaleService::nsLocaleService(void)
    11      NS_ENSURE_SUCCESS_VOID(rv);
    11      NS_ENSURE_SUCCESS_VOID(rv);
    12  #endif
    12  #endif
    13  #if defined(XP_UNIX) && !defined(XP_MACOSX)
    13  #if defined(XP_UNIX) && !defined(XP_MACOSX)
    14      RefPtr<nsLocale> resultLocale(new nsLocale());
    14      RefPtr<nsLocale> resultLocale(new nsLocale());
    15      NS_ENSURE_TRUE_VOID(resultLocale);
    15      NS_ENSURE_TRUE_VOID(resultLocale);
    23      int i;
    23      int i;
    24  
    24  
    25      for( i = 0; i < LocaleListLength; i++ ) {
    25      for( i = 0; i < LocaleListLength; i++ ) {
    26          nsresult result;
    26          nsresult result;
    27          // setlocale( , "") evaluates LC_* and LANG
    27          // setlocale( , "") evaluates LC_* and LANG
    28 @@ -149,16 +150,36 @@ nsLocaleService::nsLocaleService(void)
    28 @@ -151,16 +152,37 @@ nsLocaleService::nsLocaleService(void)
    29              } else {
    29              } else {
    30                  CopyASCIItoUTF16(lang, platformLocale);
    30                  CopyASCIItoUTF16(lang, platformLocale);
    31                  result = nsPosixLocale::GetXPLocale(lang, xpLocale);
    31                  result = nsPosixLocale::GetXPLocale(lang, xpLocale);
    32              }
    32              }
    33          }
    33          }
    52 +              xpLocale = xpLocale_temp;
    52 +              xpLocale = xpLocale_temp;
    53 +              break;
    53 +              break;
    54 +            }
    54 +            }
    55 +          }
    55 +          }
    56 +        }
    56 +        }
       
    57 +
    57          resultLocale->AddCategory(category, xpLocale);
    58          resultLocale->AddCategory(category, xpLocale);
    58          resultLocale->AddCategory(category_platform, platformLocale);
    59          resultLocale->AddCategory(category_platform, platformLocale);
    59      }
    60      }
    60      mSystemLocale = do_QueryInterface(resultLocale);
    61      mSystemLocale = do_QueryInterface(resultLocale);
    61      mApplicationLocale = do_QueryInterface(resultLocale);
    62      mApplicationLocale = do_QueryInterface(resultLocale);
    62         
    63  
    63  #endif // XP_UNIX
    64  #endif // XP_UNIX
    64  
    65