python-docs-fr/howto
Julien Palard 5646bc52a4
Yet another batch of : :: and no break spaces... (#1148)
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)
2020-02-05 23:32:21 +01:00
..
argparse.po Yet another batch of : :: and no break spaces... (#1148) 2020-02-05 23:32:21 +01:00
clinic.po Yet another batch of : :: and no break spaces... (#1148) 2020-02-05 23:32:21 +01:00
cporting.po FIX: Excès de zèle sur les espaces insécables. (#1082) 2019-12-13 14:28:20 +01:00
curses.po Uniformize project-id-version. (#1041) 2019-12-05 23:15:54 +01:00
descriptor.po Fix variable in travis-ci (#1063) 2019-12-12 16:43:15 +01:00
functional.po Yet another batch of : :: and no break spaces... (#1148) 2020-02-05 23:32:21 +01:00
index.po Uniformize project-id-version. (#1041) 2019-12-05 23:15:54 +01:00
instrumentation.po Début de la traduction de howto/instrumentation.po (#920) 2020-02-04 11:33:24 +01:00
ipaddress.po Yet another batch of : :: and no break spaces... (#1148) 2020-02-05 23:32:21 +01:00
logging-cookbook.po Replicating known translations using pomerge. (#1147) 2020-02-05 15:12:44 +01:00
logging.po Uniformize project-id-version. (#1041) 2019-12-05 23:15:54 +01:00
pyporting.po Yet another batch of : :: and no break spaces... (#1148) 2020-02-05 23:32:21 +01:00
regex.po Yet another batch of : :: and no break spaces... (#1148) 2020-02-05 23:32:21 +01:00
sockets.po Uniformize project-id-version. (#1041) 2019-12-05 23:15:54 +01:00
sorting.po Yet another batch of : :: and no break spaces... (#1148) 2020-02-05 23:32:21 +01:00
unicode.po Yet another batch of : :: and no break spaces... (#1148) 2020-02-05 23:32:21 +01:00
urllib2.po Uniformize project-id-version. (#1041) 2019-12-05 23:15:54 +01:00