From 7df9143e32ffff8c8bf990b96506c5ab9bfd9aa5 Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Tue, 27 Mar 2007 21:45:17 +0200 Subject: [PATCH] Use raw strings for generating Documentation POT --- buildscripts/texi-langutils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/buildscripts/texi-langutils.py b/buildscripts/texi-langutils.py index 4e54169dd0..54d4f6f6c5 100644 --- a/buildscripts/texi-langutils.py +++ b/buildscripts/texi-langutils.py @@ -79,7 +79,7 @@ def process_texi (texifilename, i_blurb, n_blurb, write_skeleton, output_file=No if item[0] == '*': g.write ('* ' + item[1] + '::\n') elif output_file and item[4] == 'rglos': - output_file.write ('_("' + item[5] + '") # @rglos in ' + texifilename + '\n') + output_file.write ('_(r"' + item[5] + '") # @rglos in ' + texifilename + '\n') else: g.write ('@' + item[2] + ' ' + item[3] + '\n') if node_trigger: @@ -87,7 +87,7 @@ def process_texi (texifilename, i_blurb, n_blurb, write_skeleton, output_file=No node_trigger = False if not item[2] in ('include', 'menu', 'end menu'): if output_file: - output_file.write ('_("' + item[3].strip () + '") # @' + item[2] + \ + output_file.write ('_(r"' + item[3].strip () + '") # @' + item[2] + \ ' in ' + texifilename + '\n') if item[2] == 'node': node_trigger = True @@ -103,9 +103,9 @@ def process_texi (texifilename, i_blurb, n_blurb, write_skeleton, output_file=No if item[0] == 'include': includes.append(item[1]) elif item[2] == 'rglos': - output_file.write ('# @rglos in ' + texifilename + '\n_("' + item[3] + '")\n') + output_file.write ('# @rglos in ' + texifilename + '\n_(r"' + item[3] + '")\n') else: - output_file.write ('# @' + item[0] + ' in ' + texifilename + '\n_("' + item[1].strip () + '")\n') + output_file.write ('# @' + item[0] + ' in ' + texifilename + '\n_(r"' + item[1].strip () + '")\n') if process_includes: dir = os.path.dirname (texifilename) for item in includes: @@ -124,9 +124,9 @@ if make_gettext: for texi_file in texi_files: process_texi (texi_file, intro_blurb, node_blurb, make_skeleton, node_list) for word in ('Up:', 'Next:', 'Previous:', 'Appendix', 'Footnotes', 'Table of Contents'): - node_list.write ('_("' + word + '")\n') + node_list.write ('_(r"' + word + '")\n') node_list.close () - os.system ('xgettext -c -L Python --no-location -o ' + output_file + ' ' + node_list_filename) + os.system ('pygettext --no-location -o ' + output_file + ' ' + node_list_filename) else: for texi_file in texi_files: process_texi (texi_file, intro_blurb, node_blurb, make_skeleton) -- 2.39.5