- original = file_name.replace (os.path.join ('texidocs' + os.path.sep, 'lsr' + os.path.sep, 1)
- original = original.replace ('.texidoc', '.ly', 1)
-
- # URG dirty .texidoc files manipulation in a dirty way
- if touch_committishes and buildlib.check_translated_doc (original,
- file_name,
- translated_contents,
- color=use_colors and not update_mode)[1]:
- (estimated_revision, error) = buildlib.read_pipe (vc_last_texidoc_revision % vars ())
- if error:
- sys.stderr.write ('warning: %s: %s' % (file_name, error))
- estimated_revision = estimated_revision.strip ()
- translated_contents = re.sub (r'(?m)^%+\s*Translation of GIT committish:.*\n', '', translated_contents)
- f = open (file_name, 'w')
- f.write (full_translated_contents[:translated_contents_start])
- f.write ('%% Translation of GIT committish: ' + estimated_revision + '\n')
- f.write (translated_contents)
- f.write (full_translated_contents[translated_contents_end:])
- return
- original = dir_lang (file_name, '', lang_dir_index)
+ original = file_name.replace (os.path.join (check_lang, 'texidocs'), 'snippets', 1)
+ original = original.replace ('.texidoc', '.ly', 1)
+ else:
+ original = dir_lang (file_name, '', lang_dir_index)