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

Admin Page: better handle i18n for disconnection warnings #18392

Merged
merged 1 commit into from Jan 20, 2021

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Jan 18, 2021

Fixes #18391

Changes proposed in this Pull Request:

  • Let's ensure that we display the right string regardless of the language and the number of connected plugins.

Jetpack product discussion

  • N/A

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

  • No

Testing instructions:

  • Start from a site connected to WordPress.com and running this branch.
  • Add and activate a test plugin like this one:
<?php
/** Plugin Name: Jetpack Connection Test Plugin (1) */
add_action( 'plugins_loaded', function() {
        ( new Automattic\Jetpack\Config() )->ensure(
                'connection',
                array(
                      	'slug' => 'jetpack-connection-test-1',
                        'name' => 'Jetpack Connection Test Plugin (1)'
                )
        );
}, 1 );
  • Go to Jetpack > Dashboard, and click on the Manage connection link towards the end of the page.

  • You should see this:
    image

  • Now add and activate a second plugin:

<?php
/** Plugin Name: Jetpack Connection Test Plugin (2) */
add_action( 'plugins_loaded', function() {
        ( new Automattic\Jetpack\Config() )->ensure(
                'connection',
                array(
                      	'slug' => 'jetpack-connection-test-2',
                        'name' => 'Jetpack Connection Test Plugin (2)'
                )
        );
}, 1 );
  • You should now see this:
    image

Proposed changelog entry for your changes:

  • N/A

Fixes #18391

Let's ensure that we display the right string regardless of the language and the number of connected plugins.
@jeherve jeherve added [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Focus] i18n Internationalization / i18n, adaptation to different languages Admin Page React-powered dashboard under the Jetpack menu [Pri] Normal labels Jan 18, 2021
@jeherve jeherve added this to the 9.4 milestone Jan 18, 2021
@jeherve jeherve self-assigned this Jan 18, 2021
@jetpackbot
Copy link

Scheduled Jetpack release: February 2, 2021.
Scheduled code freeze: January 25, 2021

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.

Generated by 🚫 dangerJS against 1e74312

@kraftbj kraftbj 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 Review To request a review from Crew. Label will be renamed soon. labels Jan 19, 2021
@jeherve jeherve added [Status] Needs Review To request a review from Crew. Label will be renamed soon. 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 Jan 19, 2021
@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jan 20, 2021
@kraftbj kraftbj merged commit 6dccb08 into master Jan 20, 2021
@kraftbj kraftbj deleted the fix/i18n-connected-plugins branch January 20, 2021 20:11
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Jan 20, 2021
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 [Focus] i18n Internationalization / i18n, adaptation to different languages [Pri] Normal [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.

Admin Page: i18n error, strings in _n() must include a number
4 participants