From 2ef545a2504a82474d289612b635c29149272add Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Fri, 12 Mar 2010 13:47:28 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiErrorList.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) 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; } -- 2.39.2