Add i18n support (starting with Polish) + language switcher
Summary
I'd like to contribute localization support to SONE. As a first step I'd add the i18n infrastructure plus a complete Polish translation, with English remaining the source of truth and the fallback for everything untranslated. Once the framework is in place, other languages can be added the same way.
Why
- SONE currently has no localization layer — all user-facing strings are hardcoded
in English across roughly 120 React components (≈2,200 string occurrences: JSX
text,
aria-label/title/placeholderattributes, toasts, error messages). - A language setting is a common expectation for desktop apps, and TIDAL itself is localized; this makes SONE accessible to non-English-speaking users.
Proposed approach
- Library:
react-i18next(mature, standard tooling) — or, if you prefer to keep dependencies minimal, a small custom hook over a typed dictionary. I'm happy to go with whichever you prefer; my default recommendation isreact-i18next. - Language model: English stays the fallback locale, so untranslated keys still render English — the app can be translated incrementally without ever showing empty strings.
- Detection & override: detect the system locale on first launch, store the choice
in settings (
localStorage, same pattern as existing UI prefs), expose a dropdown in Settings → General. - Pluralization: Polish needs proper plural rules (e.g. "2 utwory" vs "5 utworów").
i18nextJSON-v4 plurals handle this natively; with a custom solution I'd implement the equivalent. - Tests: existing vitest suites assert on English strings (~214 assertions), so the test environment would stay pinned to English — no test churn in the i18n PRs.
Rollout plan (small, reviewable PRs)
- PR 1 — infrastructure: i18n setup, typed dictionaries (
en+pl), language detection + Settings dropdown, plus translation of a few high-visibility screens (Login, Sidebar, PlayerBar) as a proof of concept. - PR 2+ — batches by area: Home/cards/context menus → album/playlist/artist/search → Settings tabs → modals/toasts/errors.
- Final pass: consistency of terminology, plural forms, string lengths in the UI.
Questions for you
- Do you have any preference between
react-i18nextand a zero-dependency solution? - Key naming conventions — flat keys, nested by screen, or your own scheme?
- Any UI constraints I should know (e.g. text length limits in the player bar)?
- Would you prefer a draft PR alongside this issue, or discussion first?
Note
This would be an AI-assisted contribution (drafted and translated with AI tooling) — per the README I'd make sure it's manually reviewed and tested before submitting each PR.
Happy to adjust anything — thanks for considering it!
Hi @olo81, this plan looks solid. If @lullabyX says yes, here's something that could take most of the manual work out of the extraction.
I'm building localize.dev, and I ran its check on main. It finds 892 strings to move in 66 files: JSX text, aria-label/title/placeholder, and toasts, with the biggest groups in components/settings (174) and Login.tsx (100). It moves them into en.json with readable keys, rewrites the components to use react-i18next's t(), and turns {count}-style text into interpolation. English stays the fallback, as you planned. It can do one folder at a time, so the first PR could be settings plus the switcher, with your Polish for that part.
If that's useful, run npx localize-dev run on a branch, or I can do it and hand you the branch. Either way the Polish wording stays yours.