mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-30 05:12:40 +00:00
Fix a bunch of assertions.
The first thing that bformat does is to check whether the string contains "%1$s". Otherwise it asserts. Why didn't we see this happen before ? This was revealed by the emergency saves that Richard introduced in the Buffer dtor. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31062 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a492f5d553
commit
67c59b8f49
@ -967,7 +967,7 @@ docstring Buffer::emergencyWrite()
|
||||
LYXERR0(" " << s);
|
||||
if (writeFile(FileName(s))) {
|
||||
markClean();
|
||||
user_message += bformat(_(" Saved to %1$. Phew.\n"), from_utf8(s));
|
||||
user_message += bformat(_(" Saved to %1$s. Phew.\n"), from_utf8(s));
|
||||
return user_message;
|
||||
} else {
|
||||
user_message += _(" Save failed! Trying again...\n");
|
||||
@ -980,7 +980,7 @@ docstring Buffer::emergencyWrite()
|
||||
lyxerr << ' ' << s << endl;
|
||||
if (writeFile(FileName(s))) {
|
||||
markClean();
|
||||
user_message += bformat(_(" Saved to %1$. Phew.\n"), from_utf8(s));
|
||||
user_message += bformat(_(" Saved to %1$s. Phew.\n"), from_utf8(s));
|
||||
return user_message;
|
||||
}
|
||||
|
||||
@ -994,7 +994,7 @@ docstring Buffer::emergencyWrite()
|
||||
lyxerr << ' ' << s << endl;
|
||||
if (writeFile(FileName(s))) {
|
||||
markClean();
|
||||
user_message += bformat(_(" Saved to %1$. Phew.\n"), from_utf8(s));
|
||||
user_message += bformat(_(" Saved to %1$s. Phew.\n"), from_utf8(s));
|
||||
return user_message;
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ void rescanTexStyles()
|
||||
return;
|
||||
// FIXME UNICODE
|
||||
frontend::Alert::error(_("Could not update TeX information"),
|
||||
bformat(_("The script `%s' failed."), from_utf8(command.absFilename())));
|
||||
bformat(_("The script `%1$s' failed."), from_utf8(command.absFilename())));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user