Also remove French docs unused file.
TRANSLATION_DIRS = web texidocs
TRANSLATION_FILES = $(shell git ls-files $(ISOLANG) | grep -v GNUmakefile)
+TEXI_LANGUTIL_FLAGS += --skeleton
TELY_FILES = $(call src-wildcard,$(ISOLANG)/*.tely)
skeleton-update:
mkdir -p $(ISOLANG)
- $(PYTHON) $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) --skeleton $(TELY_FILES:$(ISOLANG)/%.tely=../%.tely)
+ $(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)
snippet-update:
@menu
* Files to be translated::
-* Translating the Learning Manual and other Texinfo documentation::
-* Translating the Notation Reference and Application Usage::
-* Translating the Documentation index index.html.in::
+* Translating the Web site and other Texinfo documentation::
+* Adding a Texinfo manual::
@end menu
@node Files to be translated
@include contributor/doc-translation-list.itexi
-@node Translating the Learning Manual and other Texinfo documentation
-@unnumberedsubsubsec Translating the Learning Manual and other Texinfo documentation
+@node Translating the Web site and other Texinfo documentation
+@unnumberedsubsubsec Translating the Web site and other Texinfo documentation
@iftex
@vskip 12pt
list.
-@node Translating the Notation Reference and Application Usage
-@unnumberedsubsubsec Translating the Notation Reference and Application Usage
+@node Adding a Texinfo manual
+@unnumberedsubsubsec Adding a Texinfo manual
-Copy @file{notation.tely} (or @file{application.tely},
-respectively) into @file{@var{MY-LANGUAGE}}, then translate this
-file and run @code{skeleton-update} -- see @ref{Updating documentation
-translation}. Your are now ready to translate the Notation Reference
-(Application Usage, respectively) exactly like the Learning Manual.
+In order to start translating a new manual whose basename is @var{FOO},
+do
+@example
+cd Documentation/@var{MY-LANGUAGE}
+cp ../@var{FOO}.tely .
+mkdir @var{FOO}
+cp web/GNUmakefile @var{FOO}
+@end example
-@node Translating the Documentation index index.html.in
-@unnumberedsubsubsec Translating the Documentation index @file{index.html.in}
+@noindent
+then append @var{FOO} to variable @code{SUBDIRS} in
+Documentation/@var{MY-LANGUAGE}/GNUmakefile, then translate file
+@var{MY-LANGUAGE}/@var{FOO}.tely and run @code{skeleton-update}:
-Unlike almost all HTML pages in this documentation, links in this page
-are not tweaked by @file{postprocess_html.py}, so links should be
-manually edited to link to existing translations.
+@example
+cd Documentation/
+make ISOLANG=@var{MY-LANGUAGE} TEXI_LANGUTIL_FLAGS=--head-only skeleton-update
+@end example
+
+@noindent
+Your are now ready to translate the new manual exactly like the web site
+or the Learning Manual.
@node Documentation translation maintenance
the full file in English will be opened instead.
Texinfo skeleton files, i.e. @file{.itely} files not yet translated,
-containing only the Texinfo structure can be updated automatically:
-whenever @command{make check-translation} shows that such files should
-be updated, run from @file{Documentation/}
+containing only the first node of the original file in English can be
+updated automatically: whenever @command{make check-translation} shows
+that such files should be updated, run from @file{Documentation/}
@example
make ISOLANG=@var{MY_LANGUAGE} skeleton-update
+++ /dev/null
-@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
-
-@ignore
- Translation of GIT committish: d56aa8181857c5feabf303ae88e716eba069f0a9
-
-
- When revising a translation, copy the HEAD committish of the
- version that you are working on. See TRANSLATION for details.
-@end ignore
-
-@c \version "2.12.0"
-
-@quotation
-Nous souhaitons dédier ce programme à tous les amis que nous avons
-rencontrés par la musique.
-
-Han-Wen et Jan
-@end quotation
return output
-optlist, texi_files = getopt.getopt(sys.argv[1:],'no:d:b:i:l:',['skeleton', 'gettext'])
+optlist, texi_files = getopt.getopt(sys.argv[1:],'no:d:b:i:l:',['skeleton', 'gettext', 'head-only'])
process_includes = not ('-n', '') in optlist # -n don't process @include's in texinfo files
make_gettext = ('--gettext', '') in optlist # --gettext generate a node list from a Texinfo source
make_skeleton = ('--skeleton', '') in optlist # --skeleton extract the node tree from a Texinfo source
+head_only = ('--head-only', '') in optlist # --head-only only write first node in included Texinfo skeletons
output_name = 'doc.pot'
elif x[0] == '-l': # -l ISOLANG set documentlanguage to ISOLANG
doclang = '; documentlanguage: ' + x[1]
-texinfo_with_menus_re = re.compile (r"^(\*) +([^:\n]+)::.*?$|^@(afourpaper|author|bye|contents|copying|end copying|divClass|divEnd|divId|documentencoding|documentlanguage|finalout|ifnottex|end ifnottex|imageClickable|imageFloat|imageId|image|include|menu|end menu|node|quotation|end quotation|ref|rgloss|setfilename|settitle|set|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|titlefont|titlepage|end titlepage|title|sourceimage|subtitle|top|vskip|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading|c) *(([^ \n].*)|$)", re.M)
+texinfo_with_menus_re = re.compile (r"^(\*) +([^:\n]+)::.*?$|^@(include|menu|end menu|node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) *(.*?)$|@(rglos){(.+?)}", re.M)
texinfo_re = re.compile (r"^@(include|node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) *(.+?)$|@(rglos){(.+?)}", re.M)
lsr_verbatim_ly_re = re.compile (r'% begin verbatim$')
texinfo_verbatim_ly_re = re.compile (r'^@lilypond\[.*?verbatim')
-def process_texi (texifilename, i_blurb, n_blurb, write_skeleton, topfile, output_file=None, scan_ly=False):
+def process_texi (texifilename, i_blurb, n_blurb, write_skeleton, topfile,
+ output_file=None, scan_ly=False, inclusion_level=0):
try:
f = open (texifilename, 'r')
texifile = f.read ()
g.write ('@translationof ' + node_just_defined + '\n')
g.write (n_blurb)
node_just_defined = ''
+ if head_only and inclusion_level == 1:
+ break
elif item[2] == 'include':
includes.append (item[3])
else:
printedfilename + '\n_(r"' + item[3].strip () + '")\n')
if item[2] == 'node':
node_just_defined = item[3].strip ()
- g.write (end_blurb)
+ if not head_only:
+ g.write (end_blurb)
g.close ()
elif output_file:
else:
output_file.write ('# @' + item[0] + ' in ' + printedfilename + '\n_(r"' + item[1].strip () + '")\n')
- if process_includes:
+ if process_includes and (not head_only or inclusion_level < 1):
dir = os.path.dirname (texifilename)
for item in includes:
- process_texi (os.path.join (dir, item.strip ()), i_blurb, n_blurb, write_skeleton, topfile, output_file, scan_ly)
+ process_texi (os.path.join (dir, item.strip ()), i_blurb, n_blurb,
+ write_skeleton, topfile, output_file, scan_ly, inclusion_level + 1)
except IOError, (errno, strerror):
sys.stderr.write ("I/O error(%s): %s: %s\n" % (errno, texifilename, strerror))