Repository navigation
Conversation
Add a TranslationService (ITranslationService) to the Aurelia frontend with language resource files for English, Simplified Chinese, and Japanese. A language setting is persisted in app settings (Settings/UpdateSettingsCommand) and applied at startup in main.ts after the shell is configured. Migrate UI templates and dialogs to use a t value converter, and localize user-facing strings in services (script errors, dialogs, pane names, menus).
Applying settings called TranslationService.setLanguage which persisted the language by cloning the singleton Settings and updating it wholesale. Because the SettingsUpdatedEvent broadcast had not been applied to the singleton yet, the clone carried stale values and immediately overwrote the just-saved settings on the server (e.g. theme change reverted). Language now switches locally via the non-persisting applyLanguage; persistence and cross-window sync happen through the single settings update and its broadcast.
Removed redundant help note regarding partial translations.
Flex items shrink to min-content width when space is tight. For Latin text the min-content width is the longest word, but CJK text can break between any two characters, so translated labels like the theme and port labels collapsed to one character per line. Mark them as nowrap so they shrink as a whole.
This branch has not been deployed
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.
Add i18n support with en, zh-CN, and ja translations
This adds localization support to the Aurelia frontend:
Verified with tsc --noEmit and running the app in Electron dev mode.