Feat/frontend locale config#1727
Conversation
|
Unrelated test fix coming up next: resetDesktopApp state pollution in desktop E2E menu tests Problem: The 'opens a new model editor through File > New Model' test was failing intermittently with URL app://./index.html#/desktop/Saved%20As%20From%20Menu/edit instead of the expected app://./index.html#/desktop/New%20Threat%20Model/edit. The URL contained the title from a previous test (SAVED_AS_MODEL_TITLE), indicating cross-test state leakage. Root cause: resetDesktopApp() cleared sessionStorage before browser.refresh(). Between the clear and the refresh, window.location.hash = '#/' triggered Vue Router navigation, causing Vuex mutations to fire. The vuex-persist plugin then re-wrote the stale threat model state back to sessionStorage. When the page reloaded, Vuex re-hydrated from the re-persisted stale data. The Fix: Clear session/localStorage after the first page refresh, then do a second refresh so the app reinitializes from truly empty storage. (td.vue/tests/e2e/desktop/support/helpers.js) Not related to my feature work — this is a pre-existing test isolation bug in the desktop E2E test infrastructure. |
|
Thanks for the support @lreading I've never used this before, so I’ve to lean on you here as I'll have to read about it rather than just using. |
fix: serialize visual regression tests after e2e_tests to avoid port 8080 conflict fix: visual tests reuse running site from e2e_tests, only start td.server fix: visual tests need npm install (separate runner from e2e_tests)
…isDesktopApp) Migrate all source files from the 'is-electron' npm package to the internal @/service/environment module, which provides isDesktopApp(). This centralises the desktop detection logic and improves testability.
|
I've taken some liberties in applying other bits and pieces, sorry for the larger review requirement |
Summary:
Add configuration-driven locale resolution to support server-published locale policies, locale fallback chains, and restricted locale lists for multi-language deployments. Closes #1606
Description for the changelog:
Configuration-driven locale resolution: client reads locale policy from server configuration, resolves user locale against allowed locales with fallback chain, and surfaces configuration load errors in the UI
Declaration:
Thanks for submitting a pull request, please make sure:
[x] content meets the license for this project
[x] appropriate unit tests have been created and/or modified
[x] you have considered any changes required for the functional tests
[x] you have read the contribution guide and agree to the Code of Conduct
[] either no AI-generated content has been used in this pull request
[x ] or any use of AI in this pull request has been disclosed below:
AI Tools: DeepSeek
LLMs and versions: DeepSeek
Prompts: [Many]
Other info: