summaryrefslogtreecommitdiff
path: root/CustomTarget_html.mk
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2020-06-12 20:26:14 -0300
committerOlivier Hallot <olivier.hallot@libreoffice.org>2020-06-13 12:41:14 +0200
commitabdad98a45ff66fd09422920d198c2d4f3cde8bc (patch)
tree37c5edd4b60a29b67e1971bb3ad296b42782fc12 /CustomTarget_html.mk
parent2c80aef697c33e3d8f231376e08783daa78e6cb3 (diff)
tdf#133928 Help need javascript enabled in browser
Helpcontent2 part Also, optimize XSLT brand template Change-Id: Idfe3647306452f1f8be5632f1e1a70d642533406 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/96238 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'CustomTarget_html.mk')
-rw-r--r--CustomTarget_html.mk30
1 files changed, 30 insertions, 0 deletions
diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 7c04a9249c..f66dd95ca1 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
$(foreach module,$(html_TEXT_MODULES),filelists/html-help/$(module)/$(lang).filelist) \
$(lang)/langnames.js \
$(if $(HELP_OMINDEX_PAGE),$(lang)/xap_tpl) \
+ $(lang)/noscript.html \
) \
))
@@ -83,6 +84,33 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/xap_tpl : \
endif
+# Create noscript.html, when browser has no javascript enabled
+
+define html_gen_noscript_dep
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/noscript.html : \
+ $(if $(filter en-US,$(1)),$(SRCDIR),$(call gb_HelpTranslatePartTarget_get_workdir,$(1)))/helpcontent2/source/text/shared/help/browserhelp.xhp
+
+endef
+
+$(eval $(foreach lang,$(gb_HELP_LANGS),$(call html_gen_noscript_dep,$(lang))))
+
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/noscript.html : \
+ $(SRCDIR)/helpcontent2/help3xsl/noscript.xsl \
+ $(SRCDIR)/helpcontent2/help3xsl/brand.xsl \
+ $(call gb_ExternalExecutable_get_dependencies,xsltproc) \
+ $(SRCDIR)/helpcontent2/CustomTarget_html.mk
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),NJS,1)
+ $(call gb_Helper_abbreviate_dirs,\
+ $(call gb_ExternalExecutable_get_command,xsltproc) \
+ --stringparam lang $* \
+ --stringparam productname "$(PRODUCTNAME)" \
+ --stringparam productversion "$(PRODUCTVERSION)" \
+ -o $@ \
+ $(SRCDIR)/helpcontent2/help3xsl/noscript.xsl \
+ $(if $(filter en-US,$*),$(SRCDIR),$(call gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source/text/shared/help/browserhelp.xhp \
+ )
+
+
# set of installed languages - has to be language independent
$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/languages.js : \
$(SRCDIR)/helpcontent2/CustomTarget_html.mk
@@ -141,6 +169,7 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.js :
$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
$(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
+ $(SRCDIR)/helpcontent2/help3xsl/brand.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Helper_abbreviate_dirs,\
@@ -252,6 +281,7 @@ $(eval $(foreach module,$(html_BMARK_MODULES),$(call html_gen_bookmarks_deps,$(s
# command, if any xsltproc invocation failed):
$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
$(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \
+ $(SRCDIR)/helpcontent2/help3xsl/brand.xsl \
$(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
$(call gb_Helper_abbreviate_dirs,\