[PR #10309] [MERGED] Add a language switcher using PrimaryLanguageOverride #27987

Open
opened 2026-01-31 09:25:34 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10309
Author: @lhecker
Created: 6/2/2021
Status: ✅ Merged
Merged: 6/11/2021
Merged by: @undefined

Base: main ← Head: dev/lhecker/language-setting


📝 Commits (7)

  • 249f152 Add a language switcher using PrimaryLanguageOverride
  • fbec8a7 Address reviewer comments
  • 22c48e8 Make the spell checker happy
  • d7ef775 Make the audit mode happy
  • 248be79 Address reviewer comments
  • 5991876 Address reviewer comments
  • 5d02173 Fix qps tag filtering

📊 Changes

20 files changed (+278 additions, -62 deletions)

View changed files

📝 .github/actions/spelling/allow/allow.txt (+3 -0)
📝 .vscode/settings.json (+1 -1)
📝 doc/cascadia/profiles.schema.json (+5 -0)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+15 -0)
📝 src/cascadia/TerminalApp/AppLogic.h (+1 -0)
📝 src/cascadia/TerminalApp/pch.h (+18 -27)
📝 src/cascadia/TerminalSettingsEditor/GlobalAppearance.cpp (+143 -1)
📝 src/cascadia/TerminalSettingsEditor/GlobalAppearance.h (+16 -1)
📝 src/cascadia/TerminalSettingsEditor/GlobalAppearance.idl (+5 -1)
📝 src/cascadia/TerminalSettingsEditor/GlobalAppearance.xaml (+14 -2)
📝 src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw (+12 -0)
📝 src/cascadia/TerminalSettingsEditor/pch.h (+2 -9)
📝 src/cascadia/TerminalSettingsModel/AppearanceConfig.h (+0 -1)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp (+5 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.h (+1 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl (+1 -0)
📝 src/inc/LibraryIncludes.h (+16 -15)
📝 src/inc/til.h (+1 -1)
📝 src/inc/til/string.h (+19 -0)
📝 src/renderer/dx/precomp.h (+0 -3)

📄 Description

Summary of the Pull Request

This PR adds a global "language" setting, which may be set to any supported BCP 47 tag.
Additionally a ComboBox is added to the settings UI under "Appearance", listing all languages with their localized names.

This PR introduces one new issue: If you change the language while the app is running, the UI will be in a torn state, as not all UI elements refresh automatically if the PrimaryLanguageOverride is changed.

PR Checklist

Validation Steps Performed

  • UI language changes when changing the "language" in settings.json before starting WT / while WT is running. ✔️
  • "language" field is removed from settings.json if "Use system default" is selected. ✔️
  • "language" field is added or updated in settings.json if any other language is selected. ✔️
  • Removes qps- languages if debugFeatures is false. ✔️
  • Correctly refreshes all UI elements with the new language. ❌

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10309 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 6/2/2021 **Status:** ✅ Merged **Merged:** 6/11/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/language-setting` --- ### 📝 Commits (7) - [`249f152`](https://github.com/microsoft/terminal/commit/249f1523cc423c114aa692cc019fe79ad22c21da) Add a language switcher using PrimaryLanguageOverride - [`fbec8a7`](https://github.com/microsoft/terminal/commit/fbec8a7b1d27c3a0d9ac13d68df32141666e418a) Address reviewer comments - [`22c48e8`](https://github.com/microsoft/terminal/commit/22c48e88e955ca84b66e09b1dd24bfe1c88e7dc0) Make the spell checker happy - [`d7ef775`](https://github.com/microsoft/terminal/commit/d7ef7757f9c651e73e16937892336c499041e269) Make the audit mode happy - [`248be79`](https://github.com/microsoft/terminal/commit/248be79b3b750b7b64ce2b2465e16bf897ab724e) Address reviewer comments - [`5991876`](https://github.com/microsoft/terminal/commit/5991876358930866aa7a848c496aeaa390eda40a) Address reviewer comments - [`5d02173`](https://github.com/microsoft/terminal/commit/5d0217389dca8adcd2c74af2923b7a2e265a14e4) Fix qps tag filtering ### 📊 Changes **20 files changed** (+278 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/allow/allow.txt` (+3 -0) 📝 `.vscode/settings.json` (+1 -1) 📝 `doc/cascadia/profiles.schema.json` (+5 -0) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+15 -0) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+1 -0) 📝 `src/cascadia/TerminalApp/pch.h` (+18 -27) 📝 `src/cascadia/TerminalSettingsEditor/GlobalAppearance.cpp` (+143 -1) 📝 `src/cascadia/TerminalSettingsEditor/GlobalAppearance.h` (+16 -1) 📝 `src/cascadia/TerminalSettingsEditor/GlobalAppearance.idl` (+5 -1) 📝 `src/cascadia/TerminalSettingsEditor/GlobalAppearance.xaml` (+14 -2) 📝 `src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw` (+12 -0) 📝 `src/cascadia/TerminalSettingsEditor/pch.h` (+2 -9) 📝 `src/cascadia/TerminalSettingsModel/AppearanceConfig.h` (+0 -1) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp` (+5 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl` (+1 -0) 📝 `src/inc/LibraryIncludes.h` (+16 -15) 📝 `src/inc/til.h` (+1 -1) 📝 `src/inc/til/string.h` (+19 -0) 📝 `src/renderer/dx/precomp.h` (+0 -3) </details> ### 📄 Description ## Summary of the Pull Request This PR adds a global "language" setting, which may be set to any supported BCP 47 tag. Additionally a ComboBox is added to the settings UI under "Appearance", listing all languages with their localized names. This PR introduces one new issue: If you change the language while the app is running, the UI will be in a torn state, as not all UI elements refresh automatically if the `PrimaryLanguageOverride` is changed. ## PR Checklist * [x] Closes #5497 * [x] I work here * [x] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [x] Schema updated ## Validation Steps Performed * UI language changes when changing the "language" in settings.json before starting WT / while WT is running. ✔️ * "language" field is removed from settings.json if "Use system default" is selected. ✔️ * "language" field is added or updated in settings.json if any other language is selected. ✔️ * Removes qps- languages if debugFeatures is false. ✔️ * Correctly refreshes all UI elements with the new language. ❌ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:25:34 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27987