From 0ac71230118b2f54c96f4f7f6cd8b5535601a385 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 21 Jan 2010 19:01:22 +0000 Subject: [PATCH] Translate TOC title to document language, not GUI language. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33138 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetTOC.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetTOC.cpp b/src/insets/InsetTOC.cpp index 00f1786cba..7270d18851 100644 --- a/src/insets/InsetTOC.cpp +++ b/src/insets/InsetTOC.cpp @@ -16,6 +16,7 @@ #include "BufferParams.h" #include "DispatchResult.h" #include "FuncRequest.h" +#include "Language.h" #include "LaTeXFeatures.h" #include "MetricsInfo.h" #include "OutputParams.h" @@ -90,8 +91,13 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const return docstring(); xs << html::StartTag("div", "class='toc'"); - xs << html::StartTag("div", tocattr) - << _("Table of Contents") + Language const * lang = buffer().params().language; + static string toctitle = N_("Table of Contents"); + docstring title = lang + ? translateIfPossible(from_ascii(toctitle), lang->code()) + : translateIfPossible(from_ascii(toctitle)); + xs << html::StartTag("div", tocattr) + << title << html::EndTag("div"); Toc::const_iterator it = toc.begin(); Toc::const_iterator const en = toc.end();