From e629fc64d42121e86bf2230a3b515d1d0d868dcd Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Fri, 20 May 2016 21:19:04 +0200 Subject: [PATCH] Fixed for index.hhp output when using template engine --- src/context.cpp | 7 +++++++ src/htmlhelp.cpp | 2 +- src/htmlhelp.h | 1 + templates/html/htmljsmenudata.tpl | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/context.cpp b/src/context.cpp index 9973a592e3c..f2f14198ed6 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -35,6 +35,7 @@ #include "docparser.h" #include "htmlgen.h" #include "htmldocvisitor.h" +#include "htmlhelp.h" #include "latexgen.h" #include "latexdocvisitor.h" #include "dot.h" @@ -1006,6 +1007,10 @@ class TranslateContext::Private { return theTranslator->trExamplesDescription(); } + TemplateVariant langString() const + { + return HtmlHelp::getLanguageString(); + } Private() { static bool init=FALSE; @@ -1195,6 +1200,8 @@ class TranslateContext::Private s_inst.addProperty("extendsClass", &Private::extendsClass); //%% string examplesDescription s_inst.addProperty("examplesDescription",&Private::examplesDescription); + //%% string langstring + s_inst.addProperty("langString", &Private::langString); init=TRUE; } diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index fbfece0389c..ad56de8ee99 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -447,7 +447,7 @@ void HtmlHelp::initialize() } -static QCString getLanguageString() +QCString HtmlHelp::getLanguageString() { if (!theTranslator->idLanguage().isEmpty()) { diff --git a/src/htmlhelp.h b/src/htmlhelp.h index 8191d03327c..9c3fa043fa3 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -84,6 +84,7 @@ class HtmlHelp : public IndexIntf void addIndexFile(const char *name); void addImageFile(const char *); void addStyleSheetFile(const char *) {} + static QCString getLanguageString(); private: friend class HtmlHelpIndex; diff --git a/templates/html/htmljsmenudata.tpl b/templates/html/htmljsmenudata.tpl index 2cfbbb06414..08d87739fb5 100644 --- a/templates/html/htmljsmenudata.tpl +++ b/templates/html/htmljsmenudata.tpl @@ -36,9 +36,9 @@ var menudata={children:[ {% if fileList %} ,{text:'{{ tr.files }}',url:'files{{ config.HTML_FILE_EXTENSION }}',children[ {text:'{{ tr.fileList }}',url:'files{{ config.HTML_FILE_EXTENSION }}'} -{% if fileMemberIndex.all %} +{% if globalsIndex.all %} ,{text:'{{ tr.fileMembers }}',url'globals{{ config.HTML_FILE_EXTENSION }}',children:[ - {% with page=fileMembersIndex %} + {% with page=globalsIndex %} {% include 'htmljsmenumembersdata.tpl' %} {% endwith %} ]}