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
Desktop app: chosen language is lost on relaunch (falls back to system language) #982
In the desktop app (macOS, system language French), choosing English in the dashboard (language menu or Settings → Appearance) does not survive a relaunch: the app reopens in French.
Steps: Mac set to French → open Skillshare App → switch language to English → quit → relaunch → UI is French again.
Cause
The app shows the CLI web UI in an iframe at http://localhost:PORT. For WebKit this frame is cross-origin to the Tauri window, and its localStorage is not kept between launches. So skillshare:locale is gone at startup and getInitialLocale() (ui/src/i18n/locales.ts) falls back to navigator.language.
The theme already has a workaround for exactly this (?theme= / ?mode= / ?style= on the iframe URL plus theme-change / theme-push messages, see the "storage was lost" comment in skillshare-app/src/desktop/components/CliWebView.tsx). The locale has none.
Proposed fix (two small commits, ready to cherry-pick)
The repos only accept PRs from collaborators, so here are the branches on my forks:
skillshare – ui/src/i18n: getInitialLocale() reads a ?lang= URL parameter first (then saved choice, then browser languages); when embedded, setLocale() posts { type: 'locale-change', locale } to the parent window. +2 tests. AlexisSerneels/skillshare@main...fix/ui-locale-embedded
skillshare-app – CliWebView.tsx: listens for locale-change from the CLI iframe (source and value checked), saves it in the shell's own storage (skillshare-app:cli-locale), and adds ?lang= to the iframe URL. +3 tests (locale-sync.test.tsx). AlexisSerneels/skillshare-app@main...fix/keep-cli-locale
Both are backward compatible: an older CLI ignores ?lang=, and outside an iframe nothing is posted.
Checked locally: skillshare vitest run src/i18n, pnpm typecheck, oxlint, oxfmt --check; skillshare-app vitest run src/desktop/components, tsc -b, eslint. Not yet tried in the packaged macOS app.
Activity
fix: keep the CLI UI language across launches (#149)