[wp-trac] [WordPress Trac] #60590: Function wp_remove_surrounding_empty_script_tags should use sprintf with placeholder
WordPress Trac
noreply at wordpress.org
Wed Feb 21 09:59:10 UTC 2024
#60590: Function wp_remove_surrounding_empty_script_tags should use sprintf with
placeholder
---------------------------+----------------------------------------
Reporter: swissspidy | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.6
Component: Script Loader | Version:
Severity: normal | Keywords: needs-patch good-first-bug
Focuses: |
---------------------------+----------------------------------------
The function `wp_remove_surrounding_empty_script_tags()` currently uses
the following function call:
`__( 'Function wp_remove_surrounding_empty_script_tags() used incorrectly
in PHP.' )`
`wp_remove_surrounding_empty_script_tags()` should not be translatable.
This should be changed to use sprintf with a placeholder and an
accompanying translator comment.
Something like this:
{{{#!php
sprintf(
/* translators: %s: wp_remove_surrounding_empty_script_tags() */
__( 'Function %s used incorrectly in PHP.' ),
'wp_remove_surrounding_empty_script_tags()'
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60590>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list