[wp-trac] [WordPress Trac] #46683: Site Health: audit the translation functions
WordPress Trac
noreply at wordpress.org
Sat Mar 30 11:48:42 UTC 2019
#46683: Site Health: audit the translation functions
-------------------------------------+-------------------------------
Reporter: afercia | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.2
Component: Administration | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch site-health | Focuses: coding-standards
-------------------------------------+-------------------------------
Comment (by ocean90):
* `wp.18n` can be used to translate strings in JavaScript
* The context for 'Site Health' can be removed
* Translations should not be escaped
* In translator comments, placeholders like `%1$s:` should be just the
number `1`
* Plural strings like "''Your site has %d inactive plugin. Inactive
plugins are tempting targets for attackers. if you’re not going to
use a plugin, we recommend you remove it.''" should be split into two
strings so that the last past doesn't need to be translated twice. Note
also the current typo in "if".
* The context in `_x(
'https://make.wordpress.org/hosting/handbook/handbook/server-environment
/#php-extensions', 'The address to describe PHP modules and their use.' )`
should be a translators comment
* Related to this `__( 'the team handbook' )` should not be translated
alone, instead add `<a href="%s">the team handbook</a>` back to the
string.
* Constants in strings should be replaced by placeholders. This also
allows to mark them as code, for example `<code>WP_DEBUG_LOG</code>`
* The badge labels are not translatable
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46683#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list