mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Improve error msg
This commit is contained in:
parent
54846d2d93
commit
69f41b54b8
@ -1706,13 +1706,23 @@ bool Buffer::makeLaTeXFile(FileName const & fname,
|
|||||||
docstring const failed(1, e.failed_char);
|
docstring const failed(1, e.failed_char);
|
||||||
ostringstream oss;
|
ostringstream oss;
|
||||||
oss << "0x" << hex << e.failed_char << dec;
|
oss << "0x" << hex << e.failed_char << dec;
|
||||||
docstring msg = bformat(_("Could not find LaTeX command for character '%1$s'"
|
if (getParFromID(e.par_id).paragraph().layout().pass_thru) {
|
||||||
" (code point %2$s)"),
|
docstring msg = bformat(_("Uncodable character '%1$s'"
|
||||||
failed, from_utf8(oss.str()));
|
" (code point %2$s)"),
|
||||||
errorList.push_back(ErrorItem(msg, _("Some characters of your document are probably not "
|
failed, from_utf8(oss.str()));
|
||||||
"representable in the chosen encoding.\n"
|
errorList.push_back(ErrorItem(msg, _("Some characters of your document are not "
|
||||||
"Changing the document encoding to utf8 could help."),
|
"representable in specific verbatim contexts.\n"
|
||||||
{e.par_id, e.pos}, {e.par_id, e.pos + 1}));
|
"Changing the document encoding to utf8 could help."),
|
||||||
|
{e.par_id, e.pos}, {e.par_id, e.pos + 1}));
|
||||||
|
} else {
|
||||||
|
docstring msg = bformat(_("Could not find LaTeX command for character '%1$s'"
|
||||||
|
" (code point %2$s)"),
|
||||||
|
failed, from_utf8(oss.str()));
|
||||||
|
errorList.push_back(ErrorItem(msg, _("Some characters of your document are probably not "
|
||||||
|
"representable in the chosen encoding.\n"
|
||||||
|
"Changing the document encoding to utf8 could help."),
|
||||||
|
{e.par_id, e.pos}, {e.par_id, e.pos + 1}));
|
||||||
|
}
|
||||||
failed_export = true;
|
failed_export = true;
|
||||||
}
|
}
|
||||||
catch (iconv_codecvt_facet_exception const & e) {
|
catch (iconv_codecvt_facet_exception const & e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user