X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/86c30bc557d873def9a0fdd720693977e041c1cf..2ea60735163ce5ae73b8f089b0a982e65853c9f8:/src/common/intl.cpp?ds=sidebyside diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 1a750a6d1a..ff680307af 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -1005,7 +1005,7 @@ static wxString wxGetANSICodePageForLocale(LCID lcid) if ( ::GetLocaleInfo(lcid, LOCALE_IDEFAULTANSICODEPAGE, buffer, WXSIZEOF(buffer)) > 0 ) { - if ( buffer[0] != _T('0') || buffer[1] != _T('\0') ) + if ( buffer[0] != wxT('0') || buffer[1] != wxT('\0') ) cp = buffer; //else: this locale doesn't use ANSI code page } @@ -1025,10 +1025,10 @@ wxString wxLanguageInfo::GetLocaleName() const const LCID lcid = GetLCID(); wxChar buffer[256]; - buffer[0] = _T('\0'); + buffer[0] = wxT('\0'); if ( !::GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, buffer, WXSIZEOF(buffer)) ) { - wxLogLastError(_T("GetLocaleInfo(LOCALE_SENGLANGUAGE)")); + wxLogLastError(wxT("GetLocaleInfo(LOCALE_SENGLANGUAGE)")); return locale; } @@ -1036,13 +1036,13 @@ wxString wxLanguageInfo::GetLocaleName() const if ( ::GetLocaleInfo(lcid, LOCALE_SENGCOUNTRY, buffer, WXSIZEOF(buffer)) > 0 ) { - locale << _T('_') << buffer; + locale << wxT('_') << buffer; } const wxString cp = wxGetANSICodePageForLocale(lcid); if ( !cp.empty() ) { - locale << _T('.') << cp; + locale << wxT('.') << cp; } return locale; @@ -1635,7 +1635,9 @@ bool wxLocale::Init(const wxString& name, m_pszOldLocale = NULL; if ( m_pszOldLocale == NULL ) + { wxLogError(_("locale '%s' can not be set."), szLocale); + } // the short name will be used to look for catalog files as well, // so we need something here @@ -2612,8 +2614,8 @@ static wxString TranslateFromUnicodeFormat(const wxString& fmt) char chLast = '\0'; size_t lastCount = 0; - - const char* formatchars = + + const char* formatchars = "dghHmMsSy" #ifdef __WXMSW__ "t" @@ -2809,7 +2811,7 @@ static wxString TranslateFromUnicodeFormat(const wxString& fmt) // strftime() doesn't have era string, // ignore this format wxASSERT_MSG( lastCount <= 2, "too many 'g's" ); - + break; #ifndef __WXMSW__ case 'a': @@ -2842,10 +2844,10 @@ static wxString TranslateFromUnicodeFormat(const wxString& fmt) break; // not a special character so must be just a separator, treat as is - if ( *p == _T('%') ) + if ( *p == wxT('%') ) { // this one needs to be escaped - fmtWX += _T('%'); + fmtWX += wxT('%'); } fmtWX += *p; @@ -3787,7 +3789,7 @@ void wxLocale::InitLanguagesDB() LNG(wxLANGUAGE_ESPERANTO, "eo" , 0 , 0 , wxLayout_LeftToRight, "Esperanto") LNG(wxLANGUAGE_ESTONIAN, "et_EE", LANG_ESTONIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Estonian") LNG(wxLANGUAGE_FAEROESE, "fo_FO", LANG_FAEROESE , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Faeroese") - LNG(wxLANGUAGE_FARSI, "fa_IR", LANG_FARSI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Farsi") + LNG(wxLANGUAGE_FARSI, "fa_IR", LANG_FARSI , SUBLANG_DEFAULT , wxLayout_RightToLeft, "Farsi") LNG(wxLANGUAGE_FIJI, "fj" , 0 , 0 , wxLayout_LeftToRight, "Fiji") LNG(wxLANGUAGE_FINNISH, "fi_FI", LANG_FINNISH , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Finnish") LNG(wxLANGUAGE_FRENCH, "fr_FR", LANG_FRENCH , SUBLANG_FRENCH , wxLayout_LeftToRight, "French")