Use --keyword=_doc instead of running SED on copied sources.
Add warning message in texi-langutils.py:
* Why do we need node names extracted into Documentation/po
and translated? That's already done inline using @translationof?
* Why do we need translated node names of ALL languages there?
I'm tempted to junk that and add
- elif output_file:
+ elif output_file and scan_ly:
in texi-langutils.py
I.e., why do we have
#. @node in Documentation/learning/tutorial.itely
#. @section in Documentation/learning/tutorial.itely
msgid "How to write input files"
msgstr ""
when this node is translated inline in
Documentation/<LANG>/learning/tutorial.itely?
And why are these?
#. @node in Documentation/fr/essay.tely
#. @appendix in Documentation/fr/essay.tely
#. @node in Documentation/fr/learning.tely
#. @appendix in Documentation/fr/learning.tely
#. @node in Documentation/fr/notation.tely
#. @appendix in Documentation/fr/notation.tely
#. @node in Documentation/fr/usage.tely
#. @appendix in Documentation/fr/usage.tely
msgid "Index de LilyPond"
msgstr ""
#. @subsubheading in Documentation/fr/macros.itexi
msgid "Commandes prédéfinies"
msgstr ""
@echo " last translation update"
@echo " update-translation ISOLANG=LL call $$$$EDITOR to help updating"
@echo " the translation"
- @echo " skeleton-update ISOLANG=LL update Texinfo skeleton files"
@echo " snippet-update ISOLANG=LL update ly snippets in Texinfo translation"
@echo " according to docs in English"
@echo " (use with caution)"
TELY_FILES = $(call src-wildcard,$(ISOLANG)/*.tely)
skeleton-update:
+ @echo "$@ has been discontinued"
+ @echo "simply copy .texi, .itexi files you want to translate"
+ exit 2
mkdir -p $(ISOLANG)
$(PYTHON) $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) $(TEXI_LANGUTIL_FLAGS) $(TELY_FILES:$(ISOLANG)/%.tely=../%.tely)
$(PYTHON) $(auxscript-dir)/texi-skeleton-update.py $(ISOLANG) $(outdir)
LANGS = $(shell $(PYTHON) $(top-src-dir)/python/langdefs.py)
DOMAIN=lilypond-doc
DOC_PO_SOURCES = python/auxiliar/postprocess_html.py \
- scripts/build/texi-gettext.py scripts/auxiliar/translations-status.py
-TELY_FILES = $(shell ls $(depth)/Documentation/user/*.tely)
+ scripts/auxiliar/tely-gettext.py scripts/auxiliar/translations-status.py
+TELY_FILES = $(shell ls $(depth)/Documentation/*.tely)
TELY_FILES += $(foreach l, $(LANGS), $(shell ls $(depth)/Documentation/$(l)/*.tely))
LSR_LYS := $(shell ls $(depth)/Documentation/snippets/*.ly)
TELY_FILES += $(LSR_LYS:%.ly=../%.ly)
po-update:
$(PYTHON) $(auxscript-dir)/texi-langutils.py -d $(outdir) -o texi.pot --gettext $(TELY_FILES:%.tely=../%.tely)
$(foreach i, $(DOC_PO_SOURCES), cp $(top-src-dir)/$(i) $(outdir) &&) true
- cd $(outdir) && sed -i -e s/_doc/_/g $(foreach i, $(DOC_PO_SOURCES), $(notdir $(i)))
- cd $(outdir) && xgettext -cjn -L Python -o buildscripts.pot $(foreach i, $(DOC_PO_SOURCES), $(notdir $(i)))
+ cd $(outdir) && xgettext --keyword=_doc -cjn -L Python -o buildscripts.pot $(foreach i, $(DOC_PO_SOURCES), $(notdir $(i)))
msgcat -o $(outdir)/doc.pot $(outdir)/buildscripts.pot $(outdir)/texi.pot
msgmerge -U lilypond-doc.pot $(outdir)/doc.pot
for i in $(CATALOGS); do \
g.close ()
elif output_file:
+ m = re.search ('Documentation/(..)/', texifilename)
+ if m:
+ lang = m.group (1)
+ print 'FIXME: extracting node names from:', texifilename
+ print 'please explain why extract translated (LANG=%(lang)s) node names into node_list' % locals ()
+ print 'and thus into Documentation/*.po for translation?'
toto = texinfo_re.findall (texifile)
for item in toto:
if item[0] == 'include':
elif item[2] == 'rglos':
output_file.write ('# @rglos in ' + printedfilename + '\n_(r"' + item[3] + '")\n')
else:
- output_file.write ('# @' + item[0] + ' in ' + printedfilename + '\n_(r"' + item[1].strip () + '")\n')
+ output_file.write ('# @' + item[0] + ' in ' + printedfilename + '\n_(r"' + item[1].strip ().replace ('\\', r'\\') + '")\n')
if process_includes and (not head_only or inclusion_level < 1):
dir = os.path.dirname (texifilename)
and not 'Documentation/es/' in texi_file
and not 'Documentation/fr/' in texi_file
and not 'Documentation/ja/' in texi_file
+ and not 'Documentation/hu/' in texi_file
+ and not 'Documentation/it/' in texi_file
and not 'Documentation/nl/' in texi_file
and not 'Documentation/po/' in texi_file
)
for word in ('Up:', 'Next:', 'Previous:', 'Appendix ', 'Footnotes', 'Table of Contents'):
node_list.write ('_(r"' + word + '")\n')
node_list.close ()
- os.system ('xgettext -c -L Python --no-location -o ' + output_name + ' ' + node_list_filename)
+ os.system ('xgettext --keyword=_doc -c -L Python --no-location -o ' + output_name + ' ' + node_list_filename)
else:
for texi_file in texi_files:
process_texi (texi_file, intro_blurb, node_blurb, make_skeleton,