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 incorrect locale value in argv.json #171750

Merged
merged 3 commits into from
Jan 21, 2023
Merged

Conversation

rzhao271
Copy link
Contributor

@rzhao271 rzhao271 commented Jan 19, 2023

Ref #169114

With this change, if the locale value needs to be trimmed, the trimmed locale value gets saved to argv.json instead of the untrimmed one.

For example, let's say platform.locale is "fr-ca", and that we are going through the flow of recommending a language pack. In this case, we first try to search for an extension with the query "tag:lp-fr-ca", which returns no results, so we trim the locale to "fr" and try again. Searching "tag:lp-fr" returns a result, and so we install and download that language pack if the user presses the accept button. However, previous to this commit, the value "fr-ca" gets saved in argv.json rather than "fr".

@rzhao271 rzhao271 self-assigned this Jan 19, 2023
@rzhao271 rzhao271 enabled auto-merge (squash) January 19, 2023 19:43
@vscodenpa vscodenpa added this to the January 2023 milestone Jan 19, 2023
roblourens
roblourens previously approved these changes Jan 19, 2023
@rzhao271 rzhao271 disabled auto-merge January 19, 2023 19:48
TylerLeonhardt
TylerLeonhardt previously approved these changes Jan 19, 2023
@rzhao271 rzhao271 enabled auto-merge (squash) January 19, 2023 19:58
@rzhao271 rzhao271 disabled auto-merge January 19, 2023 19:59
@rzhao271
Copy link
Contributor Author

I just noticed that we need the value of the untrimmed locale still for languagePackSuggestionIgnoreList.

@rzhao271 rzhao271 dismissed stale reviews from TylerLeonhardt and roblourens via 9c73489 January 19, 2023 22:35
@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) January 21, 2023 00:22
@TylerLeonhardt TylerLeonhardt merged commit 71a7c90 into main Jan 21, 2023
@TylerLeonhardt TylerLeonhardt deleted the rzhao271/searchlocale branch January 21, 2023 00:35
sandy081 added a commit that referenced this pull request Jan 23, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants