A CLI tool that scans through .po files and searches for mistranslated terms based on user-defined glossary mapping
Project description
poglossary
A CLI tool that scans through translation project (.po
files) searching for mistranslated terms based on the user-defined glossary mapping.
This project is special tailored for Python Documentation Translation Project (zh_TW) but can be applied for all translation projects that use Portable Object files (.po
).
Usage
# Sample config file (.yml)
glossary:
exception: 例外
function: 函式
instance: 實例
type: # can be a list of possible translated terms
- 型別
- 種類
> python poglossary --help
# Usage: python -m poglossary [OPTIONS] [PATH] [CONFIG_FILE]
# poglossary: check translated content in .po files based on given translation
# mapping
# Arguments:
# [PATH] the path of the directory storing .po files [default: .]
# [CONFIG_FILE] input mapping file [default: ./poglossary.yml]
# Options:
# --excludes PATH the directories that need to be omitted
# --install-completion Install completion for the current shell.
# --show-completion Show completion for the current shell, to copy it or
# customize the installation.
# --help Show this message and exit.
poetry run python3 poglossary <source_path> <config_file>
Sample Output
Todo
- Functionality
- More handy parameters/options
- CI/CD
- Unit tests
- Static checks (mypy, isort, etc)
- Upload to PyPI
- Config files
- Handle missing fields.
- Commands for creating a basic config file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
poglossary-0.1.2.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for poglossary-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b02b0e8cdcc17e3b2d879f59c2fe994eaf5e84396951c38e542edf0f451e8f8 |
|
MD5 | 4bd7a8871137bcdd2dc942e3eefd6406 |
|
BLAKE2b-256 | ad2a39d2e3def550b432aa7dc9b9d9568b5a29962fd55e27e002731edb53e0ef |