Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#49250 closed defect (bug) (wontfix)

i18n: replace %s placeholder type in wp-admin/includes/ms.php

Reported by: ramiy's profile ramiy Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-screenshots has-patch
Focuses: administration, multisite Cc:

Description

In the attached patch, a translation string has only one placeholder replaced with the site title.

The patch replaces %1$s with %s, as the string has only one placeholder.

Attachments (2)

49250.png (30.3 KB) - added by ramiy 6 years ago.
49250.patch (1.6 KB) - added by ramiy 6 years ago.

Download all attachments as: .zip

Change History (6)

@ramiy
6 years ago

@ramiy
6 years ago

#1 @ramiy
6 years ago

  • Keywords has-screenshots has-patch added

#2 @SergeyBiryukov
6 years ago

  • Keywords close added

Thanks for the patch!

%1$s is used here so that we don't have to pass $blog_name to sprintf() twice to avoid a "Too few arguments" PHP warning. With the patch, %s is used twice in the string, so we'll also have to pass $blog_name twice.

There are at least two other places in core with the same approach:

I don't see a significant benefit in breaking existing translations here just to change the placeholder.

#3 @ramiy
6 years ago

Ok, I understand.

Thank you for taking the time to investigate this.

#4 @SergeyBiryukov
6 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.