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/trunk@22337 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2007-12-30 21:28:38 +00:00
parent d23ff5f777
commit 62d5000103
2 changed files with 6 additions and 6 deletions

View File

@ -2025,9 +2025,10 @@ bool Paragraph::latex(Buffer const & buf,
*style, i, column);
} 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

@ -104,10 +104,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();