mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +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/trunk@22337 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d23ff5f777
commit
62d5000103
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user