En parallèle sur cpython :
[replace last value by highest value for Flag auto](https://github.com/python/cpython/pull/100709)
Co-authored-by: Christophe Nanteuil <christophe.nanteuil@gmail.com>
Reviewed-on: AFPy/python-docs-fr#19
Reviewed-by: Julien Palard <julien@palard.fr>
Co-authored-by: Christophe Nanteuil <christophenan@noreply.localhost>
Co-committed-by: Christophe Nanteuil <christophenan@noreply.localhost>
Actuellement *base class* est traduit en *classe de base*. Je propose
d'utiliser *classe ancêtre*, les deux versions existant dans la littérature,
mais *de base* pouvant laisser penser qu'il s'agit de la classe la plus
loin dans l'héritage possible.
Co-authored-by: Christophe Nanteuil <christophe.nanteuil@gmail.com>
Reviewed-on: AFPy/python-docs-fr#11
Reviewed-by: Julien Palard <julien@palard.fr>
Co-authored-by: Christophe Nanteuil <christophenan@noreply.localhost>
Co-committed-by: Christophe Nanteuil <christophenan@noreply.localhost>
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)