WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#52271 closed defect (bug) (fixed)

translation is not consistant in help text

Reported by: psmits1567 Owned by: ocean90
Milestone: 5.7 Priority: normal
Severity: normal Version: 4.9
Component: Text Changes Keywords: good-first-bug has-patch commit
Focuses: administration Cc:

Description

The theme being previewed is fully interactive — navigate to different pages to see how the theme handles posts, archives, and other page templates. The settings may differ depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the Publish & Activate button above the menu.

Currently the button text when selecting a theme is "Activate & Publish" But in admin help text these words are present in the wrong order Publish & Activate.
It would be better to keep those the same e.g. Activate &amp Publish.

Attachments (1)

52271.diff (1.7 KB) - added by ovidiul 9 months ago.
text change diff

Download all attachments as: .zip

Change History (8)

#1 @tobifjellner
9 months ago

  • Keywords good-first-bug added

Location

https://build.trac.wordpress.org/browser/branches/5.6/wp-admin/themes.php?marks=173#L173
String:

'<p>' . __( 'The theme being previewed is fully interactive &mdash; navigate to different pages to see how the theme handles posts, archives, and other page templates. The settings may differ depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the Publish &amp; Activate button above the menu.' ) . '</p>' .

The label on the referred button is "Activate &amp; Publish" and it's used in https://build.trac.wordpress.org/browser/branches/5.6/wp-includes/script-loader.php?marks=1123#L1123 and https://build.trac.wordpress.org/browser/branches/5.6/wp-admin/customize.php?marks=189#L189

Best solution is probably to update the string in themes.php

#2 @audrasjb
9 months ago

  • Milestone changed from Awaiting Review to 5.7

This looks like a good change for 5.7.
To sump up, we want to replace Publish &amp; Activate with Activate &amp; Publish in the above string.

Milestoning this accordingly.

#3 @SergeyBiryukov
9 months ago

  • Keywords needs-patch added

#4 @ovidiul
9 months ago

  • Keywords has-patch added; needs-patch removed

I am attaching the patch here for review. Thanks

diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php
index 157a42e629..cb205e19df 100644
--- a/src/wp-admin/themes.php
+++ b/src/wp-admin/themes.php
@@ -170,7 +170,7 @@ if ( current_user_can( 'install_themes' ) ) {
 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
 	$help_customize =
 		'<p>' . __( 'Tap or hover on any theme then click the Live Preview button to see a live preview of that theme and change theme options in a separate, full-screen view. You can also find a Live Preview button at the bottom of the theme details screen. Any installed theme can be previewed and customized in this way.' ) . '</p>' .
-		'<p>' . __( 'The theme being previewed is fully interactive &mdash; navigate to different pages to see how the theme handles posts, archives, and other page templates. The settings may differ depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the Publish &amp; Activate button above the menu.' ) . '</p>' .
+		'<p>' . __( 'The theme being previewed is fully interactive &mdash; navigate to different pages to see how the theme handles posts, archives, and other page templates. The settings may differ depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the Activate &amp; Publish button above the menu.' ) . '</p>' .
 		'<p>' . __( 'When previewing on smaller monitors, you can use the collapse icon at the bottom of the left-hand pane. This will hide the pane, giving you more room to preview your site in the new theme. To bring the pane back, click on the collapse icon again.' ) . '</p>';
 
 	get_current_screen()->add_help_tab(

@ovidiul
9 months ago

text change diff

#5 @audrasjb
9 months ago

  • Keywords commit added

Patch looks good to me, thank you @ovidiul that's a nice "good-first-patch" 🙂
Marking this for commit.

#6 @ocean90
9 months ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 49969:

Customize: Update button label reference in themes help text to reflect the label introduced in [41626].

Props ovidiul.
See #39896, #42305.
Fixes #52271.

#7 @ocean90
9 months ago

  • Version changed from 5.6 to 4.9
Note: See TracTickets for help on using tickets.