[PR #8017] 6953: use native locale when comparing command names #27063

Closed
opened 2026-01-31 09:19:45 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/8017

State: closed
Merged: No


Summary of the Pull Request

Sort the names in the command palette based on the user level localization settings

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

Loading user local when palette is created (to perform caching and ensure consistent behavior). Using WINAPI's GetUserDefaultLocaleName explicitly to retrieve the user's default locale, as std::locale("") crashes.

Validation Steps Performed

  • Tried to set the system locale to Hebrew. Got the same result as when using English locale... so at least it doesn't regress 😄
  • Played with a debugger and some Russian chars, seem to do the job - but this is of course not a perfect testing
  • Someone speaking (and typing) a character-rich language could help 😄
**Original Pull Request:** https://github.com/microsoft/terminal/pull/8017 **State:** closed **Merged:** No --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Sort the names in the command palette based on the user level localization settings <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes https://github.com/microsoft/terminal/issues/6953 * [x] CLA signed. * [ ] Tests added/passed - no, probably needed * [ ] Documentation updated - irrelevant * [ ] Schema updated - irrelevant * [x] I've discussed this with core contributors already. <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments Loading user local when palette is created (to perform caching and ensure consistent behavior). Using WINAPI's GetUserDefaultLocaleName explicitly to retrieve the user's default locale, as std::locale("") crashes. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed * Tried to set the system locale to Hebrew. Got the same result as when using English locale... so at least it doesn't regress :smile: * Played with a debugger and some Russian chars, seem to do the job - but this is of course not a perfect testing * Someone speaking (and typing) a character-rich language could help 😄
claunia added the pull-request label 2026-01-31 09:19:45 +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#27063