Skip to content

Add Russian (ru-ru) localization - #2429

Open
mikaond-jpg wants to merge 1 commit into
openclaw:mainfrom
mikaond-jpg:add-russian-localization
Open

mikaond-jpg wants to merge 1 commit into
openclaw:mainfrom
mikaond-jpg:add-russian-localization

Conversation

@mikaond-jpg

Copy link
Copy Markdown

Summary

Adds Russian (ru-ru) localization to OpenClaw Companion (the native Windows app).

  • New src/OpenClaw.Tray.WinUI/Strings/ru-ru/Resources.resw with all 4,585 keys.
  • 4,084 strings translated to Russian; 501 kept in English exactly where the other supported locales intentionally leave them untranslated (deferred/invariant keys), so the existing all-or-none localization rule still holds.
  • Added ru-ru to the OPENCLAW_LANGUAGE whitelist (App.xaml.cs) and to the supported-locale tests (locale list, Automations identical-locale allowlists, back-to-app key-hint allowlist).
  • Documented Russian in docs/LOCALIZATION.md and the session-context-menu note.

Validation

  • Key parity with en-us: 4,585 / 4,585, same order.
  • Format placeholders {0}–{3} preserved: 0 mismatches.
  • No empty values where English is non-empty; \n counts preserved.
  • XML parses cleanly; no over-escaped entities.
  • Only the intentional invariant keys (format-only strings, Esc, Webhook POST) plus the pre-existing deferred set stay identical to English; the corresponding allowlists were updated.

Notes

This is a first Russian translation, machine-assisted with structure/placeholder checks verified. A native-speaker review is recommended before merge. Brand and technical tokens (OpenClaw, Gateway, MCP, WSL, Ollama, etc.) were kept where appropriate.

- Add Strings/ru-ru/Resources.resw with all 4585 keys translated to Russian.
  Keys that are intentionally deferred/English across the other locales are
  kept in English to satisfy the all-or-none localization rule.
- Add ru-ru to the OPENCLAW_LANGUAGE whitelist and to the supported-locale
  tests (Automations identical-locale allowlists, key-hint allowlist).
- Document Russian in docs/LOCALIZATION.md and the session-context-menu note.
@clawsweeper

clawsweeper Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

🦞👀
Pull request received.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. clawsweeper:intake:feature Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Dec 1, 2026
@clawsweeper

clawsweeper Bot commented Dec 1, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

Adds Russian resources and registers Russian with the existing language override and locale validation.

Example: Companion selects Russian resources on a Russian Windows installation.

  • Before: The Save button displays “Save”.
  • After: The Save button displays “Сохранить”.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The established feature direction and resource coverage are promising, but the patch is not ready to merge.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦪 silver shellfish (2/6) 3 actionable review findings remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Russian-speaking users cannot use Companion’s native interface in Russian.
Reason: Russian was explicitly invited in #61, and the patch follows the current contribution guide without adding settings or architecture.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: Russian localization is absent from main, and this PR makes a distinct contribution through the documented localization path.

Reviewed head: 93a081374b27816f789139eacec5e645c04e60d2

Before merge

  • Add real behavior proof - The supplied validation covers resource structure, not Companion rendering. The contributor needs current-head screenshots, video, or copied UI diagnostics showing Russian labels and formatted text; native x:Uid coverage needs Russian Windows language selection. Redact credentials, IPs, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • [P2] Match onboarding emphasis tokens to the translated paragraph (P2) - On a Russian installation where native Gateway capability is unavailable, these values do not occur in Onboarding_Native_SupportUnavailable: the paragraph says “программе Windows Insider” and “Beta или Experimental”. NativeGatewayEmphasisRanges.TryGet requires exact ordinal substrings, so NativeGatewayEligibilityText discards all emphasis and renders plain text. Welcome_NativeUnavailableEmphasisTokensRemainLocalizedSubstrings also fails for the newly enumerated locale. Translate these annotation values together with their paragraph so both are exact, non-overlapping substrings.
  • [P2] Accommodate Russian inflection in the sandbox-copy assertion (P2) - Adding this resource directory makes SandboxComposer_UsesExistingLocalizedSurfaceNames exercise Russian automatically. Its second assertion requires the navigation label “Песочница” to occur case-insensitively inside “Настройки песочницы”, which is false because the noun changes case. This makes the existing localization test fail despite the understandable translation. Adapt the narrow oracle to the Russian grammatical form while preserving the surface-name check, or use natural wording that contains the exact label.

Findings

  • [P2] [P2] Match onboarding emphasis tokens to the translated paragraph — src/OpenClaw.Tray.WinUI/Strings/ru-ru/Resources.resw:7154-7155
  • [P2] [P2] Accommodate Russian inflection in the sandbox-copy assertion — src/OpenClaw.Tray.WinUI/Strings/ru-ru/Resources.resw:7857-7858
  • [P3] [P3] Replace prose em dashes with permitted punctuation — src/OpenClaw.Tray.WinUI/Strings/ru-ru/Resources.resw:339

Tests

  • Missing end-to-end proof: Current-head Russian rendering, including native x:Uid labels and formatted messages, has not been demonstrated.
Agent review details

How this fits together

Windows language selection and the development override select bundled resources, which supply text to native XAML bindings and LocalizationHelper callers.

flowchart TD
  A[Windows display language] --> C[Resource language selection]
  B[Development language override] --> C
  C --> D[Bundled locale resources]
  D --> E[Native XAML bindings]
  D --> F[LocalizationHelper]
  E --> G[Companion interface]
  F --> G
Loading

Technical review

Best possible solution:

Complete Russian support within the existing resource owner, repairing the emphasis values and grammatical test oracle while preserving key and placeholder parity.

Do we have a high-confidence way to reproduce the issue?

The resource values and existing assertions establish two deterministic contract failures by source inspection; no application or repository test suite was executed.

Is this the best way to solve the issue?

The existing resource-directory approach is the smallest complete implementation; its integration needs focused corrections rather than a new localization layer.

Full review comments:

  • [P2] [P2] Match onboarding emphasis tokens to the translated paragraph — src/OpenClaw.Tray.WinUI/Strings/ru-ru/Resources.resw:7154-7155
    On a Russian installation where native Gateway capability is unavailable, these values do not occur in Onboarding_Native_SupportUnavailable: the paragraph says “программе Windows Insider” and “Beta или Experimental”. NativeGatewayEmphasisRanges.TryGet requires exact ordinal substrings, so NativeGatewayEligibilityText discards all emphasis and renders plain text. Welcome_NativeUnavailableEmphasisTokensRemainLocalizedSubstrings also fails for the newly enumerated locale. Translate these annotation values together with their paragraph so both are exact, non-overlapping substrings.
    Confidence: 1
  • [P2] [P2] Accommodate Russian inflection in the sandbox-copy assertion — src/OpenClaw.Tray.WinUI/Strings/ru-ru/Resources.resw:7857-7858
    Adding this resource directory makes SandboxComposer_UsesExistingLocalizedSurfaceNames exercise Russian automatically. Its second assertion requires the navigation label “Песочница” to occur case-insensitively inside “Настройки песочницы”, which is false because the noun changes case. This makes the existing localization test fail despite the understandable translation. Adapt the narrow oracle to the Russian grammatical form while preserving the surface-name check, or use natural wording that contains the exact label.
    Confidence: 1
  • [P3] [P3] Replace prose em dashes with permitted punctuation — src/OpenClaw.Tray.WinUI/Strings/ru-ru/Resources.resw:339
    Root AGENTS.md explicitly prohibits em dashes in user-facing prose. This welcome description and eleven other new resource values introduce them. Replace those prose separators with permitted punctuation while retaining the standalone Usage_EmptyValue status placeholder.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4c53470cee20.

Provenance checked

Testing

Proof path: none.

Security

None.

Evidence

Acceptance criteria:

  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --filter "FullyQualifiedNameLocalizationValidationTests|FullyQualifiedNameNativeGatewaySetupUxContractTests"
  • ./build.ps1
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore
  • git diff --check

What I checked:

Likely related people:

  • Barbara Kudiess: Raw commit 48cb8a1 adds tests/OpenClaw.Tray.Tests/LocalizationValidationTests.cs:1149 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 48cb8a18fdb5; files: tests/OpenClaw.Tray.Tests/LocalizationValidationTests.cs)
  • Mike Harsh: Raw commit 1433349 adds src/OpenClaw.Tray.WinUI/App.xaml.cs:143 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 1433349d10a4; files: src/OpenClaw.Tray.WinUI/App.xaml.cs)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Change footprint Resources +10,506 lines; runtime +1/-1; tests +6/-6; docs +3/-2 The size comes from the translation catalog; integration reuses existing owners without new infrastructure.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed December 1, 2026, 7:11 AM ET / 12:11 UTC.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant