Skip to content

feat: add i18n support (Spanish/English) with language selector in profile - #47

Merged
foxkdev merged 4 commits into
mainfrom
copilot/traducir-vistas-espanol-ingls
Aug 28, 2026
Merged

feat: add i18n support (Spanish/English) with language selector in profile#47
foxkdev merged 4 commits into
mainfrom
copilot/traducir-vistas-espanol-ingls

Conversation

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown

Adds full internationalization support using svelte-i18n, with Spanish as the base locale and English as the secondary. Language preference is persisted in localStorage and applied on startup.

Changes

i18n infrastructure

  • New src/lib/i18n/index.ts: registers locales, exports setupI18n(), setLocale(), and locale store
  • Translation files at src/lib/i18n/locales/es.json and en.json covering navigation, sidebar, footer, and profile UI

Component translations

  • AppNavbar.svelte — project selector, user dropdown items
  • AppSidebar.svelte — all category names, module names, nav item labels, aria-labels
  • Footer.svelte — license text, footer links
  • Root +layout.svelte — calls setupI18n() on startup so the persisted locale loads immediately

Profile page

  • All labels, buttons, and status text replaced with $_() calls
  • New Language section with a <select> that switches and persists locale:
<select value={currentLocale} on:change={handleLocaleChange}>
  {#each SUPPORTED_LOCALES as lang}
    <option value={lang}>
      {lang === 'es' ? $_('profile.spanish') : $_('profile.english')}
    </option>
  {/each}
</select>

Related issue

Change type

  • Bug fix
  • Feature
  • Documentation
  • Refactor
  • Security or permissions
  • Tests or tooling

Verification

  • bun run check
  • bun run lint
  • bun run test
  • bun run format:check
  • UI tested manually, if applicable

Review notes

  • Locale is stored in localStorage under key gitops-locale. No server-side or session changes.
  • Spanish (es) is the default/fallback locale; switching to English changes all translated strings reactively via the locale store.
  • Only the shared layout components and profile page are translated in this PR. Individual route pages still use hardcoded strings — follow-up work can extend coverage using the same $_() pattern and translation keys.
  • package-lock.json added to .gitignore (project uses Bun; lock file was generated by npm in CI environment).

Copilot AI linked an issue Aug 27, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits August 27, 2026 20:03
Co-authored-by: foxkdev <22413328+foxkdev@users.noreply.github.com>
…ibility

Co-authored-by: foxkdev <22413328+foxkdev@users.noreply.github.com>
Copilot AI changed the title [WIP] Translate all views to Spanish and English feat: add i18n support (Spanish/English) with language selector in profile Aug 27, 2026
Copilot AI requested a review from foxkdev August 27, 2026 20:09
@foxkdev

foxkdev commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

@copilot Update all routes, all texts in project

@foxkdev
foxkdev marked this pull request as ready for review August 28, 2026 06:12
@foxkdev
foxkdev merged commit 592ea99 into main Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Traducir todas las vistas a español y ingles

2 participants