From d3d8e06c681204d511ae0010fefed9b549ba02ed Mon Sep 17 00:00:00 2001 From: Noor Haddad Date: Fri, 9 Oct 2026 13:25:00 +0300 Subject: [PATCH] Add a page for translators --- index.md | 1 + translating.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 translating.md diff --git a/index.md b/index.md index 6c0cf2db68640021f2eaaaba5f0210f51c5f5e66..2169228881a6ecb6fbb5268b4723ad9fb1a09241 100644 --- a/index.md +++ b/index.md @@ -9,6 +9,7 @@ tool. It is an ordinary git repository, so improvements are just a push away. - [Getting started](getting-started.md) — install hello-hut and say hello - [Frequently asked questions](faq.md) - [Release process](release-process.md) — how a version is tagged and announced +- [Translating hello-hut](translating.md) — adding a language to `--lang` ## Elsewhere diff --git a/translating.md b/translating.md new file mode 100644 index 0000000000000000000000000000000000000000..9dbc9df151ce4d48c4da120b50bfd90e762fa7de --- /dev/null +++ b/translating.md @@ -0,0 +1,22 @@ +# Translating hello-hut + +Greetings live in `src/hello_hut/translations.py` (on the `next` branch until +0.3.0). Each entry maps a language code to a salutation: + +```python +TRANSLATIONS = { + "en": "Hello", + "fr": "Bonjour", +} +``` + +To add a language: + +- [ ] Add one line to `TRANSLATIONS`, keeping the table sorted +- [ ] Add a case to `tests/test_cli.py` +- [ ] Send the patch to the devel list + +Current languages: Arabic (مرحبا), German, English, Spanish, French, +Japanese (こんにちは), Portuguese, Swedish and Turkish. + +Back to the [index](index.md).