From: John Mandereau Date: Wed, 31 Mar 2010 12:36:26 +0000 (+0200) Subject: Add lilypond-book ly verbatim gettext quirk X-Git-Tag: release/2.13.17-1~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3b1c477ab2212f124f865c46df350c5a1c1f2412;p=lilypond.git Add lilypond-book ly verbatim gettext quirk Documentation/snippets/jazz-combo-template.ly contains a variable definition named "bass", of which lilypond-book translates all occurences in Texinfo verbatim ly code, including the case where "bass" is an argument of the \clef command. As variables may be used in Scheme code and this gettextization is done without real parsing, it's impossible to avoid such corner cases, which will thus be fixed ad-hoc as they are discovered. Thanks to Francisco Vila for the report. --- diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 64a90310b7..b4bd319a69 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -960,7 +960,7 @@ def verb_ly_gettext (s): if langdefs.LANGDICT[document_language].enable_ly_identifier_l10n: for v in ly_var_def_re.findall (s): - s = re.sub (r"(?m)(^|[' \\#])%s([^a-zA-Z])" % v, + s = re.sub (r"(?m)(?