Use a less verbose form for warnings in the view source window

and correctly match strings in order to coalesce translations.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@22336 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2007-12-30 21:27:41 +00:00
parent 83c2108f79
commit 00dfbc05a3
2 changed files with 6 additions and 6 deletions

View File

@ -2237,9 +2237,10 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
runningChange, *style, i, column, c);
} catch (EncodingException & e) {
if (runparams.dryrun) {
os << _("<LyX Warning: uncodable character>");
os << "<" << _("LyX Warning: ")
<< _("uncodable character") << " '";
os.put(c);
os << _("</LyX Warning>");
os << "'>";
} else {
// add location information and throw again.
e.par_id = id();

View File

@ -157,10 +157,9 @@ void LaTeXHighlighter::highlightBlock(QString const & text)
text.indexOf(exprComment, index + length);
index = exprComment.pos(1);
}
// <LyX Warning: ...> ... </LyX Warning>
QString opening = QRegExp::escape(qt_("<LyX Warning:"));
QString closing = QRegExp::escape(qt_("</LyX Warning>"));
QRegExp exprWarning(opening + "[^<]*" + closing);
// <LyX Warning: ...>
QString lyxwarn = qt_("LyX Warning: ");
QRegExp exprWarning("<" + lyxwarn + "[^<]*>");
index = text.indexOf(exprWarning);
while (index >= 0) {
int length = exprWarning.matchedLength();