|
13e9d6adab
|
Bulk update s/Issue #[0-9]/bpo-[0-9]/ in whatsnew/changelog.po.
Done with:
pofile = polib.pofile('./whatsnew/changelog.po')
for entry in pofile.fuzzy_entries():
bpo = re.search('bpo-[0-9]+', entry.msgid)
issue = re.search('Issue #[0-9]+', entry.msgstr)
if bpo and issue:
bpo = bpo.group(0)
issue = issue.group(0)
bpo_number = int(bpo.split('-')[1])
issue_number = int(issue.split('#')[1])
if bpo_number == issue_number:
entry.msgstr = entry.msgstr.replace(issue, bpo)
entry.flags.remove('fuzzy')
pofile.save()
|
2017-05-27 14:22:57 +02:00 |
|