X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fauxiliar%2Ftely-gettext.py;h=3adc4cb6d3b692b09d8b953af22e4c52c633fb8e;hb=99b6f3aa3558b01c9d4158b19a1f1794c534f89c;hp=b2729489bb964888d8de941653670496c064b864;hpb=794dcbdb52faf4292036cd1b0270a956cf4316a3;p=lilypond.git diff --git a/scripts/auxiliar/tely-gettext.py b/scripts/auxiliar/tely-gettext.py index b2729489bb..3adc4cb6d3 100755 --- a/scripts/auxiliar/tely-gettext.py +++ b/scripts/auxiliar/tely-gettext.py @@ -22,7 +22,7 @@ _doc = langdefs.translation[lang] include_re = re.compile (r'@include (.*?)$', re.M) whitespaces = re.compile (r'\s+') -ref_re = re.compile (r'(?ms)@(ruser|rprogram|ref|rlearning)\{(.*?)\}') +ref_re = re.compile (r'(?ms)@((?:ressay|rgloss|rinternals|rlearning|rslr|rprogram|ruser|ref)|named)\{(.*?)\}') node_section_re = re.compile (r'@node (.*?)\n@((?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) (.*?)\n') section_only_re = re.compile (r'@((?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) (.*?)\n') menu_entry_re = re.compile (r'\* (.*?)::') @@ -50,7 +50,8 @@ def process_file (filename, master_file_dir='.', included=False): page = f.read () f.close() page = ref_re.sub (ref_gettext, page) - page = node_section_re.sub (node_gettext, page) + if not '\\n@translationof' in page: + page = node_section_re.sub (node_gettext, page) page = section_only_re.sub (section_gettext, page) page = menu_entry_re.sub (menu_entry_gettext, page) page = page.replace ("""@c -- SKELETON FILE --