Make WordPress Core

Opened 7 months ago

Closed 2 months ago

Last modified 2 months ago

#64899 closed task (blessed) (fixed)

I18N string improvements for 7.1

Reported by: desrosj Owned by:
Priority: normal Milestone: 7.1
Component: I18N Version:
Severity: normal Keywords: has-patch dev-reviewed
Cc: Focuses:

Description

This ticket is for any string improvements that do not directly relate to specific tickets.

Previously:

Change History (25)

This ticket was mentioned in ​PR #11946 on ​WordPress/wordpress-develop by ​@khokansardar.


5 months ago
#1

  • Keywords has-patch added

This PR adds missing translator comments for translatable strings that include a trailing space after the colon, as part of the WordPress 7.1 I18N string improvements.

### Changes

  • Added translator comment for the_tags() default prefix (Tags: ) in category-template.php.
  • Added translator comments for trackback/pingback moderation email labels (Trackback excerpt: and Pingback excerpt: ) in wp_notify_moderator() within pluggable.php.

These follow the established pattern used in WP_PHPMailer (/* translators: There is a space after the colon. */) so translation tooling (WP-CLI i18n make-pot, Poedit) correctly preserves the trailing space for translators.

​@SergeyBiryukov commented on ​PR #11946:


5 months ago
#2

Thanks for the PR! In these instances, I think we can just move the space out of the translatable string.

​@khokansardar commented on ​PR #11946:


5 months ago
#3

Thanks for the PR! In these instances, I think we can just move the space out of the translatable string.

Thanks for the review, @SergeyBiryukov ! Updated the PR to move the trailing spaces out of the translatable strings in the_tags() and wp_notify_moderator() instead of adding translator comments.

This ticket was mentioned in ​Slack in #core by adrianduffell. ​View the logs.


3 months ago

​@audrasjb commented on ​PR #11946:


3 months ago
#5

This implementation works, but I would personally rather do this with a placeholder:
sprintf( __( 'The string: %s' ), $the_variable )

#6 @adrianduffell
3 months ago

It looks like this work is close. Can we get it over the line before RC 1 next week?

This ticket was mentioned in ​Slack in #core by adrianduffell. ​View the logs.


2 months ago

​@rcorrales commented on ​PR #11946:


2 months ago
#8

On the placeholder suggestion, for the two wp_notify_moderator() strings it does look like the better fit. The default case of the same switch, and all three cases in wp_notify_postauthor(), already use sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ), so sprintf( __( 'Trackback excerpt: %s' ), "\r\n" . $comment_content ) would match what's already there.

For the_tags() I'm not sure it applies, since $before is just a default passed to get_the_tag_list(), so there's no variable to interpolate. Moving the space out seems consistent with r44797 and with the guideline against trailing whitespace in translatable strings.

On translations, Tags: already exists as a translated admin string, and the excerpt strings change msgid under any of the approaches proposed here, so landing before the 7.1 string freeze seems like the right timing either way.

#9 @SergeyBiryukov
2 months ago

In 63030:

I18N: Move trailing spaces out of translatable strings.

Follow-up to [6873], [10888], [31059].

Props khokansardar, jorbin, audrasjb, rcorrales, SergeyBiryukov.
See #64899.

#10 follow-up: @obenland
2 months ago

@SergeyBiryukov Do the $notify_message placeholders need translator comments?

This ticket was mentioned in ​Slack in #core by desrosj. ​View the logs.


2 months ago

​@masteradhoc commented on ​PR #11946:


2 months ago
#12

@itzmekhokan could you check the open Copilot Feedback and the ones from @rbcorrales / @audrasjb ?
Will be reconsidered for 7.2 as we're too close to the 7.1 RC deadline / string freeze

#13 @masteradhoc
2 months ago

  • Milestone 7.1 → 7.2

We'll have to punt this ticket to 7.2 as the RC1 for 7.1 is happening now.

#14 @sabernhardt
2 months ago

  • Milestone 7.2 → 7.1

Either this needs a follow-up commit for the translator comments or it can be closed as fixed.

#15 @joedolson
2 months ago

  • Resolution → fixed
  • Status new → closed

String changes are closed for 7.1, so closing this ticket and creating the follow up.

#16 in reply to: ↑ 10 @SergeyBiryukov
2 months ago

  • Resolution fixed
  • Status closed → reopened

Replying to obenland:

Do the $notify_message placeholders need translator comments?

Ah yes, thanks!

Reopening, as adding translator comments does not affect the string freeze.

​@SergeyBiryukov commented on ​PR #11946:


2 months ago
#18

Thanks for the PR! Merged in r63030.

#19 @wildworks
2 months ago

In 63204:

I18N: Add translator comments in wp_notify_moderator().

The trackback and pingback excerpt lines in the comment moderation notification email now document their placeholder for translators.

Follow-up to [63030].

Props obenland, SergeyBiryukov, wildworks.
See #64899.

#20 @wildworks
2 months ago

  • Keywords dev-feedback added

Reopening #64899 to request backporting [63204] to 7.1 branch.

We should be able to close this ticket once the backport is complete.

#21 @joedolson
2 months ago

  • Keywords dev-reviewed added; dev-feedback removed

Approved for backport to 7.1

#22 @joedolson
2 months ago

In 63232:

I18N: Add translator comments in wp_notify_moderator().

The trackback and pingback excerpt lines in the comment moderation notification email now document their placeholder for translators.

Follow-up to [63030].

Reviewed by joedolson.
Merges [63204] to the 7.1 branch.

Props obenland, SergeyBiryukov, wildworks.
See #64899.

#23 @wildworks
2 months ago

Can we close this ticket now?

#24 @desrosj
2 months ago

  • Resolution → fixed
  • Status reopened → closed

It looks like all remaining issues on this PR have been resolved. Going to close out.

#65859 has been opened for the 7.2 release cycle.

​@desrosj commented on ​PR #12866:


2 months ago
#25

Committed in r63204.

Note: See TracTickets for help on using tickets.