Skip to content

Add initial ukrainian locale#373

Merged
freedit-dev merged 1 commit intofreedit-org:mainfrom
YGGverse:ukrainian-locale
Dec 21, 2025
Merged

Add initial ukrainian locale#373
freedit-dev merged 1 commit intofreedit-org:mainfrom
YGGverse:ukrainian-locale

Conversation

@oooo-ps
Copy link

@oooo-ps oooo-ps commented Dec 21, 2025

  • only strings based on i18n/en.toml file

Summary by CodeRabbit

  • New Features
    • Added Ukrainian language support. Users can now select Ukrainian as their preferred language in account settings, and site administrators can configure Ukrainian as the site language. Ukrainian translations are now available for all UI strings.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 21, 2025

Walkthrough

Adds Ukrainian language support to the application by introducing a new translation file (i18n/uk.toml) and integrating it into the i18n initialization system, user settings controller, and UI templates for admin and user configuration pages.

Changes

Cohort / File(s) Summary
Ukrainian translation data
i18n/uk.toml
New TOML file with Ukrainian key-value translation pairs for UI strings.
i18n initialization and user settings
src/controller/mod.rs, src/controller/user.rs
Updated i18n initialization to load Ukrainian translations; extended user language update handler to accept "uk" language code. Minor Debug formatting adjustment in mod.rs.
Admin and user setting templates
templates/admin.html, templates/user_setting.html
Added Ukrainian language option ("uk") to language selection dropdowns in both templates; minor whitespace cleanup in admin.html.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Review focus areas:
    • Verify i18n/uk.toml TOML syntax and completeness of translation coverage relative to other language files
    • Confirm all integration points (controller, templates) consistently reference "uk" language code
    • Check that language option additions in templates match the UI text/labels used in other locales

Possibly related PRs

  • i18n #301 — Extends existing i18n infrastructure by adding Ukrainian translations and wiring "uk" into controller and template localization paths.

Poem

🐰 A new tongue joins our tongue-tied crew,
Ukrainian words, fresh and true!
From "uk" to screens, translations spread,
Our rabbit heart grows warm and red! 🇺🇦

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Ukrainian locale support. It is concise, clear, and directly related to the primary objective of the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
templates/user_setting.html (1)

107-107: Language dropdown ordering differs from admin template.

The implementation is correct, but the language order here (en, zh_cn, ja, fr, uk) differs from admin.html (en, fr, uk, ja, zh_cn). Consider standardizing the order across both templates for consistency.

templates/admin.html (1)

246-246: Language dropdown ordering differs from user settings template.

The implementation is correct, but the language order here (en, fr, uk, ja, zh_cn) differs from user_setting.html (en, zh_cn, ja, fr, uk). Consider standardizing the order across both templates for consistency.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f860881 and c518881.

📒 Files selected for processing (5)
  • i18n/uk.toml (1 hunks)
  • src/controller/mod.rs (2 hunks)
  • src/controller/user.rs (1 hunks)
  • templates/admin.html (2 hunks)
  • templates/user_setting.html (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Cargo test, clippy and doc (windows-latest, x86_64-pc-windows-msvc)
  • GitHub Check: Cargo test, clippy and doc (ubuntu-latest, x86_64-unknown-linux-gnu)
  • GitHub Check: Cargo test, clippy and doc (macos-latest, x86_64-apple-darwin)
  • GitHub Check: Cargo test, clippy and doc (windows-latest, x86_64-pc-windows-gnu)
  • GitHub Check: Analyze (rust)
🔇 Additional comments (5)
src/controller/user.rs (1)

807-807: LGTM!

Ukrainian language support correctly added to the allowed language options, consistent with the existing pattern.

templates/admin.html (1)

1-1: LGTM!

Minor whitespace cleanup.

src/controller/mod.rs (2)

174-174: LGTM!

Minor cosmetic formatting adjustment in the Debug implementation with no functional impact.


586-592: LGTM!

Ukrainian translations are loaded correctly following the same pattern as other languages (en, zh_cn, ja, fr). The implementation properly parses the TOML file and inserts all key-value pairs into the i18n HashMap with the ("uk", key) tuple.

i18n/uk.toml (1)

1-140: Translation file is complete and matches en.toml exactly.

Verification confirms that all 140 translation keys from en.toml are present in uk.toml with no missing or extra entries. The Ukrainian translation file is fully complete.

@freedit-dev freedit-dev merged commit a4bb2df into freedit-org:main Dec 21, 2025
11 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants