mirror of https://github.com/BOINC/boinc.git
- MGR: Take two of the above.
clientgui/ DlgEventLog.cpp MainDocument.cpp, .h svn path=/trunk/boinc/; revision=22499
This commit is contained in:
parent
b6d8290106
commit
79cfbc6fd6
|
@ -7275,3 +7275,10 @@ Rom 13 Oct 2010
|
|||
|
||||
clientgui/
|
||||
DlgEventLog.cpp
|
||||
|
||||
Rom 13 Oct 2010
|
||||
- MGR: Take two of the above.
|
||||
|
||||
clientgui/
|
||||
DlgEventLog.cpp
|
||||
MainDocument.cpp, .h
|
||||
|
|
|
@ -885,7 +885,7 @@ wxInt32 CDlgEventLog::FormatMessage(wxInt32 item, wxString& strBuffer) const {
|
|||
|
||||
if (message) {
|
||||
strBuffer = wxString(message->body.c_str(), wxConvUTF8);
|
||||
wxGetApp().GetDocument()->LocalizeNoticeText(strBuffer, true);
|
||||
wxGetApp().GetDocument()->LocalizeNoticeText(strBuffer, false, true);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1975,7 +1975,7 @@ int CMainDocument::ResetNoticeState() {
|
|||
|
||||
// parse out the _(...)'s, and translate them
|
||||
//
|
||||
bool CMainDocument::LocalizeNoticeText(wxString& strMessage, bool bSanitize) {
|
||||
bool CMainDocument::LocalizeNoticeText(wxString& strMessage, bool bSanitize, bool bClean) {
|
||||
wxString strBuffer = wxEmptyString;
|
||||
wxString strStart = wxString(wxT("_(\""));
|
||||
wxString strEnd = wxString(wxT("\")"));
|
||||
|
@ -1983,10 +1983,15 @@ bool CMainDocument::LocalizeNoticeText(wxString& strMessage, bool bSanitize) {
|
|||
if (bSanitize) {
|
||||
// Replace CRLFs with HTML breaks.
|
||||
strMessage.Replace(wxT("\r\n"), wxT("<BR>"));
|
||||
|
||||
// Replace LFs with HTML breaks.
|
||||
strMessage.Replace(wxT("\n"), wxT("<BR>"));
|
||||
}
|
||||
if (bClean) {
|
||||
// Replace CRLFs with HTML breaks.
|
||||
strMessage.Replace(wxT("\r\n"), wxT(""));
|
||||
// Replace LFs with HTML breaks.
|
||||
strMessage.Replace(wxT("\n"), wxT(""));
|
||||
}
|
||||
|
||||
// Localize translatable text
|
||||
while (strMessage.Find(strStart.c_str()) != wxNOT_FOUND) {
|
||||
|
|
|
@ -303,7 +303,7 @@ public:
|
|||
|
||||
void UpdateUnreadNoticeState();
|
||||
int ResetNoticeState();
|
||||
bool LocalizeNoticeText(wxString& strMessage, bool bSanitize = false);
|
||||
bool LocalizeNoticeText(wxString& strMessage, bool bSanitize = false, bool bClean = false);
|
||||
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue