[wp-trac] [WordPress Trac] #54658: Add context to "%1$s is deprecated" strings

WordPress Trac noreply at wordpress.org
Sat Dec 18 21:39:45 UTC 2021


#54658: Add context to "%1$s is deprecated" strings
----------------------------+-----------------------
 Reporter:  SergeyBiryukov  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  6.0
Component:  General         |    Version:
 Severity:  normal          |   Keywords:  has-patch
  Focuses:                  |
----------------------------+-----------------------
 In the `_deprecated_*()` functions family, there are some commonly used
 strings:

 * `%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s
 instead.`
 * `%1$s is <strong>deprecated</strong> since version %2$s with no
 alternative available.`

 The problem is that these strings are used for several completely
 different entities: PHP functions, PHP file names, and WordPress hooks.

 While the strings do have translator comments, it would also be helpful
 for translators to be able to differentiate these strings and say what
 exactly is deprecated: a function, a file name, or a hook.

 Another option would be to make the original strings more explicit
 instead:
 * `Function %1$s is <strong>deprecated</strong> since version %2$s! Use
 %3$s instead.`
 * `Function %1$s is <strong>deprecated</strong> since version %2$s with no
 alternative available.`
 * `File %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s
 instead.`
 * `File %1$s is <strong>deprecated</strong> since version %2$s with no
 alternative available.`
 * `Hook %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s
 instead.`
 * `Hook %1$s is <strong>deprecated</strong> since version %2$s with no
 alternative available.`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54658>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list