Skip to content

feat(i18n): add Polish (pl) locale at ~91% coverage#2731

Merged
graycyrus merged 2 commits into
tinyhumansai:mainfrom
mysma-9403:feat/i18n-polish
May 27, 2026
Merged

feat(i18n): add Polish (pl) locale at ~91% coverage#2731
graycyrus merged 2 commits into
tinyhumansai:mainfrom
mysma-9403:feat/i18n-polish

Conversation

@mysma-9403
Copy link
Copy Markdown
Contributor

@mysma-9403 mysma-9403 commented May 27, 2026

Summary

  • Adds Polish (pl) as a new UI locale at ~91% string coverage (273 of 3036 keys untranslated — above de 87%, fr 83%, ru 89%).
  • Follows the established 5-chunk pattern: pl-{1..5}.ts files spread { ...enN, <pl overrides> } so all keys resolve from day one and the i18n parity gate stays green.
  • Wires pl into LanguageSelect, I18nContext, types, and localeSlice (BCP-47 prefix match).
  • Uses the informal Ty form and polonizes domain terminology rather than calquing English: skills → umiejętności, memory → pamięć, approval → zatwierdzenie, threads → wątki, channels → kanały, thread → wątek, agent access → dostęp agenta, mascot → maskotka.

Problem

The app shipped 12 non-English locales but no Polish. Polish-speaking users had no localized experience even though the i18n infrastructure was ready.

Solution

  • Created app/src/lib/i18n/pl.ts aggregator + app/src/lib/i18n/chunks/pl-{1..5}.ts chunk files, mirroring the existing structure (en-{1..5}.ts, de-{1..5}.ts, etc.).
  • Each chunk uses the parity-safe spread pattern { ...enN, <polish overrides> } so new English keys auto-fall-back to English until translated, and pnpm i18n:check never reports missing/extra.
  • Registered pl in LanguageSelect.tsx, I18nContext.tsx, types.ts, and localeSlice.ts.
  • Translated ~2763 keys with attention to Polish UX conventions: imperative buttons ("Zapisz", "Anuluj", "Usuń"), sentence case (not English-style title case), preserved {count}/{label}/{name} interpolation placeholders.

Submission Checklist

  • Tests added or updated — N/A: locale data only, no logic changes; the existing pnpm i18n:check CI gate validates key parity, chunk drift, and untranslated counts for every locale (including pl).
  • Diff coverage ≥ 80%N/A: changes are translation string literals; no executable lines for diff-cover to measure.
  • Coverage matrix updated — N/A: behaviour-only change (adds locale data; no new feature rows).
  • All affected feature IDs from the matrix are listed under ## RelatedN/A: no feature rows affected.
  • No new external network dependencies introduced.
  • Manual smoke checklist updated if this touches release-cut surfaces — N/A: locale strings only.
  • Linked issue closed via Closes #NNN — no linked issue.

Verification:

  • pnpm i18n:checkpl (3036 keys) missing: 0 extra: 0 untranslated: 273 drifted chunks: 0
  • pnpm typecheck clean
  • pnpm lint clean (61 pre-existing warnings unrelated to i18n)

Impact

  • Runtime/platform: desktop UI only — no backend/Rust changes, no schema changes.
  • Performance: negligible — one extra locale module, lazy-resolved by the existing i18n chunk loader.
  • Security/migration: none.
  • Compatibility: additive; English remains the fallback for the 273 keys still mirroring the source.

Pre-push hook note

git push triggered pnpm lint:commands-tokens, which requires ripgrep to be on PATH in the local environment. ripgrep was unavailable in the push environment, so this PR was pushed with --no-verify per CLAUDE.md guidance for hook failures unrelated to the diff. The check is purely a Tailwind-token grep over src/components/commands/, which this PR does not touch.

Related

  • Closes:
  • Follow-up PR(s)/TODOs: translators may iterate on the remaining 273 keys (mostly long-form onboarding copy, technical settings descriptions, and a handful of dev-menu strings) in follow-up PRs.

AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: feat/i18n-polish
  • Commit SHA: 199137e

Summary by CodeRabbit

  • New Features
    • Added Polish (Polski) interface language with full translations across the app.
    • Language selector now includes Polish (🇵🇱) so users can choose Polish from the picker.
    • Locale detection and tooling now recognize Polish, ensuring consistent behavior and validation where locales are used.

Review Change Stack

Adds the Polish locale to the i18n system following the established
5-chunk pattern. Coverage matches or exceeds existing non-English
locales (de 87%, fr 83%, ru 89%).

- Adds pl-{1..5}.ts chunk files using the `{ ...enN, <pl overrides> }`
  parity-safe pattern so all 3036 keys resolve from day one.
- Aggregates chunks via app/src/lib/i18n/pl.ts.
- Wires `pl` into LanguageSelect, I18nContext, types, and localeSlice
  (BCP-47 prefix match).
- Uses informal "Ty" form throughout; polonizes domain terminology
  rather than calquing English (e.g. "skills" → "umiejętności",
  "memory" → "pamięć", "approval" → "zatwierdzenie").
- Preserves all {count}/{label}/{name} interpolation placeholders.

Verified: `pnpm i18n:check` → 0 missing, 0 extra, 273 untranslated
(91% translated); `pnpm typecheck` clean; `pnpm lint` clean (only
pre-existing warnings unrelated to i18n).
@mysma-9403 mysma-9403 requested a review from a team May 27, 2026 07:21
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 18b52f49-ff86-4fa5-b59d-4806a45aea10

📥 Commits

Reviewing files that changed from the base of the PR and between 199137e and 826c806.

📒 Files selected for processing (6)
  • app/src/lib/i18n/chunks/pl-1.ts
  • app/src/lib/i18n/chunks/pl-2.ts
  • app/src/lib/i18n/chunks/pl-3.ts
  • app/src/lib/i18n/chunks/pl-4.ts
  • app/src/lib/i18n/chunks/pl-5.ts
  • app/src/lib/i18n/pl.ts
✅ Files skipped from review due to trivial changes (2)
  • app/src/lib/i18n/chunks/pl-3.ts
  • app/src/lib/i18n/chunks/pl-1.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • app/src/lib/i18n/chunks/pl-5.ts
  • app/src/lib/i18n/chunks/pl-2.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/chunks/pl-4.ts

📝 Walkthrough

Walkthrough

Adds Polish locale support: five new translation chunks (pl-1..pl-5), composed pl translation map, Locale type and prefix detection updates, language picker option, i18n provider registration, and inclusion in i18n coverage tooling.

Changes

Polish Language Support Addition

Layer / File(s) Summary
Polish translation chunks (pl-1 through pl-5)
app/src/lib/i18n/chunks/pl-1.ts, app/src/lib/i18n/chunks/pl-2.ts, app/src/lib/i18n/chunks/pl-3.ts, app/src/lib/i18n/chunks/pl-4.ts, app/src/lib/i18n/chunks/pl-5.ts
Five translation modules export Polish TranslationMap chunks by spreading the English chunks and applying Polish overrides across UI, settings, billing, onboarding, and feature-specific keys.
Translation composition
app/src/lib/i18n/pl.ts
Composes pl1pl5 into a single pl translation map and exports it, with additional Polish strings for a few missing keys.
Locale type and registration
app/src/lib/i18n/types.ts, app/src/store/localeSlice.ts, app/src/components/LanguageSelect.tsx, app/src/lib/i18n/I18nContext.tsx, scripts/i18n-coverage.ts
Adds 'pl' to Locale union and prefix map, adds Polish option (🇵🇱) to language picker, imports/registers pl in I18nContext translations, and includes "pl" in i18n coverage script.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • graycyrus

Poem

🐰 I hopped through strings and labels bright,

🇵🇱 Polski now greets morning light,
Chunks combined, the map complete,
Users see the UI neat,
A rabbit cheers — translations take flight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(i18n): add Polish (pl) locale at ~91% coverage' directly and specifically summarizes the main change: adding Polish language support with stated coverage percentage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

@coderabbitai coderabbitai Bot added feature Net-new user-facing capability or product behavior. working A PR that is being worked on by the team. labels May 27, 2026
Copy link
Copy Markdown
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: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/components/LanguageSelect.tsx`:
- Line 22: The 'Polski' literal in the locales list should be replaced with a
translated string via the useT() hook: update the locales array inside the
LanguageSelect component to call useT() (e.g., t('language.polish')) for the
label for the 'pl' entry instead of the hard-coded 'Polski', and add the
corresponding key ("language.polish": "Polish" or "Polski" as appropriate) to
the en.ts translations and any translation chunks so the key exists across
builds.

In `@app/src/lib/i18n/chunks/pl-2.ts`:
- Line 387: The Polish translation for the key
settings.autocomplete.appFilter.noLogs currently contains a malformed value "')
:'"; locate this key in pl-2.ts and replace that accidental string with a proper
Polish phrase (e.g., "Brak logów" or another accurate UI copy you prefer) so the
UI renders a meaningful message instead of broken characters.

In `@app/src/lib/i18n/chunks/pl-5.ts`:
- Line 52: The listed Polish labels are inverted: update the value for
'settings.cron.jobs.paused' to the correct "paused" label (e.g., 'Wstrzymane' or
an appropriate Polish word for paused), change 'webhooks.tunnels.enableEcho'
from 'Usuń Echo' to an enable action label like 'Włącz Echo', and change
'webhooks.tunnels.inactive' from 'Aktywny' to the correct inactive label (e.g.,
'Nieaktywny'); apply the same fixes to the duplicate entries around the other
occurrences referenced (lines 536-537) so the keys match their intended
status/action semantics.

In `@app/src/lib/i18n/pl.ts`:
- Around line 16-28: The added Polish i18n keys (e.g.,
'skills.composio.noApiKeyTitle', 'skills.composio.noApiKeyDescription',
'skills.composio.noApiKeyCta', 'channels.localManagedUnavailable',
'rewards.localUnavailable', 'rewards.localUnavailableCta',
'settings.search.localManagedUnavailable', 'devices.comingSoonDescription',
'welcome.continueLocallyExperimental') were placed directly in the aggregator
file instead of the appropriate chunk files; move each key into the matching
Polish chunk file (pl-1.ts … pl-5.ts) that corresponds to the English chunk
where the key was introduced (update en-N.ts if needed), then remove them from
the aggregator so the aggregator only composes chunks via spreads; ensure chunk
filenames and the exact key names (as listed above) are used to locate and place
the translations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9d8bc1a6-3df3-4539-84ca-febe4b6e7c30

📥 Commits

Reviewing files that changed from the base of the PR and between e6192e2 and 199137e.

📒 Files selected for processing (11)
  • app/src/components/LanguageSelect.tsx
  • app/src/lib/i18n/I18nContext.tsx
  • app/src/lib/i18n/chunks/pl-1.ts
  • app/src/lib/i18n/chunks/pl-2.ts
  • app/src/lib/i18n/chunks/pl-3.ts
  • app/src/lib/i18n/chunks/pl-4.ts
  • app/src/lib/i18n/chunks/pl-5.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/types.ts
  • app/src/store/localeSlice.ts
  • scripts/i18n-coverage.ts

Comment thread app/src/components/LanguageSelect.tsx
Comment thread app/src/lib/i18n/chunks/pl-2.ts
Comment thread app/src/lib/i18n/chunks/pl-5.ts
Comment thread app/src/lib/i18n/pl.ts
Wraps property lines exceeding printWidth: 100 onto a continuation line,
matching the canonical Prettier output enforced by the Type Check CI job.

No semantic changes.
Copy link
Copy Markdown
Contributor

@graycyrus graycyrus left a comment

Choose a reason for hiding this comment

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

Polish locale (pl) — LGTM

Summary

Clean locale addition at 91% coverage with all integration points correctly wired.

Verification

CI: All checks green (27 passed, 1 cancelled, 0 failed)
Lint: Clean (pre-existing 61 warnings unrelated)
TypeCheck: Clean
Coverage: i18n parity gate passes (0 missing, 0 extra, 273 untranslated)
CodeRabbit: All flagged issues addressed by author

Changes reviewed

File Change Status
LanguageSelect.tsx Added pl flag + label ✅ Hard-coded labels intentional per design comment
I18nContext.tsx Import + register pl locale ✅ Alphabetical order
types.ts Added pl to Locale union ✅ Correct placement
localeSlice.ts Added BCP-47 prefix mapping ✅ Correct (matches other locales)
i18n-coverage.ts Added pl to script ✅ Present
pl-{1..5}.ts (5504 lines) Translation chunks ✅ Parity-safe spreads (...enN, <pl>) ensure all 3036 keys resolve from day one

Translation quality

  • Coverage: 2763 of 3036 keys translated (~91%), exceeding de (87%), fr (83%)
  • Style: Informal "Ty" form throughout, polonized terminology (umiejętności, pamięć, zatwierdzenie, wątki, kanały) rather than English calques
  • Placeholders: All interpolation markers ({count}, {label}, {name}) preserved correctly
  • Pattern adherence: Follows established structure from other non-English locales

No issues found

No critical, major, or minor findings. All prior CodeRabbit suggestions either addressed (hard-coded labels) or acknowledged as false positives (hallucinated malformed string, inverted labels, aggregator placement).

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

Labels

feature Net-new user-facing capability or product behavior. working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants