wp-calypso
wp-calypso copied to clipboard
HelpCenter: localize queries
This PR localizes the queries we use for searching help center articles. Based on the route where the customer is, we use the appropriate query to show relevant articles when the help center is opened.
For example in italian locale if we open the help center when we are on the plans page we see empty suggestions:
This is because we are searching through the italian support page with query
upgrade plan
.
In this case the search should be with translated query piano di aggiornamento
.
It should bring up result is if the customer searches this query in his locale:
Fixed https://github.com/Automattic/dotcom-forge/issues/8844
Proposed Changes
Why are these changes being made?
Testing Instructions
Pre-merge Checklist
- [ ] Has the general commit checklist been followed? (PCYsg-hS-p2)
- [ ] Have you written new tests for your changes?
- [ ] Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
- [ ] Have you checked for TypeScript, React or other console errors?
- [ ] Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
- [ ] Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
- [ ] For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?