Language Refactor #37

Manually merged
viewit merged 0 commits from gangoke/KX-Bridge-Release:translation-refactor into master 2026-05-30 18:29:11 +02:00
Contributor

Summary

This PR improves UI language support and removes hardcoded translation text.

What changed

  • Refactored UI translations from inline JavaScript objects to JSON language files.
  • Added translation directory: web/translations.
  • Added/updated language files:
    • de.json
    • en.json
    • es.json
    • zh-cn.json (Simplified Chinese)
  • Updated language switching from a toggle button to a dropdown selector.
  • Added a globe icon next to the language dropdown.
  • image.png
  • Added language auto-selection with priority:
    1. Saved user selection (localStorage)
    2. Browser locale (navigator.languages / navigator.language)
    3. Fallback (de)
  • Extended backend translation asset route to support regioned language codes (e.g., zh-cn).

Note: Espanol and Simplified Chinese are AI translated and not verified by a native speaker.
There were some changes in the German translation. Please correct anything as you see fit.

## Summary This PR improves UI language support and removes hardcoded translation text. ## What changed - Refactored UI translations from inline JavaScript objects to JSON language files. - Added translation directory: `web/translations`. - Added/updated language files: - `de.json` - `en.json` - `es.json` - `zh-cn.json` (Simplified Chinese) - Updated language switching from a toggle button to a dropdown selector. - Added a globe icon next to the language dropdown. - <img width="452" alt="image.png" src="attachments/69b785db-d8c8-4886-b903-33d7d0f85e59"> - Added language auto-selection with priority: 1. Saved user selection (`localStorage`) 2. Browser locale (`navigator.languages` / `navigator.language`) 3. Fallback (`de`) - Extended backend translation asset route to support regioned language codes (e.g., `zh-cn`). Note: Espanol and Simplified Chinese are AI translated and not verified by a native speaker. There were some changes in the German translation. Please correct anything as you see fit.
gangoke added 3 commits 2026-05-29 03:32:42 +02:00
gangoke changed title from Language Refactor to WIP: Language Refactor 2026-05-29 05:11:21 +02:00
gangoke added 1 commit 2026-05-29 05:41:45 +02:00
gangoke changed title from WIP: Language Refactor to Language Refactor 2026-05-29 05:45:06 +02:00
viewit added the
enhancement
label 2026-05-29 13:59:18 +02:00
Author
Contributor

One issue I'm noticing is mobile browser scaling with the larger header. I think it was always an issue but it's more noticeable now.

One issue I'm noticing is mobile browser scaling with the larger header. I think it was always an issue but it's more noticeable now.
viewit manually merged commit 6f269833d2 into master 2026-05-30 18:29:11 +02:00
Owner

Merged into master as 6f26983. Thanks @gangoke for the language refactor!

One tiny tweak on the German side: fd_used GENUTZTBELEGT (reads more natural for the AMS slot badge). All four languages now load through /kx/ui/translations/<lang>.json.

Merged into `master` as `6f26983`. Thanks @gangoke for the language refactor! One tiny tweak on the German side: `fd_used` `GENUTZT` → `BELEGT` (reads more natural for the AMS slot badge). All four languages now load through `/kx/ui/translations/<lang>.json`.
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: viewit/KX-Bridge-Release#37
No description provided.