Skip to content

feat(openlogi-gui): add Russian localization and language select#38

Merged
AprilNEA merged 1 commit into
masterfrom
support-ru-language
Jun 1, 2026
Merged

feat(openlogi-gui): add Russian localization and language select#38
AprilNEA merged 1 commit into
masterfrom
support-ru-language

Conversation

@AprilNEA
Copy link
Copy Markdown
Owner

@AprilNEA AprilNEA commented Jun 1, 2026

Summary

  • add Russian (ru) to the supported GUI locale list and locale resolver
  • add Russian translations for all existing OpenLogi GUI strings
  • replace the Settings language chip row with a gpui-component Select for a more compact, scalable language picker
  • cover ru/ru-RU locale matching and basic translation loading in i18n tests

Verification

  • cargo test -p openlogi-gui
  • cargo check -p openlogi-gui
  • cargo clippy -p openlogi-gui -- -D warnings
  • cargo fmt --check
  • git diff --check

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — adds ru as a first-class GUI locale: the language picker entry, BCP-47 matcher arm, full 110-entry translation column in app.yml, and unit tests covering ru / ru-RU resolution plus a basic translation spot-check.

  • SUPPORTED and match_supported extended("ru", "Русский") slotted between ja and zh-CN; match_supported gains a Some("ru") arm so both bare ru and region-tagged ru-RU collapse to "ru".
  • Translation catalog complete — every key with a ja entry gets a ru entry (confirmed 110 = 110 = 110 against zh-CN); strings are consistently double-quoted; %{name} / %{slot} interpolation placeholders preserved verbatim.
  • Doc comments updated — the module doc, SUPPORTED doc, and AppSettings::language doc all now list ru. The SUPPORTED doc correctly notes that under ru (like ja) the framework's gpui-component widget strings fall back to English since only en / zh-CN / zh-HK ship in upstream ui.yml.
  • Testsmaps_locale_variants gains ru / ru-RU cases; locale_file_resolves_keys adds a set_locale("ru") block asserting "Settings" and "Left Click". This matches the existing pattern (exhaustive coverage iteration stays zh-CN-only; ja and ru are spot-checks).

Pullfrog  | View workflow run | Using Claude Opus𝕏

@AprilNEA AprilNEA force-pushed the support-ru-language branch from ff3b2e5 to 734f07a Compare June 1, 2026 12:32
Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — the language picker is rewritten from a wrapping chip row to a gpui-component Select, and open_or_focus is generalized so view constructors receive a &mut Window (needed by SelectState::new).

  • SettingsView adopts Select — holds a SelectState<Vec<LanguageOption>> entity built in new, subscribes to SelectEvent::Confirm, and applies the chosen value via AppState::set_language followed by the same refresh_windows / rebuild / request_refresh triad the old chip handler used. The chip helpers and their accent-color styling are removed.
  • LanguageOption + SelectItem — a small option type wrapping (label, value, localize_label). The "Follow system" row sets localize_label: true so title() re-evaluates rust_i18n::t!("Follow system") on each render; the per-locale rows use their native names verbatim. selected_language_index maps the stored language code (or "" for unset) back to an IndexPath, defaulting to row 0.
  • open_or_focus signature changebuild_view: FnOnce(&mut Window, &mut Context<V>) -> V; the inner cx.new(build_view) is rewrapped as cx.new(|cx| build_view(window, cx)). The three other AuxWindow constructors (AboutView, AddDeviceView, UpdateConsentView) take the new _: &mut Window parameter without otherwise changing.

Pullfrog  | View workflow run | Using Claude Opus𝕏

@AprilNEA AprilNEA changed the title feat(openlogi-gui): add Russian localization feat(openlogi-gui): add Russian localization and language select Jun 1, 2026
@AprilNEA AprilNEA mentioned this pull request Jun 1, 2026
@AprilNEA AprilNEA merged commit f054d58 into master Jun 1, 2026
7 checks passed
This was referenced Jun 1, 2026
@aprilnea aprilnea Bot mentioned this pull request Jun 1, 2026
AprilNEA added a commit that referenced this pull request Jun 1, 2026
Resolve the `settings.rs` conflict: keep the new Permissions section and its
helpers (`permissions_group` / `permission_row` / `status_badge`) alongside
master's `Select`-based language picker (#38), and restore the gpui imports
(`InteractiveElement` / `StatefulInteractiveElement` / `rgb`) the permission
rows need. Bump the `openlogi-hidpp` workspace dep version 0.2.0 -> 0.3.1 to
match the released workspace version.
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.

1 participant