Opened 3 years ago
Closed 3 years ago
#54658 closed defect (bug) (fixed)
Add context to "%1$s is deprecated" strings
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
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.
Attachments (2)
Change History (7)
#2
in reply to:
↑ description
@
3 years ago
Thanks for reviewing!
Replying to SergeyBiryukov:
Another option would be to make the original strings more explicit instead
The more I think about it, the more I like this latter option, as it makes the original strings clearer, so here's a patch in that direction as well.
@SergeyBiryukov Looks good. It helps the translator a lot to understand what has deprecated a function, a file name, or a hook.
Patch looks good to me.