fixed i18n handling of _ in XRC texts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
48f72114ba
commit
3f2eabd59d
@ -494,11 +494,16 @@ int wxXmlResourceHandler::GetStyle(const wxString& param, int defaults)
|
|||||||
|
|
||||||
wxString wxXmlResourceHandler::GetText(const wxString& param)
|
wxString wxXmlResourceHandler::GetText(const wxString& param)
|
||||||
{
|
{
|
||||||
wxString str1 = GetParamValue(param);
|
wxString str1;
|
||||||
wxString str2;
|
wxString str2;
|
||||||
const wxChar *dt;
|
const wxChar *dt;
|
||||||
wxChar amp_char;
|
wxChar amp_char;
|
||||||
|
|
||||||
|
if (m_resource->GetUseLocale())
|
||||||
|
str1 = wxGetTranslation(GetParamValue(param));
|
||||||
|
else
|
||||||
|
str1 = GetParamValue(param);
|
||||||
|
|
||||||
// VS: First version of XRC resources used $ instead of & (which is illegal in XML),
|
// VS: First version of XRC resources used $ instead of & (which is illegal in XML),
|
||||||
// but later I realized that '_' fits this purpose much better (because
|
// but later I realized that '_' fits this purpose much better (because
|
||||||
// &File means "File with F underlined").
|
// &File means "File with F underlined").
|
||||||
@ -529,11 +534,8 @@ wxString wxXmlResourceHandler::GetText(const wxString& param)
|
|||||||
}
|
}
|
||||||
else str2 << *dt;
|
else str2 << *dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_resource->GetUseLocale())
|
return str2;
|
||||||
return wxGetTranslation(str2);
|
|
||||||
else
|
|
||||||
return str2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -494,11 +494,16 @@ int wxXmlResourceHandler::GetStyle(const wxString& param, int defaults)
|
|||||||
|
|
||||||
wxString wxXmlResourceHandler::GetText(const wxString& param)
|
wxString wxXmlResourceHandler::GetText(const wxString& param)
|
||||||
{
|
{
|
||||||
wxString str1 = GetParamValue(param);
|
wxString str1;
|
||||||
wxString str2;
|
wxString str2;
|
||||||
const wxChar *dt;
|
const wxChar *dt;
|
||||||
wxChar amp_char;
|
wxChar amp_char;
|
||||||
|
|
||||||
|
if (m_resource->GetUseLocale())
|
||||||
|
str1 = wxGetTranslation(GetParamValue(param));
|
||||||
|
else
|
||||||
|
str1 = GetParamValue(param);
|
||||||
|
|
||||||
// VS: First version of XRC resources used $ instead of & (which is illegal in XML),
|
// VS: First version of XRC resources used $ instead of & (which is illegal in XML),
|
||||||
// but later I realized that '_' fits this purpose much better (because
|
// but later I realized that '_' fits this purpose much better (because
|
||||||
// &File means "File with F underlined").
|
// &File means "File with F underlined").
|
||||||
@ -529,11 +534,8 @@ wxString wxXmlResourceHandler::GetText(const wxString& param)
|
|||||||
}
|
}
|
||||||
else str2 << *dt;
|
else str2 << *dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_resource->GetUseLocale())
|
return str2;
|
||||||
return wxGetTranslation(str2);
|
|
||||||
else
|
|
||||||
return str2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user