]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #6397: use GUIfied strings in the error dialog.
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 12 Mar 2010 13:47:28 +0000 (13:47 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 12 Mar 2010 13:47:28 +0000 (13:47 +0000)
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

index f104cd2ffba1461ff9213a1ff6d639fe4b6aafc4..dca16bd308d69b4879e854f5dedf80a4bc59a2cc 100644 (file)
 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;
 }