Skip to content
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

Fix locale and language-dependent code in the product #169114

Closed
3 tasks done
rzhao271 opened this issue Dec 14, 2022 · 2 comments
Closed
3 tasks done

Fix locale and language-dependent code in the product #169114

rzhao271 opened this issue Dec 14, 2022 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debt Code quality issues l10n-platform Localization platform issues (not wrong translations) on-testplan
Milestone

Comments

@rzhao271
Copy link
Contributor

rzhao271 commented Dec 14, 2022

The language pack recommender, especially on Windows, relies on the app.getPreferredSystemLanguages() API in order to properly recommend language packs.

The usage of that API has been temporarily reverted to fix the regression #166936. The revert should also incidentally fix #168583 and #167871.

This issue looks into using that API again and the processing needed on the output to ensure that the results do not break any areas outside of the language recommender.

TODO

  • Determine which users of platform.locale actually require the system locale, and which ones merely require the language variable.
  • Determine how the language variable is actually set. platform.locale is set either through app.getLocale() or app.getPreferredSystemLanguages()[0].
  • Modify the code as needed
@rzhao271 rzhao271 added the debt Code quality issues label Dec 14, 2022
@rzhao271 rzhao271 added this to the January 2023 milestone Dec 14, 2022
@rzhao271 rzhao271 self-assigned this Dec 14, 2022
@rzhao271
Copy link
Contributor Author

rzhao271 commented Dec 14, 2022

Ironically, many parts of the program want to use the application language instead of the system locale.
The language recommender system seems to be the only part of the application that requires the list of system languages, which is what the original Electron API change in main.js helped with.

@rzhao271 rzhao271 changed the title Use app.getPreferredSystemLanguages() again Fix locale and language-dependent code in the product Dec 15, 2022
@rzhao271 rzhao271 added bug Issue identified by VS Code Team member as probable bug and removed debt Code quality issues labels Dec 15, 2022
@rzhao271 rzhao271 added the debt Code quality issues label Dec 15, 2022
@TylerLeonhardt TylerLeonhardt added the l10n-platform Localization platform issues (not wrong translations) label Dec 15, 2022
@TylerLeonhardt
Copy link
Member

Determine how the language variable is actually set. platform.locale is set either through app.getLocale() or app.getPreferredSystemLanguages()[0].

language is set when you install a language pack or it's set to en by default.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debt Code quality issues l10n-platform Localization platform issues (not wrong translations) on-testplan
Projects
None yet
Development

No branches or pull requests

3 participants