Fix bug #6397: use GUIfied strings in the error dialog.

Forward port of r33408 (commit by Juergen).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33725 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-03-12 13:47:28 +00:00
parent 4bdd8fef50
commit 2ef545a250

View File

@ -32,6 +32,23 @@
using namespace std;
using namespace lyx::support;
namespace {
string const guiErrorType(string const s)
{
if (s == "docbook")
return N_("DocBook");
else if (s == "literate")
return N_("Literate");
else if (s == "platex")
return N_("pLaTeX");
else if (s == "latex")
return N_("LaTeX");
return s;
}
} // namespace anon
namespace lyx {
namespace frontend {
@ -109,8 +126,9 @@ bool GuiErrorList::initialiseParams(string const & data)
Buffer const * buf = from_master_ ?
bufferview()->buffer().masterBuffer()
: &bufferview()->buffer();
name_ = bformat(_("%1$s Errors (%2$s)"), _(error_type),
from_utf8(buf->absFileName()));
name_ = bformat(_("%1$s Errors (%2$s)"),
_(guiErrorType(error_type)),
from_utf8(buf->absFileName()));
paramsToDialog();
return true;
}