X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fauxiliar%2Ftexi-langutils.py;h=a2da780f2619de34fdf3c99ffb5c1d1eefe7b185;hb=590ab8fc6d1565e68809e3a2eb16e1ce01ef541e;hp=d24f80313fc04ddd29e85cd78ed7323236ffabc0;hpb=dbad9a5ad3430ec0d7832f8854eb8cbb8195a6d8;p=lilypond.git diff --git a/scripts/auxiliar/texi-langutils.py b/scripts/auxiliar/texi-langutils.py index d24f80313f..a2da780f26 100755 --- a/scripts/auxiliar/texi-langutils.py +++ b/scripts/auxiliar/texi-langutils.py @@ -147,7 +147,7 @@ def process_texi (texifilename, i_blurb, n_blurb, write_skeleton, topfile, g.write (end_blurb) g.close () - elif output_file: + elif output_file and scan_ly: toto = texinfo_re.findall (texifile) for item in toto: if item[0] == 'include': @@ -155,7 +155,7 @@ def process_texi (texifilename, i_blurb, n_blurb, write_skeleton, topfile, 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) @@ -178,12 +178,16 @@ if make_gettext: # Urgly: scan ly comments and variable names only in English doco is_english_doc = ( True + and not 'Documentation/cs/' in texi_file and not 'Documentation/de/' in texi_file and not 'Documentation/es/' in texi_file and not 'Documentation/fr/' in texi_file + and not 'Documentation/hu/' in texi_file and not 'Documentation/ja/' in texi_file + and not 'Documentation/it/' in texi_file and not 'Documentation/nl/' in texi_file and not 'Documentation/po/' in texi_file + and not 'Documentation/zh/' in texi_file ) process_texi (texi_file, intro_blurb, node_blurb, make_skeleton, os.path.basename (texi_file), node_list, @@ -191,7 +195,7 @@ if make_gettext: 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,