forked from AFPy/python-docs-fr
Julien Palard
5646bc52a4
import polib import pathlib def check(file): pofile = polib.pofile(file) for entry in pofile: if not entry.msgstr: continue if entry.msgid.endswith(" ::"): entry.msgstr = entry.msgstr.rstrip(": \u202f\u00A0") + " ::" if entry.msgid.endswith("::") and not entry.msgid.endswith(" ::"): entry.msgstr = entry.msgstr.rstrip(": ,. \u202f\u00A0") + "\u00A0::" pofile.save() for file in pathlib.Path(".").glob("*.po"): check(file) for file in pathlib.Path(".").glob("*/*.po"): check(file) |
||
---|---|---|
.. | ||
argparse.po | ||
clinic.po | ||
cporting.po | ||
curses.po | ||
descriptor.po | ||
functional.po | ||
index.po | ||
instrumentation.po | ||
ipaddress.po | ||
logging-cookbook.po | ||
logging.po | ||
pyporting.po | ||
regex.po | ||
sockets.po | ||
sorting.po | ||
unicode.po | ||
urllib2.po |