Skip to content

Improve Vietnamese language pack with bundled fonts and i18n infrastructure#1564

Open
vigstudio wants to merge 13 commits into
spruceUI:Developmentfrom
vigstudio:feature/vietnamese-i18n
Open

Improve Vietnamese language pack with bundled fonts and i18n infrastructure#1564
vigstudio wants to merge 13 commits into
spruceUI:Developmentfrom
vigstudio:feature/vietnamese-i18n

Conversation

@vigstudio

Copy link
Copy Markdown

Summary

  • Expand Vietnamese (Vietnamese.json) translations and add native display name "Tiếng Việt"
  • Add per-language font support via fonts in language JSON (Be Vietnam Pro + Roboto for Vietnamese diacritics)
  • Fix language file read/write to use UTF-8 (fixes crashes on Windows when editing language packs)
  • Show native language names in the language picker; refresh text cache when switching languages
  • Bundle font files under App/PyUI/fonts/ with license texts in Licenses/fonts/

Test plan

  • Settings → Language → select "Tiếng Việt"; UI strings update
  • Vietnamese diacritics render correctly in menus, lists, and grid view
  • Switch back to English; fonts and labels revert correctly
  • Verify on TrimUI Smart Pro S (1280×720)

vigstudio and others added 3 commits July 1, 2026 09:12
Expand Vietnamese translations, add per-language font support (Be Vietnam Pro + Roboto), UTF-8 language file I/O, native display names in the language picker, and text cache refresh on language change.

Co-authored-by: Cursor <cursoragent@cursor.com>
Theme font settings were showing raw FontPurpose enum names. Look up labels from fontPurposeSizes in language JSON with readable English defaults.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add Language helpers for labels, enums, booleans, and controller inputs. Wire theme settings, WiFi/Bluetooth, activity tracker, main menu, and popup menus through language packs with Vietnamese and English translations.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Sundownersport

Copy link
Copy Markdown
Member

Thanks for the PR! Unfortunately we need it to be targeted against the Development branch instead of Main.

once you update it I’m happy to merge!

@vigstudio

Copy link
Copy Markdown
Author

Thanks for the PR! Unfortunately we need it to be targeted against the Development branch instead of Main.

once you update it I’m happy to merge!

Yes, thank you, I'll do it right away.

@vigstudio vigstudio changed the base branch from main to Development July 1, 2026 06:09
vigstudio and others added 5 commits July 1, 2026 13:21
Resolve theme_settings_system_select_menu conflict: keep vertical carousel
behavior from Development with Language.label i18n for dynamic labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Drop bundled Roboto files that were never referenced by Vietnamese.json, and translate delete ROM/boxart confirmation and success messages.
@vigstudio

Copy link
Copy Markdown
Author

Update for reviewers

Thanks for asking to retarget this PR to Development — branch is rebased/merged and pushed.

What this PR adds

Vietnamese language pack

  • Expanded Vietnamese.json with native display name Tiếng Việt
  • Translations for settings menus, theme labels (incl. vertical carousel from recent Development merge), activity tracker, game system names, and emulator menu option labels (menuOptionDisplays, governorOptions, gameSystems)

i18n infrastructure (PyUI)

  • UTF-8 read/write for language JSON (fixes editing packs on Windows)
  • Language.label() / helper methods used across ~30 menu files instead of hardcoded English strings
  • Language picker shows native names via displayName
  • Display.clear_text_cache() on language switch so fonts/labels reload

Bundled fonts (Vietnamese diacritics)

  • App/PyUI/fonts/BeVietnamPro-Regular.ttf + BeVietnamPro-SemiBold.ttf
  • Referenced from Vietnamese.jsonfonts block; loaded via Theme.get_font()Language.get_font_for_purpose()
  • English unchanged (no fonts block → theme fonts as before)
  • License: Licenses/fonts/bevietnampro.txt (SIL OFL)

Latest commit (f83c96e)

  • Removed unused Roboto .ttf files (~1 MB) — they were bundled but never referenced in Vietnamese.json
  • Localized ROM/boxart delete confirmation + success messages in game_config_menu.py

Merge status

  • Target: Development
  • Tested locally: no merge conflicts with current upstream/Development
  • GitHub shows mergeable: clean

Suggested device test (TrimUI Smart Pro S)

  1. Settings → Language → Tiếng Việt — UI strings + diacritics in menus/grid
  2. Switch back to English — theme fonts/labels revert
  3. Game config menu → delete ROM/boxart prompts in Vietnamese
  4. Spot-check theme system-select settings after vertical carousel merge

Happy to adjust anything before merge. Thanks again for reviewing!

vigstudio and others added 5 commits July 2, 2026 10:10
Route spruce-config category labels, option names, descriptions, and values through Language helpers, and localize power/WiFi/ROM/theme prompts still shown in English.
Finish remaining user-visible English in box art download flow, ROM count labels, activity duration text, and related WiFi helper messages.
Co-authored-by: Cursor <cursoragent@cursor.com>
Load Language right after config init so per-language fonts are available when Theme and Display first render, avoiding mixed startup state on non-English locales.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move Display and Language imports back into methods so theme loading does not crash before the main menu opens.
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.

2 participants