You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f99caf7
Browse filesBrowse the repository at this point in the historyBrowse files
feat(i18n): add Polish (pl) as an app display language
Adds Polish to the app language picker (Settings -> Advanced -> Language),
following the same pattern used when Russian (#145) and Italian (#305) were
added.
- New src/renderer/src/i18n/locales/pl.json, hand-translated from en.json
with full structural parity (982 keys, 0 missing / 0 extra / 0 invalid).
- runtime.ts: pl added to SupportedAppLocale, APP_LANGUAGE_OPTIONS,
MESSAGE_CATALOG, normalizeAppLanguage and resolveAppLocale, so a system
locale of pl-PL resolves to Polish automatically.
- settings-store.ts: pl added to the AppLanguage union and to the main
process copy of normalizeAppLanguage, so the setting persists instead of
being coerced back to 'system' on load and on every patch.
- electron.d.ts: appLanguage union widened to match.
- settings.general.language.pl display name added to all 10 existing
locale files, in each target language.
- Refreshed the stale locale lists in docs/i18n-architecture.md and
CLAUDE.md, which were still missing ru and/or it.
No existing locale strings, keys or runtime behaviour are changed.
Claude-Session: https://claude.ai/code/session_01DM3kF3wjMpoDJSUWApqsJ5
Copy file name to clipboardExpand all lines: CLAUDE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -221,7 +221,7 @@ When implementing a new Raycast API:
221
221
222
222
### Internationalization (i18n)
223
223
224
-
Locales live in `src/renderer/src/i18n/locales/` — `en.json` is the source of truth, plus `zh-Hans`, `zh-Hant`, `ja`, `ko`, `fr`, `de`, `es`, `ru`.
224
+
Locales live in `src/renderer/src/i18n/locales/` — `en.json` is the source of truth, plus `zh-Hans`, `zh-Hant`, `ja`, `ko`, `fr`, `de`, `es`, `ru`, `it`, `pl`.
225
225
226
226
**Rule: whenever you add, rename, or remove a user-facing string, update every locale file in the same change.** Missing keys fall back to English (or a derived label from the last path segment), which looks broken for non-English users. Keys are only "done" when all locales have them.
227
227
@@ -233,7 +233,7 @@ Checklist when touching `en.json`:
233
233
4. Preserve interpolation variables verbatim (`{count}`, `{name}`, `{version}`, `{plural}`, etc.) — translations must keep the same placeholders.
234
234
5. Verify structural parity after edits — all locales must have the same set of keys as `en.json`. A quick node check:
235
235
```bash
236
-
node -e "const fs=require('fs');function k(o,p=''){const r=[];for(const x of Object.keys(o)){const v=o[x],q=p?p+'.'+x:x;v&&typeof v==='object'?r.push(...k(v,q)):r.push(q)}return r}const en=new Set(k(JSON.parse(fs.readFileSync('src/renderer/src/i18n/locales/en.json','utf8'))));for(const l of ['zh-Hans','zh-Hant','ja','ko','fr','de','es','ru']){const s=new Set(k(JSON.parse(fs.readFileSync('src/renderer/src/i18n/locales/'+l+'.json','utf8'))));console.log(l,'missing:',[...en].filter(x=>!s.has(x)).length,'extra:',[...s].filter(x=>!en.has(x)).length)}"
236
+
node -e "const fs=require('fs');function k(o,p=''){const r=[];for(const x of Object.keys(o)){const v=o[x],q=p?p+'.'+x:x;v&&typeof v==='object'?r.push(...k(v,q)):r.push(q)}return r}const en=new Set(k(JSON.parse(fs.readFileSync('src/renderer/src/i18n/locales/en.json','utf8'))));for(const l of ['zh-Hans','zh-Hant','ja','ko','fr','de','es','ru','it','pl']){const s=new Set(k(JSON.parse(fs.readFileSync('src/renderer/src/i18n/locales/'+l+'.json','utf8'))));console.log(l,'missing:',[...en].filter(x=>!s.has(x)).length,'extra:',[...s].filter(x=>!en.has(x)).length)}"
237
237
```
238
238
6. Never copy a locale file wholesale from another language as a starting point — past incidents have left one locale filled with another language's text (e.g. `ja.json` was Chinese). Always translate each value.
0 commit comments