From d029279227bbe45515ef10a9f2eb86f229beecef Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 28 Feb 2021 01:11:34 +0100 Subject: [PATCH] Rename local variable to a more consistent name Call the info->CanonicalName "shortName", as it's done in many other places in the code instead of using "locale" for it here, even though we do use it as a name of locale. No real changes. --- src/common/intl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 264ffeaf88..d9f4718c3e 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -461,11 +461,11 @@ bool wxLocale::Init(int language, int flags) // Set the locale: #if defined(__UNIX__) - const wxString& locale = info->CanonicalName; + const wxString& shortName = info->CanonicalName; const char *retloc = wxSetlocaleTryUTF8(LC_ALL, locale); - const wxString langOnly = ExtractLang(locale); + const wxString langOnly = ExtractLang(shortName); if ( !retloc ) { // Some C libraries don't like xx_YY form and require xx only @@ -478,11 +478,11 @@ bool wxLocale::Init(int language, int flags) // so will translate the abbrev for them wxString localeAlt; if ( langOnly == wxS("he") ) - localeAlt = wxS("iw") + ExtractNotLang(locale); + localeAlt = wxS("iw") + ExtractNotLang(shortName); else if ( langOnly == wxS("id") ) - localeAlt = wxS("in") + ExtractNotLang(locale); + localeAlt = wxS("in") + ExtractNotLang(shortName); else if ( langOnly == wxS("yi") ) - localeAlt = wxS("ji") + ExtractNotLang(locale); + localeAlt = wxS("ji") + ExtractNotLang(shortName); else if ( langOnly == wxS("nb") ) localeAlt = wxS("no_NO"); else if ( langOnly == wxS("nn") )