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
This commit is contained in:
Richard Heck 2010-01-21 19:01:22 +00:00
parent 562f1da9c9
commit 0ac7123011

View File

@ -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();