Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#47515 closed defect (bug) (fixed)

i18n: Add missing translators comments

Reported by: mukesh27's profile mukesh27 Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch commit
Focuses: administration Cc:

Description

There are some strings in wp-admin/includes/class-wp-themes-list-table.php those have lack translators comment that i have marked and added required comment for that.

If you have any suggestion then then it will be accepted.

Attachments (3)

47515.diff (2.2 KB) - added by mukesh27 6 years ago.
Patch.
47515.2.diff (2.1 KB) - added by garrett-eclipse 5 years ago.
Minor verbiage changes to the translator comments
47515.3.diff (756 bytes) - added by garrett-eclipse 5 years ago.
The missing comments were addressed elsewhere, this patch corrects the single comment which only mentioned one placeholder when there's two.

Download all attachments as: .zip

Change History (8)

@mukesh27
6 years ago

Patch.

#1 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 5.3

Related: #44360

@garrett-eclipse
5 years ago

Minor verbiage changes to the translator comments

#2 @garrett-eclipse
5 years ago

Thanks @mukesh27 for flagging these.

I made a few minor verbiage tweaks in 47515.2.diff to the comments as follows;

  • Updated 'link to edit site' to 'URL to Site Themes admin screen' for better context as it's not a link and is specifically to the site's Themes screen.
  • Updated 'link to documentation on child themes' to 'URL to documentation on Child Themes' as it's a URL not a link
  • Updated 'link to edit parent theme' to 'parent theme name' as it's just the name and not a link.

All the best

@garrett-eclipse
5 years ago

The missing comments were addressed elsewhere, this patch corrects the single comment which only mentioned one placeholder when there's two.

#3 @garrett-eclipse
5 years ago

  • Keywords commit added

Attempting to apply this I found most of the changes proposed in 47515.2.diff were addressed by @SergeyBiryukov (and others) in commit Changeset#45926.

With that said, there's still one incorrect translator comment in that it has a single %s placeholder reference but the string holds two numbered placeholders. I'm referring to this code;

printf(
	/* translators: %s: Link to documentation on child themes. */
	' <p class="howto">' . __( 'This <a href="%1$s">child theme</a> requires its parent theme, %2$s.' ) . '</p>',
	__( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ),
	$theme->parent()->display( 'Name' )
);

Permalink - https://github.com/WordPress/wordpress-develop/blob/master/src/wp-admin/includes/class-wp-themes-list-table.php#L283-L288

With that in mind 47515.3.diff fixes this remaining comment.

Marking for commit, can you review @SergeyBiryukov

For easy reference the updated translator comment;
/* translators: 1: Link to documentation on child themes 2: Name of parent theme. */

#4 @ocean90
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 46387:

I18N: Fix translator comment for a themes list table string with numbered placeholders.

Props garrett-eclipse.
Fixes #47515.

#5 @SergeyBiryukov
5 years ago

In 46390:

I18N: Add missing comma in a translator comment.

See #47515.

Note: See TracTickets for help on using tickets.