padpo/README.md

60 lines
1.2 KiB
Markdown
Raw Normal View History

2019-11-05 15:30:14 +00:00
# padpo
2019-11-05 15:45:45 +00:00
2019-11-05 15:30:14 +00:00
Linter for gettext files (*.po)
2019-11-05 15:45:45 +00:00
2019-11-05 15:51:07 +00:00
Created to help the translation of official Python docs in French: https://github.com/python/python-docs-fr
2019-11-05 16:30:47 +00:00
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).
2019-11-05 15:45:45 +00:00
**WORK IN PROGRESS**
## License
BSD 3-clause
2019-11-05 15:56:03 +00:00
Pull request are welcome.
2019-11-05 15:45:45 +00:00
## Trademark
* Code in one file (TM) :+1:
* It works on my machine (TM) :computer:
* Need refactoring (TM) :construction_worker:
## Usage
2019-11-05 15:52:20 +00:00
Using the *activated virtual environment* created during the installation:
2019-11-05 15:45:45 +00:00
```bash
2019-11-05 15:52:20 +00:00
python padpo.py a_file.po
2019-11-05 15:45:45 +00:00
```
or
```bash
2019-11-05 15:52:20 +00:00
python padpo.py a_directory_containing_po_files
2019-11-05 15:45:45 +00:00
```
2019-11-05 16:08:08 +00:00
![Screenshot](screenshot.png)
2019-11-05 15:45:45 +00:00
## Installation
1. Create a virtual environment
```bash
python3.7 -m venv venv
```
2. Activate the virtual environment
```bash
source venv/bin/activate
```
3. Install dependencies
```bash
pip install -r requirements.txt
```
4. Get grammalecte
```bash
wget https://grammalecte.net/grammalecte/zip/Grammalecte-fr-v1.5.0.zip
2019-11-05 16:01:57 +00:00
unzip Grammalecte-fr-v1.5.0.zip -d Grammalecte-fr-v1.5.0
2019-11-05 15:45:45 +00:00
cd Grammalecte-fr-v1.5.0
pip install .
```