Better error messages for failed conversion.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33034 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-01-14 17:11:02 +00:00
parent 22b1ef0295
commit c4d8a27585

View File

@ -913,11 +913,18 @@ Buffer::ReadStatus Buffer::readFile(Lexer & lex, FileName const & filename,
cmd_ret const ret = runCommand(command_str);
if (ret.first != 0) {
Alert::error(_("Conversion script failed"),
bformat(_("%1$s is from a different version"
if (file_format < LYX_FORMAT)
Alert::error(_("Conversion script failed"),
bformat(_("%1$s is from an older version"
" of LyX, but the lyx2lyx script"
" failed to convert it."),
from_utf8(filename.absFilename())));
else
Alert::error(_("Conversion script failed"),
bformat(_("%1$s is from a newer version"
" of LyX and cannot be converted by the"
" lyx2lyx script."),
from_utf8(filename.absFilename())));
return failure;
} else {
bool const ret = readFile(tmpfile);