How to contribute


Installation:

You will first need to clone or fork the project from GitHUB:

git clone https://github.com/s-ball/i18nparse.git


Improving existing translations:

The po files are is the src directory, named as xx.po, where xx is a
language code. They are text files, so you can easily edit them.


Adding new languages:

The src directory contains the argparse.pot file which is a standard portable
object template. There are plenty of tools allowing to produce and generate a
new po file (GNU gettext, poedit, etc.) and their description is beyond the
object of this text.

Anyway, except for the French languages, all translation .po files are
provided by the Translation Project (https://translationproject.org/). So any
improvement should be directed there.

Testing locally:

The project uses hatch as its build system. You can simply build a new source
distribution and the associated wheel with `hatch build` from a GitHub clone
or a source distribution from PyPI.

The recommended way is to do that in a virtual environment.

Pot file generation:

I normally build an initial pot file from the last published Python version
available at https//python.org. Then I control manually whether string ids
from older but still maintained versions have been dropped and I add them to
the tail of the pot file to ensure compatibility. I only remove them when
- either a Python version reaches its end of life
- or I decide to drop support for that version

In any case, support shall be consistent with the requires-python directive
from pyproject.toml

The command xgettext --no-location --sort-output --omit-header is great at
generating po files that can easily be compared with each other. Of course
the final pot file shall contain the full location information (relevant for
the most recent Python release), a header, and the order of the messages is
expected to be the order they have in the argparse.py file.

Caveats:

pot and po files are assumed to use UTF-8. Beware when using Windows...

The "compiled" mo files (for machine object) and generated by setup.py during
 the build phase. That means that they will never exist in the source tree.
Be sure to never import from the source tree for that reason...
