Skip to main content

Linter for gettext files

Project description

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… :smile: :laughing: :stuck_out_tongue_winking_eye: :joy: (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) :+1:
  • It works on my machine (TM) :computer:
  • Need refactoring (TM) :construction_worker:

Usage

Using the activated virtual environment created during the installation:

For a local input file:

padpo --input-path a_file.po

or for a local input directory:

padpo --input-path a_directory_containing_po_files

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

padpo --python-docs-fr 978

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

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

Screenshot

Installation

Automatic installation

pip install padpo

Manual 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 (normally this is done automatically at first usage)

    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/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

padpo-0.3.0.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

padpo-0.3.0-py3-none-any.whl (7.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page