-
Notifications
You must be signed in to change notification settings - Fork 798
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
MU WPCOM: Support localizeUrl #38318
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Mu Wpcom plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Wpcomsh plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
@@ -62,6 +66,7 @@ | |||
"@wordpress/url": "4.2.0", | |||
"@wordpress/icons": "10.2.0", | |||
"clsx": "2.1.1", | |||
"i18n-calypso": "7.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would there be a way around bringing the whole of i18n-calypso
to the mu-wpcom package? It was nice that we were able to stick to @wordpress/i18n
until now, it would be great if we could continue to do so.
I'm not familiar enough with i18n-calypso
to know if we could work around that dependency though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to get rid of the i18n-calypso
dependency from the @automattic/i18n-utils
package and use @wordpress/i18n
instead.
It seems to be done by just removing the usage of the getLocaleSlug
call from the @automattic/i18n-utils
package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've remove the i18n-calypso
dependency from the @automattic/i18n-utils
. See Automattic/wp-calypso#92631.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alshakero Could we request a review from you for Help-Center related changes on this PR? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and all works. But left some code comments.
@@ -49,6 +48,10 @@ module.exports = [ | |||
}, | |||
resolve: { | |||
...jetpackWebpackConfig.resolve, | |||
alias: { | |||
...jetpackWebpackConfig.resolve.alias, | |||
'@automattic/calypso-config': '@automattic/calypso-config/src/client.js', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why do we need that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default entry has server-side code (e.g.: path) and it causes the error during the build. As a result, we have to specify the client.js manually
...ackages/jetpack-mu-wpcom/src/features/wpcom-documentation-links/wpcom-documentation-links.ts
Outdated
Show resolved
Hide resolved
dce85c6
to
d99f8dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retested and it still works.
Fixes https://github.com/Automattic/dotcom-forge/issues/8244
Proposed changes:
localizeUrl
function available in the jetpack-mu-wpcom packageThe help center uses useSupportArticleAlternatePostKey to get the localised blog and post. However, it doesn't seem to work on atomic sites so the "Block Description" cannot open the help center with the correct document. The ETK plugin has the same issue as welli18n-calypso
dependencyThere is an issue related to the useLocale inside the help center. It would be fixed by i18n utils: Get rid of i18n-calypso dependency wp-calypso#92631 and then we can also get rid of thei18n-calypso
dependency to make it easier to introduce thelocalizeUrl
functionOther information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: