Skip to content

Dashboard: remove context from plural string - #15933

Merged
jeherve merged 1 commit into
masterfrom
update/dash-scan-threat-context
May 26, 2020
Merged

jeherve merged 1 commit into
masterfrom
update/dash-scan-threat-context

Conversation

@jeherve

@jeherve jeherve commented May 26, 2020

Copy link
Copy Markdown
Member

Changes proposed in this Pull Request:

This change was introduced in #15795, and while it works well on its own it introduces a small issue whenever we want to gather translations from the Dashboard to send them to translate.wordpress.org.

If it were PHP, the string would use WordPress' _nx function, as we're dealing with a string with a singular/plural variant, and some added context. Unfortunately, the tool we use to extract strings from React to PHP does not support _nx at the moment.

I would be tempted to fix our tool to support this, but since we'll be moving away from this approach to translate the React dashboard soon (we'll be relying on @wordpress/i18n package instead, and we'll let WordPress do the work of extracting translations), I think it's best if we just avoid relying on _nx for now; I don't think it's very necessary in this case.

Is this a new feature or does it add/remove features to an existing part of Jetpack?

  • N/A

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

  • N/A

Testing instructions:

  • It should not change any existing functionality. I would recommend checking the AAG dashboard on a site with threats and using Jetpack Scan.

Proposed changelog entry for your changes:

  • N/A

@jeherve jeherve added Bug When a feature is broken and / or not performing as intended [Status] Needs Review This PR is ready for review. [Focus] i18n Internationalization / i18n, adaptation to different languages Admin Page React-powered dashboard under the Jetpack menu [Feature] Backups labels May 26, 2020
@jeherve jeherve added this to the 8.6 milestone May 26, 2020
@jeherve
jeherve requested a review from ChaosExAnima May 26, 2020 14:40
@jeherve jeherve self-assigned this May 26, 2020
@ChaosExAnima
ChaosExAnima requested a review from enejb May 26, 2020 14:44
@jetpackbot

Copy link
Copy Markdown
Collaborator

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-15933

Scheduled Jetpack release: June 2, 2020.
Scheduled code freeze: May 26, 2020

Generated by 🚫 dangerJS against 481965f

@kraftbj kraftbj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the timeline to move to the WordPress i18n functions?

In either case, approving, but if we hit additional instances of being slowed down by it before we switch, it may be worth seeing if we can spend a day making it work.

@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels May 26, 2020
@jeherve

jeherve commented May 26, 2020

Copy link
Copy Markdown
Member Author

What's the timeline to move to the WordPress i18n functions?

I was hoping to work on this during the next release cycle. I've added the associated PR (#13527) to the 8.7 milestone.

@jeherve
jeherve merged commit 3fcd879 into master May 26, 2020
@jeherve
jeherve deleted the update/dash-scan-threat-context branch May 26, 2020 14:57
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels May 26, 2020
@jeherve

jeherve commented May 26, 2020

Copy link
Copy Markdown
Member Author

Already in branch-8.6 in 0d2b825

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Page React-powered dashboard under the Jetpack menu Bug When a feature is broken and / or not performing as intended [Feature] Backups [Focus] i18n Internationalization / i18n, adaptation to different languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants