padpo/README.md

98 lines
1.7 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
## 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
2019-11-16 10:58:04 +00:00
For a local input file:
```bash
2019-11-18 17:16:51 +00:00
padpo --input-path a_file.po
2019-11-16 10:58:04 +00:00
```
or for a local input directory:
```bash
2019-11-18 17:16:51 +00:00
padpo --input-path a_directory_containing_po_files
2019-11-16 10:58:04 +00:00
```
or for a pull request in python-docs-fr repository (here pull request #978)
2019-11-05 15:45:45 +00:00
```bash
2019-11-18 17:16:51 +00:00
padpo --python-docs-fr 978
2019-11-05 15:45:45 +00:00
```
2019-11-16 10:58:04 +00:00
or for a pull request in a GitHub repository (here python/python-docs-fr/pull/978)
2019-11-05 15:45:45 +00:00
```bash
2019-11-18 17:16:51 +00:00
padpo --github python/python-docs-fr/pull/978
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
2019-11-18 16:35:37 +00:00
### Automatic installation
2019-11-22 15:22:13 +00:00
```bash
2019-11-18 16:35:37 +00:00
pip install padpo
```
### Manual installation
2019-11-05 16:34:30 +00:00
1. Create a virtual environment with Python 3.7 and above
2019-11-16 10:58:04 +00:00
2019-11-05 15:45:45 +00:00
```bash
python3.7 -m venv venv
```
2019-11-16 10:58:04 +00:00
2019-11-05 15:45:45 +00:00
2. Activate the virtual environment
2019-11-16 10:58:04 +00:00
2019-11-05 15:45:45 +00:00
```bash
source venv/bin/activate
```
2019-11-16 10:58:04 +00:00
2019-11-05 15:45:45 +00:00
3. Install dependencies
2019-11-16 10:58:04 +00:00
2019-11-05 15:45:45 +00:00
```bash
2019-12-02 17:24:23 +00:00
poetry install
2019-11-05 15:45:45 +00:00
```
2019-11-16 10:58:04 +00:00
2019-12-02 17:24:23 +00:00
Note: this uses `poetry` that you can get here: https://poetry.eustace.io/docs/
2019-11-18 16:02:09 +00:00
## Update on PyPI
2019-12-02 17:24:23 +00:00
`./deliver.sh`
2019-12-02 18:36:53 +00:00
## Changelog
2019-12-09 11:51:04 +00:00
### v0.6.0 (2019-12-9)
* check errors against defined glossaries
2019-12-03 09:43:39 +00:00
### v0.5.0 (2019-12-3)
2019-12-03 08:27:05 +00:00
* check spelling errors with grammalecte
2019-12-03 09:43:39 +00:00
* tag releases!
2019-12-03 08:27:05 +00:00
### v0.4.0 (2019-12-2)
2019-12-02 18:36:53 +00:00
* use poetry: https://poetry.eustace.io/docs/
* add some tests with tox and pytests
* fix some false positive issues with grammalecte