Add i18n support to System Install - #22
Open
Victor1890 wants to merge 15 commits into
Open
Conversation
- Remove app/lg/ folder with 21 HTML translation files - Add app/i18n/en_US.json with all translation keys - Add app/js/i18n.js module (IIFE, XHR loader, apply() for data-i18n)
- Add menu.js, apps.js, disk.js, agreement.js, progress.js - Add navbar.js, examine.js, focus-fix.js - Remove movement.js (dead code) - Trim engine.js to core navigation and init
- Add app/templates/ folder with 6 HTML templates - Each template loads engine.js, i18n.js, and step-specific modules - Remove redundant onload handlers (engine init handles step-specific code)
- Move i18n.load() into engine init callback - Ensure translations are loaded before step-specific code runs - Remove redundant i18n.load() calls from templates
- Add POST_INSTALL_TEST env var check in main.js - Open DevTools when test mode is enabled - Add test script to package.json
- Add value attributes to option elements - Improve language selection handling
Victor1890
marked this pull request as ready for review
July 29, 2026 21:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces 21 duplicated per-locale HTML pages with 6 shared templates + 1 JSON locale file. Splits monolithic
engine.jsinto per-step modules, fixes navigation bugs, and adds i18n support with a lazy-loaded translation system.Why
The system installer had no i18n architecture — each page was hardcoded English with no translation layer. Adding a new locale would require copying all 6 HTML pages and manually translating inline text. The monolithic
engine.js(566 lines) mixed navigation, validation, disk operations, and UI logic, making maintenance difficult.Bugs fixed:
open_installer()function (called but never defined)save_disk()returned a Promise instead of sync value (broke navigation)createNavbar()call in init (double-rendered navbar)undefinedkeys)What changed
app/lg/<locale>/en_US.jsonapp/i18n/*.json+i18n.js(XHR loader)onclickper buttonSTEPS[]+data-navorchestratorengine.jsgetLng,STEPS,go,select_language, init)index.html+agreement.htmlagreement.htmllang,altattributesFiles
Added (8)
app/i18n/en_US.json— English translation stringsapp/js/i18n.js— IIFE translation module (XHR loader,apply()fordata-i18n)app/js/menu.js— Menu checkbox logic, Alt key handler, install choice modalapp/js/apps.js— App launchers (GParted, Firefox, Packup, offline installer)app/js/disk.js— Disk listing, selection, erase modalapp/js/agreement.js— Agreement modal functionsapp/js/progress.js— Progress bar, install logging, close windowapp/js/navbar.js— Dynamic navbar, clock, IPC actionsModified (10)
app/js/engine.js— Trimmed to core navigation + initapp/js/examine.js— Simplified redirectapp/js/focus-fix.js— Cleaned up macOS focus fixapp/index.html— Trimmed to language selector only (39 lines)app/css/assistant-styles.css— Fixed language selector, added.visually-hiddenmain.js— AddedPOST_INSTALL_TESTenv var supportpackage.json— Addedtestscript for dev modeDeleted (21)
app/lg/en/*.html(7 files)app/lg/ro/*.html(7 files)app/lg/cs/*.html(7 files)app/js/movement.js— Dead codeAdded (6 templates)
app/templates/menu.html— Main menu (data-step="menu")app/templates/install.html— Install intro (data-step="install")app/templates/agreement.html— License terms (data-step="agreement")app/templates/disk.html— Disk selection (data-step="disk")app/templates/progress.html— Install progress (data-step="progress")app/templates/examining.html— 2s redirect (data-step="examining")Behavior preserved
language select → menu → install → agreement → disk → progress → commit() → IPC run-post-setup. Test mode (POST_INSTALL_TEST=1) unchanged. All i18n keys referencedata-i18nattributes with fallback to English text.How to test
cd system_install/frontend POST_INSTALL_TEST=1 npm run dev Walk: pick language → Continue → menu (verify back button returns to language) → Continue → agreement → Continue → disk → Continue → progress → close. Hold Alt on menu to see offline/dual boot option.