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

Blogging Prompt: localize wordpress.com link #37010

Closed
wants to merge 3 commits into from

Conversation

monsieur-z
Copy link
Contributor

@monsieur-z monsieur-z commented Apr 22, 2024

Fixes #36648

Proposed changes:

This PR localizes the link to wordpress.com in the Blogging Prompt block to be consistent with the site language.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

pf5801-Aw-p2

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

Prerequisites

  • Spin a test site with this branch
  • Connect Jetpack
  • Create a new post/page
  • Add a Blogging Prompt block

Regression testing

  • Open the preview
  • Check that the link in the block leads to wordpress.com and doesn't contain any lang parameter

Feature testing

  • From WPadmin, change the site language in /wp-admin/options-general.php
  • Go back to the post/page edition page
  • Remove the Blogging Prompt block and add a new one
  • Open the preview
  • Check that the link in the block leads to wordpress.com and does contain a lang parameter with the site language for value
Screenshot 2024-04-22 at 4 59 40 PM
  • Verify the page on wordpress.com isn't broken

@monsieur-z monsieur-z requested a review from a team April 22, 2024 21:06
@monsieur-z monsieur-z self-assigned this Apr 22, 2024
@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Apr 22, 2024
Copy link
Contributor

github-actions bot commented Apr 22, 2024

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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.
Then, add the "[Status] Needs Team Review" label and ask someone from your team review the code. Once reviewed, it can then be merged.
If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen daily.
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly. The next release is scheduled for June 4, 2024 (scheduled code freeze on May 27, 2024).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

Copy link
Contributor

github-actions bot commented Apr 22, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the update/localize-blogging-prompt-link branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack update/localize-blogging-prompt-link
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@jeherve jeherve added [Block] Blogging Prompt [Type] Bug When a feature is broken and / or not performing as intended [Focus] i18n Internationalization / i18n, adaptation to different languages labels Apr 23, 2024
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there are some Phan errors that will need to be addressed before we can merge.

@jeherve jeherve added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Team Review labels Apr 23, 2024
@monsieur-z monsieur-z force-pushed the update/localize-blogging-prompt-link branch 2 times, most recently from bdd325a to cc90b9d Compare April 24, 2024 14:14
@monsieur-z monsieur-z force-pushed the update/localize-blogging-prompt-link branch 6 times, most recently from 1123bc2 to 5bf26b3 Compare April 24, 2024 23:55
@monsieur-z monsieur-z force-pushed the update/localize-blogging-prompt-link branch from 5bf26b3 to 910fa9a Compare April 25, 2024 00:06
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth noting that @myhro took a different approach in #36730, one that may support more languages, with the caveat I mentioned in my comment there.

Maybe there is something we can do to fix the root problem here?

@monsieur-z monsieur-z added [Status] In Progress and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Apr 25, 2024
…ss-wpcom-rest-api-v3-endpoint-blogging-prompts.php

Co-authored-by: Jeremy Herve <[email protected]>
@monsieur-z
Copy link
Contributor Author

monsieur-z commented Apr 30, 2024

one that may support more languages

@jeherve, do you mean because it supports both these formats: pt_br, pt-br? I can easily update the code to handle this. While in practice, the endpoint may only be consumed by the Blogging Prompt block, adding the language parameter to the payload returned by the endpoint seems like a more encompassing fix.

@jeherve
Copy link
Member

jeherve commented May 2, 2024

do you mean because it supports both these formats: pt_br, pt-br?

Yes, it's more adapted to the quirks of WordPress.com. I wonder if we should take that opportunity to get a more robust and general solution that we can use everywhere, kinda like what we were discussing in #2707 (comment)

Copy link
Contributor

github-actions bot commented Aug 6, 2024

This PR has been marked as stale. This happened because:

  • It has been inactive for the past 3 months.
  • It hasn’t been labeled `[Pri] BLOCKER`, `[Pri] High`, etc.

If this PR is still useful, please do a [trunk merge or rebase](https://github.com/Automattic/jetpack/blob/trunk/docs/git-workflow.md#keeping-your-branch-up-to-date) and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation.

If the PR is not updated (or at least commented on) in another month, it will be automatically closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Blogging Prompt [Focus] i18n Internationalization / i18n, adaptation to different languages [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] Blocked / Hold [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Blogging Prompt - link to the answers page in the site language
2 participants