use wxConvWhateverWorks for translation strings
Revert the introduction of wxGet-SetInlineEncoding()
This commit is contained in:
committed by
Vadim Zeitlin
parent
5facb56580
commit
3aaa31e703
@@ -300,15 +300,6 @@ inline const wxString& wxGetTranslation(const wxString& str1,
|
|||||||
: wxTranslations::GetUntranslatedString(str2);
|
: wxTranslations::GetUntranslatedString(str2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Get and set the default encoding for strings to be translated.
|
|
||||||
* These are only useful when the wxNO_IMPLICIT_WXSTRING_ENCODING macro is
|
|
||||||
* defined.
|
|
||||||
*/
|
|
||||||
WXDLLIMPEXP_BASE const wxMBConv &wxGetInlineEncoding();
|
|
||||||
|
|
||||||
WXDLLIMPEXP_BASE void wxSetInlineEncoding(const wxMBConv &conv);
|
|
||||||
|
|
||||||
#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING
|
#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -318,7 +309,7 @@ WXDLLIMPEXP_BASE void wxSetInlineEncoding(const wxMBConv &conv);
|
|||||||
inline const wxString& wxGetTranslation(const char *str,
|
inline const wxString& wxGetTranslation(const char *str,
|
||||||
const char *domain = "",
|
const char *domain = "",
|
||||||
const char *context = "") {
|
const char *context = "") {
|
||||||
const wxMBConv &conv = wxGetInlineEncoding();
|
const wxMBConv &conv = wxConvWhateverWorks;
|
||||||
return wxGetTranslation(wxString(str, conv), wxString(domain, conv),
|
return wxGetTranslation(wxString(str, conv), wxString(domain, conv),
|
||||||
wxString(context, conv));
|
wxString(context, conv));
|
||||||
}
|
}
|
||||||
@@ -328,7 +319,7 @@ inline const wxString& wxGetTranslation(const char *str1,
|
|||||||
unsigned n,
|
unsigned n,
|
||||||
const char *domain = "",
|
const char *domain = "",
|
||||||
const char *context = "") {
|
const char *context = "") {
|
||||||
const wxMBConv &conv = wxGetInlineEncoding();
|
const wxMBConv &conv = wxConvWhateverWorks;
|
||||||
return wxGetTranslation(wxString(str1, conv), wxString(str2, conv), n,
|
return wxGetTranslation(wxString(str1, conv), wxString(str2, conv), n,
|
||||||
wxString(domain, conv),
|
wxString(domain, conv),
|
||||||
wxString(context, conv));
|
wxString(context, conv));
|
||||||
|
@@ -2110,16 +2110,4 @@ public:
|
|||||||
|
|
||||||
wxIMPLEMENT_DYNAMIC_CLASS(wxTranslationsModule, wxModule);
|
wxIMPLEMENT_DYNAMIC_CLASS(wxTranslationsModule, wxModule);
|
||||||
|
|
||||||
// Encoding for strings to be translated, passed as const char *.
|
|
||||||
static const wxMBConv *inlineEncoding = &wxConvLibc;
|
|
||||||
|
|
||||||
WXDLLIMPEXP_BASE const wxMBConv &wxGetInlineEncoding() {
|
|
||||||
return *inlineEncoding;
|
|
||||||
}
|
|
||||||
|
|
||||||
WXDLLIMPEXP_BASE void wxSetInlineEncoding(const wxMBConv &conv) {
|
|
||||||
inlineEncoding = &conv;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif // wxUSE_INTL
|
#endif // wxUSE_INTL
|
||||||
|
Reference in New Issue
Block a user