Hunayn
A command-line companion and quality checker for GNOME translators.
Hunayn helps translation teams around the world work with Damned Lies from the terminal and catches translation mistakes before they reach a release.
Status: early development.
hunayn checkis released and ready to use; the Damned Lies commands do not exist yet.
Why "Hunayn"?
The project is named after Hunayn ibn Ishaq (809–873), the most celebrated translator of Baghdad's House of Wisdom. He was famous not only for the amount he translated, but for his care: before translating a text, he collected several manuscripts, compared them and corrected their errors. Careful checking before publishing is exactly what this tool is about.
Checking PO files
Hunayn needs Python 3.10 or newer and has no other dependencies:
pip install hunayn
Then:
hunayn check az.po # report problems, exit 1 on errors
hunayn check po/*.po --format json # for CI
hunayn check --ignore accelerator az.po
hunayn check --list-rules
Exit status: 0 no errors (warnings are allowed), 1 errors found (or
any finding with --strict), 2 Hunayn could not run (a file is
missing, an unknown rule was named).
Fuzzy messages are not checked unless you add --include-fuzzy. To
silence a rule for one message, add a translator comment:
# hunayn: ignore=accelerator
msgid "_Open"
msgstr "Aç"
The rules, how each one was measured, and what they report are described in docs/rules.md.
What it is for
1. Talk to Damned Lies for you (not yet available)
Instead of opening many browser tabs:
hunayn status az # how complete is my team?
hunayn reserve gnome-maps main po az
hunayn get gnome-maps main po az # download the latest PO file
hunayn submit az.po # check, then upload
Hunayn uses the official Damned Lies REST API with your personal API token, stored in your system keyring. It never asks for your password.
The final commit to a module's repository stays a human decision on Damned Lies. Hunayn only helps with the steps before it.
2. Check PO files for mistakes before they reach a release
Available now (see Checking PO files):
- broken or missing placeholders (
%s,%1$d,%(name)s,{name}) - broken or changed markup (
<b>…</b>, Mallard help tags and links) - missing, empty or unreadable plural forms
- lost keyboard accelerators (
_File)
Still to come: terminology that does not match your team's glossary.
Works interactively in the terminal and in GitLab/GitHub CI.
Built for every language
The core knows nothing about any single language. Each team describes its own conventions (quotation marks, accelerator style, punctuation, glossary) in a small data file, kept in a shared language repository where every team maintains its own folder.
Language data
Coming soon: a separate hunayn-languages repository with one folder per
language code (az/, fr/, pt_BR/ …). Hunayn downloads the latest data
when it runs and keeps a local copy for offline use. A team can also point
Hunayn at a glossary in its own repository.
Roadmap
| Phase | Goal | State |
|---|---|---|
| 0 | Preparation: API notes, test corpus, local Damned Lies instance | mostly done |
| 1 | Our own PO parser and writer (byte-identical round trip) | done |
| 2 | Sentinel: first checks (placeholders, tags, plurals) | done: first release on PyPI (0.1.1) |
| 3 | Damned Lies client: status, get, reserve, submit | |
| 4 | Language packs, glossary checks, CI templates → 1.0 |
Contributing
Contributions are welcome. See CONTRIBUTING.md. This project follows the GNOME Code of Conduct.
License
Hunayn is free software, licensed under the GNU General Public License v3.0 or later.
Metadata
Release files for hunayn 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hunayn-0.1.1.tar.gz | 53.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hunayn-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 110.5 kB
Release files / hunayn-0.1.1.tar.gz
| Download URL | hunayn-0.1.1.tar.gz |
|---|---|
| Size | 53.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45f55e2e954382e63d901cf1e4139563c52ad3d9c6172abcf0a9848bacf83e40
|
|
BLAKE2b-256 checksum How to use checksums |
d55b5d98b1a7290fc2381a3b1a4d6bcb5ee20d3e79fabcf9208e80abe6bc9f21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / hunayn-0.1.1-py3-none-any.whl
| Download URL | hunayn-0.1.1-py3-none-any.whl |
|---|---|
| Size | 57.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7c7081ab794e9a2dcb930268ad497f5176767cc48d5e3a80586adfc978a6291
|
|
BLAKE2b-256 checksum How to use checksums |
2058b0ab4c4aa255f5c1c0ec56441ecf253e0b19446395cc8131729cda99ee08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for hunayn 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.