diff options
author | Masamichi Hosoda <trueroad@trueroad.jp> | 2015-12-25 00:11:28 +0900 |
---|---|---|
committer | Masamichi Hosoda <trueroad@trueroad.jp> | 2016-01-03 21:27:46 +0900 |
commit | 18e3e868a609a42eb009cf39a678b305a31987b2 (patch) | |
tree | dad8ffd3a5fdaacc36a2d84ed22e769eb9b686eb | |
parent | 155b705d1bedf668aace5dbe84e65065cd4c5bc0 (diff) |
Issue 4713/2: Change texi2html option order
To overwrite texi2html default i18n messages with the LilyPond init file,
delete TEXI2HTML_INIT that exists before TEXI2HTML_LANG.
And, add languages minimum initialization before TEXI2HTML_LANG
instead of TEXI2HTML_INIT.
-rw-r--r-- | Documentation/lilypond-texi2html-lang.init | 18 | ||||
-rw-r--r-- | make/doc-i18n-root-vars.make | 8 |
2 files changed, 25 insertions, 1 deletions
diff --git a/Documentation/lilypond-texi2html-lang.init b/Documentation/lilypond-texi2html-lang.init new file mode 100644 index 0000000000..dc89070bc3 --- /dev/null +++ b/Documentation/lilypond-texi2html-lang.init @@ -0,0 +1,18 @@ +# Languages minimum initialization for texi2html +# $LANGUAGES will be overwritten by lilypond-texi2html.init. + +use utf8; + +my @langlist = ( + 'ca', 'cs', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nl', 'po', 'zh' +); + +foreach my $lang (@langlist) +{ + unless (exists($LANGUAGES->{$lang}) && defined($LANGUAGES->{$lang})) + { + $LANGUAGES->{$lang} = {}; + } +} + +return 1; diff --git a/make/doc-i18n-root-vars.make b/make/doc-i18n-root-vars.make index 9178d57b36..9ff0df3a77 100644 --- a/make/doc-i18n-root-vars.make +++ b/make/doc-i18n-root-vars.make @@ -41,6 +41,7 @@ WEB_MANUALS=web ########### ifneq ($(ISOLANG),) +TEXI2HTML_LANG_INIT = --init-file=$(top-src-dir)/Documentation/lilypond-texi2html-lang.init TEXI2HTML_LANG = --document-language=$(ISOLANG) endif @@ -52,7 +53,12 @@ TEXI2HTML_INIT = --init-file=$(top-src-dir)/Documentation/lilypond-texi2html.ini TEXI2HTML_SPLIT = --prefix=index --split=section TEXI2HTML_INCLUDES += --I=. --I=$(src-dir) --I=$(outdir) $(DOCUMENTATION_INCLUDES) --I=$(XREF_MAPS_DIR) -TEXI2HTML_FLAGS += $(TEXI2HTML_INCLUDES) $(TEXI2HTML_LANG) $(TEXI2HTML_INIT) +# To overwrite texi2html default i18n messages with the LilyPond init file, +# delete TEXI2HTML_INIT that exists before TEXI2HTML_LANG. +TEXI2HTML_FLAGS := $(filter-out $(TEXI2HTML_INIT),$(TEXI2HTML_FLAGS)) +# Instead, add languages minimum initialization before TEXI2HTML_LANG. +TEXI2HTML_FLAGS := $(subst $(TEXI2HTML_LANG),$(TEXI2HTML_LANG_INIT) $(TEXI2HTML_LANG),$(TEXI2HTML_FLAGS)) +TEXI2HTML_FLAGS += $(TEXI2HTML_INCLUDES) $(TEXI2HTML_LANG_INIT) $(TEXI2HTML_LANG) $(TEXI2HTML_INIT) TEXI2HTML = TOP_SRC_DIR=$(top-src-dir) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM) ########### |