From: Vincent van Ravesteijn Date: Fri, 12 Mar 2010 13:47:28 +0000 (+0000) Subject: Fix bug #6397: use GUIfied strings in the error dialog. X-Git-Tag: 2.0.0~3817 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2ef545a2504a82474d289612b635c29149272add;p=features.git 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 --- diff --git a/src/frontends/qt4/GuiErrorList.cpp b/src/frontends/qt4/GuiErrorList.cpp index f104cd2ffb..dca16bd308 100644 --- a/src/frontends/qt4/GuiErrorList.cpp +++ b/src/frontends/qt4/GuiErrorList.cpp @@ -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; }