feat(interface): add lang selector in settings page#525
feat(interface): add lang selector in settings page#525FredGuiou wants to merge 1 commit intoNodeSecure:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #525 +/- ##
============================================
- Coverage 100.00% 58.64% -41.36%
============================================
Files 15 39 +24
Lines 649 3015 +2366
Branches 0 14 +14
============================================
+ Hits 649 1768 +1119
- Misses 0 1247 +1247 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new language selector to the settings page, wires it end-to-end through the server config and CLI, and updates tests and translations accordingly.
- Persist a
langfield in config get/set and in the HTTP server - Add a dropdown in the web UI and reload on language change
- Extend CLI
langcommand, update client code, tests, and translation keys
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| workspaces/server/src/config.js | Include lang in config retrieval and fallback |
| workspaces/server/test/httpServer.test.js | Adjust HTTP PUT /config test to expect lang |
| workspaces/server/test/config.test.js | Add lang assertions in config tests |
| views/index.html | Add <select> for language choice in settings UI |
| src/commands/lang.js | Persist new lang to cache in CLI lang command |
| public/main.js | Reload page and apply lang when settings change |
| public/components/views/settings/settings.js | Hook up langSelector and dispatch updated lang |
| i18n/french.js & i18n/english.js | Add translation keys for language panel |
Comments suppressed due to low confidence (3)
src/commands/lang.js:19
- The command’s cache update logic inside the
tryblock isn’t covered by existing tests. Add tests to ensure the CLIlangcommand persists the new language inappCache.
try {
public/components/views/settings/settings.js:234
- This assignment reverts the updated
langback to the old value. You should assignthis.config = newConfigso the new language persists in the component state.
this.config = { ...newConfig, lang: this.config.lang };
|
@fraxken Here is a proposal for lang application management in settings page. |
62989e6 to
93d0a6c
Compare
73afbc1 to
59716a6
Compare
59716a6 to
7aa8ba2
Compare
| <option value="dark">[[=z.token('settings.dark')]]</option> | ||
| <option value="light">[[=z.token('settings.light')]]</option> |
There was a problem hiding this comment.
| <option value="dark">[[=z.token('settings.dark')]]</option> | |
| <option value="light">[[=z.token('settings.light')]]</option> | |
| <option value="dark">[[=z.token('settings.general.dark')]]</option> | |
| <option value="light">[[=z.token('settings.general.light')]]</option> |
| <option value="french">[[=z.token('settings.languages.fr')]]</option> | ||
| <option value="english">[[=z.token('settings.languages.en')]]</option> |
There was a problem hiding this comment.
| <option value="french">[[=z.token('settings.languages.fr')]]</option> | |
| <option value="english">[[=z.token('settings.languages.en')]]</option> | |
| <option value="french">[[=z.token('settings.general.languages.fr')]]</option> | |
| <option value="english">[[=z.token('settings.general.languages.en')]]</option> |
| <option value="dark">[[=z.token('settings.dark')]]</option> | ||
| <option value="light">[[=z.token('settings.light')]]</option> | ||
| </select> | ||
| <label for="lang_selector" class="mt-10">[[=z.token('settings.general.langPannel')]]:</label> |
There was a problem hiding this comment.
| <label for="lang_selector" class="mt-10">[[=z.token('settings.general.langPannel')]]:</label> | |
| <label for="lang_selector" class="mt-10">[[=z.token('settings.general.langPanel')]]:</label> |
No description provided.