Add Russian (ru) translation#4236
Conversation
Introduce a full Russian gettext catalog based on en_US, document ru in the translations guide, and extend i18n coverage tests for the settings page. Co-authored-by: Cursor <cursoragent@cursor.com>
Manual spot-check: Russian UITested locally at
Automated checks also pass:
|
Fixes lint-translations CI check for the Russian locale PR. Co-authored-by: Cursor <cursoragent@cursor.com>
The previous Babel sync stripped msgids that CI still extracts, causing lint-translations to fail. Revert non-ru catalogs to upstream master and update ru from the full messages.pot template. Co-authored-by: Cursor <cursoragent@cursor.com>
|
thanks, checking again |
AmirF194
left a comment
There was a problem hiding this comment.
Structurally this looks clean and safe to merge. I want to be upfront that I can vouch for the structure, not the quality of the Russian itself, that needs a native speaker.
What I could verify: placeholder parity is intact. Across the 993 entries, the printf placeholders (%(name)s, %s, %d), brace placeholders ({count}, {name}), and HTML tags are all preserved with nothing dropped or altered, and CI backs this independently since lint-translations runs msgfmt --check-format and dennis-cmd lint --strict, both green. Registration is correct and not orphaned: get_available_languages() offers a language only when both a LANGUAGE_DATA entry and the .po exist, and the ru entry (Русский) is already on master, so dropping in the .po activates it with no hardcoded list to edit. The header is right (utf-8, Language: ru, nplurals=3), there are no fuzzy markers, and I loaded the committed .mo through gettext and it returns the expected Russian. The catalog-sync CI step also passed, which means the 993 msgids match the current .pot exactly.
No blocking concerns. One optional note: there are 26 genuinely empty msgstr entries (a naive grep reports more, but most of those are multiline continuations). They fall back to English at runtime, so nothing breaks, and the most visible ones are the lowercase relative-time units in flask_app.py (hour, minute, and so on) that show up in "X ago" timestamps. Filling those in would remove the English leakage but is not required. Minor doc nit: the README language table lists ru slightly out of alphabetical order (tr, ru, uk).
|
I am a native Russian speaker. I didn't check all strings, but what I saw looks correct. Should I fix issues from the note? |
|
Thanks, and your native-speaker read covers the exact part I couldn't check myself, so that's the main thing. None of the note is blocking, so please don't feel obligated. It's structurally sound and fine to merge as-is if @dgtlmoon would rather land it and polish later. If you do want to fill the gaps, the 26 empty
So I'd suggest group 1 for a quick high-impact pass and the rest whenever. Either way the PR looks good. |
|
time units absolutely need to be fixed before this can be merged |
|
Will do |
Translate relative-time units (year/minute/etc.), Levenshtein stats labels, and content-analysis strings. Sort ru before tr in the README table. Co-authored-by: Cursor <cursoragent@cursor.com>
Align multiline Levenshtein msgstr wrap with Babel width=120 formatting. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
ru) gettext catalog based onen_US(~993 strings)ruin the translations READMETest plan
python setup.py compile_catalogdennis-cmd lint --errorsonly changedetectionio/translations/ru/pytest changedetectionio/tests/test_i18n.py::test_time_unit_translations