Skip to content

feat(gui): add Russian translation - #166

Merged
xevrion merged 5 commits into
xevrion:mainfrom
D0n-A:feat/ru-translation
Nov 29, 2026
Merged

xevrion merged 5 commits into
xevrion:mainfrom
D0n-A:feat/ru-translation

Conversation

@D0n-A

@D0n-A D0n-A commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Adds a Russian (ru) translation for the desktop app (hatchzip-gui), registers it in locale.rs, updates the language list test in tests/language.rs, and adds Russian to crates/gui/translations/README.md.

Why

Makes the desktop app available in Russian, following the system language automatically or selectable under Settings > Language.

Verification

  • Checked the .po catalog syntax with msgfmt --check.

  • Verified all @tr message IDs, placeholders, leading/trailing whitespace, and 3-form Russian Plural-Forms rules against crates/gui/tests/catalog.rs.

  • Relying on GitHub Actions CI for cargo fmt, cargo clippy, and cargo test across Linux, macOS, and Windows.

  • cargo fmt --all --check and cargo clippy --all-targets -- -D warnings pass

  • cargo test passes

  • Any change to extraction, the journal or the truncation order was run against the crash tests

  • Any number in the README this changes was re-measured

Add full Russian (ru) gettext catalog for hatchzip-gui with 3-form Russian Plural-Forms rules.
Add "ru" to LANGUAGES and ("ru", "Русский") to NAMES, and cover ru-RU in locale unit tests.
Include "Русский" in the expected Settings > Language list and update the zh_CN selection index from 5 to 6.
Add the Russian (ru) entry to the table of bundled GUI translations.
@D0n-A
D0n-A requested a review from xevrion as a code owner November 28, 2026 11:37
@xevrion

xevrion commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Thank you @D0n-A, this is a really good translation: natural, consistent terms (извлечение, архив, элемент), and the three plural forms are right everywhere ("1 вложенный архив / 2 вложенных архива / 5 вложенных архивов"). The catalog test and the rest of CI pass on all three systems.

I pushed one small commit to your branch: the screenshot harness only rendered en/es/hi/zh_CN, so I added ru (and tr) to it. I checked the Russian screenshots on Windows at the minimum window size: the main window, the disk-space panel, the Settings pages and the progress window all fit, and "Русский" shows in the picker.

One message loses part of its meaning:

  • Archive restored. It contains {} not yet extracted. Extracted files remain in {}. is Архив восстановлен. Он содержит {}. Извлечённые файлы остаются в {}.. The "not yet extracted" part is missing, so it reads as if the archive contains everything. Something like Архив восстановлен. В нём {}, которые ещё не извлечены. Извлечённые файлы остаются в {}. (the first {} is a count such as "12 элементов").

Once that's in, I'll merge it. Thanks again!

@D0n-A

D0n-A commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the review and for adding ru to the screenshot harness, @xevrion!

About that message: "not yet extracted" is actually already included inside the the 1 entry / the {} entries entry right above it ({} неизвлечённый элемент / {} неизвлечённых элемента / {} неизвлечённых элементов), which is only used in restore-result. Putting the participle there keeps Russian grammatical agreement right across all three plural forms:

1: Архив восстановлен. Он содержит 1 неизвлечённый элемент. Извлечённые файлы остаются в out.
2: Архив восстановлен. Он содержит 2 неизвлечённых элемента. Извлечённые файлы остаются в out.
12: Архив восстановлен. Он содержит 12 неизвлечённых элементов. Извлечённые файлы остаются в out.

Whereas В нём {}, которые ещё не извлечены. would break agreement for n = 1 (and 21, 31, ...), since которые ... извлечены is plural.

If you'd prefer "not yet extracted" to stay inside the Archive restored... string itself so the two entries read independently in the .po file, I can update both entries to {} элемент / {} элемента / {} элементов + Архив восстановлен. В архиве ещё не извлечено: {}. Извлечённые файлы остаются в {}. instead. Please, let me know which you prefer.

@xevrion

xevrion commented Nov 29, 2026

Copy link
Copy Markdown
Owner

You're right, and that's the better way to do it: the {} entries is only used by that message, so carrying "неизвлечённый" there keeps the agreement right in all three forms. I read the sentence on its own and missed it. No change needed, this is ready to merge. Thank you, @D0n-A!

@xevrion
xevrion merged commit 5ff70c3 into xevrion:main Nov 29, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants