mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
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:
parent
83c2108f79
commit
00dfbc05a3
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user