-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Functional-Command Palette] - Case sensitive commands in Russian localization #9941
Comments
@Zza - thanks for reporting. It looks that we added locale aware case-sensitivity for commands sorting, but not for command filtering. Inside
In the code above |
Forgot to mention, that the trivial fix is to use the same approach we have for sorting (lstrcmpi) to compare chars. @zadjii-msft - please assign this to me (hope to fix it later on). |
OK.. it was kinda "one-liner", so I did it, though didn't test it in Russian. |
## PR Checklist * [x] Closes #9941 * [x] CLA signed. ## Detailed Description of the Pull Request / Additional comments The bug is due to us using std::tolower, while the default locale is not user's locale. The fix here is to use the same approach as upon sorting: lstrcmpi. While there are additional methods to do locale aware comparison, here we convert chars to string and call lstrcmpi. While this approach seems somewhat inefficient it ensures consistency (with the order of locales that lstrcmi tries to apply internally). (cherry picked from commit cb55cec)
## PR Checklist * [x] Closes #9941 * [x] CLA signed. ## Detailed Description of the Pull Request / Additional comments The bug is due to us using std::tolower, while the default locale is not user's locale. The fix here is to use the same approach as upon sorting: lstrcmpi. While there are additional methods to do locale aware comparison, here we convert chars to string and call lstrcmpi. While this approach seems somewhat inefficient it ensures consistency (with the order of locales that lstrcmi tries to apply internally). (cherry picked from commit cb55cec)
🎉This issue was addressed in #9943, which has now been successfully released as Handy links: |
🎉This issue was addressed in #9943, which has now been successfully released as Handy links: |
User Experience:
Users of Russian Windows localization can be confused, because commands are case sensitive. So, "Новая вкладка" ("New tab") command cannot be found with "новая" ("new") input string in lowercase, but can be found with "Новая" ("New"), which preserves the case.
Test Environment:
App: Windows Terminal 1.7.1033.0
Feature: Command Palette
OS: Microsoft Windows [Version 10.0.19042.928]
Repro Steps:
Expected:
Commands in Command Pallete to be case insensitive.
In fact, commands should be findable in English also, even is Russian localization of the OS.
So, both "new" or "новая" search strings should find "Новая вкладка" command (which is Russian translation for "New tab").
The text was updated successfully, but these errors were encountered: