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:
Vincent van Ravesteijn 2009-08-15 20:47:46 +00:00
parent a492f5d553
commit 67c59b8f49
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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())));
}