Subversion Repositories svn LFS-FR

Compare Revisions

Ignore whitespace Rev 7129 → Rev 7130

/branches/BLFS_po_dev/tools/templatetranslator.py
18,7 → 18,8
 
def convert(entry, regexp, template):
m = regexp.match(entry.msgid)
if m:
# do not modify anything if the translation is already correct
if m and ("fuzzy" in entry.flags or not entry.msgstr):
msgstr = template
try:
msgstr = msgstr.replace("#1", m.group(1))
28,8 → 29,8
except:
x=1
entry.msgstr = msgstr
#if "fuzzy" in entry.flags:
# entry.flags.remove("fuzzy")
# not too sure yet if we can trust this script enough to mark a translation done.
#entry.flags.remove("fuzzy")
 
 
 
52,6 → 53,9
regexps.append([re.compile('Download size: (.*)$'), 'Taille du téléchargement : #1'])
regexps.append([re.compile('Estimated disk space required: (.*)$'), 'Estimation de l\'espace disque requis : #1'])
regexps.append([re.compile('Estimated build time: (.*)$'), 'Estimation du temps de construction : #1'])
regexps.append([re.compile('(http://[^ ]*)$'), '#1'])
regexps.append([re.compile('(https://[^ ]*)$'), '#1'])
regexps.append([re.compile('(ftp://[^ ]*)$'), '#1'])
# Dépendances
regexps.append([re.compile('(.*) Dependencies$'), 'Dépendances de #1'])
regexps.append([re.compile('Required$'), 'Requises'])
81,7 → 85,10
regexps.append([re.compile('Required patch: (.*)$'), 'Correctif requis : #1'])
regexps.append([re.compile('(<othername>.*)$'), '#1'])
regexps.append([re.compile('Introduction to (.*)$'), 'Introduction à #1'])
regexps.append([re.compile('(<xref [^>]>)$'), '#1'])
regexps.append([re.compile('(<xref [^>]*>)$'), '#1'])
regexps.append([re.compile('(<command>[^ <]*</command>)$'), '#1'])
regexps.append([re.compile('(<filename [^>]*>[^ <]*</filename>)$'), '#1'])
regexps.append([re.compile('([^ <]*)$'), '#1'])
 
 
#regexps.append([re.compile('$'), ''])