padpo/README.md

134 lines
3.5 KiB
Markdown
Raw Normal View History

2019-11-05 15:30:14 +00:00
# padpo
2019-11-05 15:45:45 +00:00
2020-08-02 19:42:53 +00:00
[![PyPI](https://img.shields.io/pypi/v/padpo.svg)](https://pypi.python.org/pypi/padpo)
[![PyPI](https://img.shields.io/pypi/l/padpo.svg)](https://github.com/vpoulailleau/padpo/blob/master/LICENSE)
[![Code style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Downloads](https://pepy.tech/badge/padpo)](https://pepy.tech/project/padpo)
2020-12-04 07:20:20 +00:00
<!--
2020-12-04 07:21:18 +00:00
[![Travis](https://api.travis-ci.com/vpoulailleau/padpo.svg?branch=master)](https://travis-ci.com/vpoulailleau/padpo)
2020-08-02 19:42:53 +00:00
[![Test Coverage](https://api.codeclimate.com/v1/badges/ab4759d5dc9cc7ea915e/test_coverage)](https://codeclimate.com/github/vpoulailleau/padpo/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/ab4759d5dc9cc7ea915e/maintainability)](https://codeclimate.com/github/vpoulailleau/padpo/maintainability)
2020-12-04 07:20:20 +00:00
-->
2020-08-02 19:42:53 +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
## License
BSD 3-clause
2019-11-05 15:56:03 +00:00
Pull request are welcome.
## Padpo is part of poutils!
2020-10-14 11:44:28 +00:00
[Poutils](https://pypi.org/project/poutils) (`.po` utils) is a metapackage to easily install useful Python tools to use with po files
and `padpo` is a part of it! Go check out [Poutils](https://pypi.org/project/poutils) to discover the other tools!
2020-10-14 11:44:28 +00:00
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)
2020-08-25 14:58:30 +00:00
### Color
By default, the output is colorless, and formatted like GCC messages. You can use `-c`
or `--color` option to get a colored output.
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
2020-08-02 19:29:52 +00:00
1. Install dependencies
2019-11-16 10:58:04 +00:00
2019-11-05 15:45:45 +00:00
```bash
2020-08-02 19:29:52 +00:00
poetry install
2019-11-05 15:45:45 +00:00
```
2019-11-16 10:58:04 +00:00
2020-08-02 19:29:52 +00:00
Note: this uses `poetry` that you can get here: https://poetry.eustace.io/docs/
2019-11-16 10:58:04 +00:00
2020-08-02 19:29:52 +00:00
2. Use virtual environment$
2019-11-16 10:58:04 +00:00
2019-11-05 15:45:45 +00:00
```bash
2020-08-02 19:29:52 +00:00
poetry shell
2019-11-05 15:45:45 +00:00
```
2019-11-16 10:58:04 +00:00
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
2020-12-04 07:17:34 +00:00
### v0.10.0 (2020-12-04)
* use `pygrammalecte` v1.12.0
2020-09-07 07:03:34 +00:00
### v0.9.0 (2020-09-07)
* use `pygrammalecte` default message for spelling errors
2020-08-25 15:46:35 +00:00
### v0.8.0 (2020-08-25)
2020-08-02 19:34:14 +00:00
* use [`pygrammalecte`](https://github.com/vpoulailleau/pygrammalecte)
2020-08-02 19:42:53 +00:00
* add continuous integration
2020-08-25 15:49:55 +00:00
* fix #12, #13, #14, #15, #17, #18, #20
2020-08-25 15:46:35 +00:00
* add `--color` CLI option to get a colored output (default is colorless)
2020-08-02 19:34:14 +00:00
2019-12-11 15:25:59 +00:00
### v0.7.0 (2019-12-11)
* add `--version` CLI option to display the current version of `padpo`
* `--input-path` CLI option now accepts several paths as in
`padpo --input-path file1.po file2.po directory1 directory2` or
`padpo -i file1.po file2.po directory1 directory2`
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