Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#41668 closed defect (bug) (fixed)

i18n: Use %s placeholders in wp-admin/includes/template.php

Reported by: ramiy's profile ramiy Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: template Cc:

Description

This patch replaces the path, the functions and the actions with %s placeholder. This way translators can't mistakenly changes to wrong function names.

Old translation string:

  • Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead.

New translation string:

  • Likely direct inclusion of %1$s in order to use %2$s. This is very wrong. Hook the %2$s call into the %3$s action instead.

The patch also adds translators comments and <code> tags around the function/action names.

Attachments (2)

41668.patch (1.1 KB) - added by ramiy 7 years ago.
41668.png (25.4 KB) - added by ramiy 7 years ago.

Download all attachments as: .zip

Change History (5)

@ramiy
7 years ago

@ramiy
7 years ago

#1 @ramiy
7 years ago

  • Focuses template added
  • Keywords has-patch added

#2 @SergeyBiryukov
7 years ago

  • Milestone changed from Awaiting Review to 4.9
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @SergeyBiryukov
7 years ago

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

In 41906:

I18N: Replace hardcoded file name in a translatable string in convert_to_screen() with a placeholder.

Props ramiy.
Fixes #41668.

Note: See TracTickets for help on using tickets.