ADFA-4516 feat(dashboard): l10n parity with the app (6 locales) + de-…#114
Merged
Conversation
…hardcode client UI Brings the device dashboard's localization up to the app's level and removes hardcoded user-facing client strings. - i18n hardening (dashboard.js): supported langs en/es/fr/hi/pt/ru (was es/en only), fallback to en on missing locale/key, data-i18n-placeholder + data-i18n-title support, and a window.t(key, fallback) helper for dynamically-rendered strings. - De-hardcode: every user-facing static string in index/app_home/app_kiwix/app_books/ app_maps/sidebar/footer is keyed (data-i18n/-placeholder/-title); dynamic strings in the inline JS + dashboard.js go through window.t. Server-emitted '[System]' terminal logs in sockets/*.ts are intentionally left as English technical output (out of scope). - Locales: en.js/es.js rewritten and fr/hi/pt/ru.js added — 106 keys, identical set across all six (app strings reused where concepts matched). - Parity test (test/lang-parity.test.ts) asserts every locale has exactly en's key set; wired into 'npm test' (now 14 tests: 8 maps + 6 parity). typecheck stays green. Known minor: two kiwix modal bodies wrap a <code> path; applyTranslations sets innerText so the monospace styling flattens to plain text (the path text is preserved in every locale). Cosmetic-only; to be refined in the dashboard UX ticket.
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.
…hardcode client UI
Brings the device dashboard's localization up to the app's level and removes hardcoded user-facing client strings.
Known minor: two kiwix modal bodies wrap a
path; applyTranslations sets innerText so the monospace styling flattens to plain text (the path text is preserved in every locale). Cosmetic-only; to be refined in the dashboard UX ticket.