From: John Mandereau <john.mandereau@gmail.com>
Date: Tue, 27 Mar 2007 19:45:17 +0000 (+0200)
Subject: Use raw strings for generating Documentation POT
X-Git-Tag: release/2.11.22-1~26
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7df9143e32ffff8c8bf990b96506c5ab9bfd9aa5;p=lilypond.git

Use raw strings for generating Documentation POT
---

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)