Linter for gettext files (*.po)
Go to file
2019-11-18 17:02:09 +01:00
padpo fix logging 2019-11-18 16:56:19 +01:00
.gitignore Added PyCharm's .idea folder in gitignore 2019-11-18 14:58:53 +01:00
LICENSE Initial commit 2019-11-05 16:30:14 +01:00
README.md reminder 2019-11-18 17:02:09 +01:00
requirements.txt add twine requirement 2019-11-18 15:07:22 +01:00
screenshot.png add screenshot 2019-11-05 17:08:08 +01:00
setup.py fix logging 2019-11-18 16:56:19 +01:00

padpo

Linter for gettext files (*.po)

Created to help the translation of official Python docs in French: https://github.com/python/python-docs-fr

Il faut demander aux traducteurs s'ils n'ont pas de pot quand ils traduisent, maintenant ils ont padpo😄 😆 😜 😂 (note : il était tard le soir quand j'ai trouvé le nom).

WORK IN PROGRESS

License

BSD 3-clause

Pull request are welcome.

Trademark

  • Code in one file (TM) 👍
  • It works on my machine (TM) 💻
  • Need refactoring (TM) 👷

Usage

Using the activated virtual environment created during the installation:

For a local input file:

python padpo.py --input-path a_file.po

or for a local input directory:

python padpo.py --input-path a_directory_containing_po_files

or for a pull request in python-docs-fr repository (here pull request #978)

python padpo.py --python-docs-fr 978

or for a pull request in a GitHub repository (here python/python-docs-fr/pull/978)

python padpo.py --github python/python-docs-fr/pull/978

Screenshot

Installation

  1. Create a virtual environment with Python 3.7 and above

    python3.7 -m venv venv
    
  2. Activate the virtual environment

    source venv/bin/activate
    
  3. Install dependencies

    pip install -r requirements.txt
    
  4. Get grammalecte

    pip install wheel
    wget https://grammalecte.net/grammalecte/zip/Grammalecte-fr-v1.5.0.zip
    unzip  Grammalecte-fr-v1.5.0.zip -d Grammalecte-fr-v1.5.0
    cd Grammalecte-fr-v1.5.0
    pip install .
    

Update on PyPI

  • git pull
  • activate venv
  • change version in setup.py and in padpo.__init__
  • clean
    • rm -rf build/ dist/ eggs/
    • TODO make a script for this (and better clean)
  • python setup.py sdist
  • python setup.py bdist_wheel
  • twine upload dist/*