[wp-trac] [WordPress Trac] #46683: Site Health: audit the translation functions
WordPress Trac
noreply at wordpress.org
Fri Apr 12 19:43:43 UTC 2019
#46683: Site Health: audit the translation functions
-----------------------------------+-------------------------------
Reporter: afercia | Owner: SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 5.2
Component: Administration | Version: trunk
Severity: normal | Resolution:
Keywords: site-health has-patch | Focuses: coding-standards
-----------------------------------+-------------------------------
Changes (by TimothyBlynJacobs):
* keywords: needs-patch site-health => site-health has-patch
Comment:
> The result should replace the inner HTML of the h3 element.
Implemented. I used the `> h3` selector to get that immediate `h3` element
for safety. That could have a class added instead.
> Any string that's added via SiteHealth.string should probably be
switched to using wp.i18n.
I replaced `SiteHealth.string.site_health_complete_screen_reader` and
`site_info_copied` with `wp.i18n`. I couldn't find any usages of the other
localized strings.
There were also two "Copied!" strings that weren't translated.
I also modified the original PHP printed headlines to use `_n` as well so
that languages that have 0 as singular could do that. The `0` is constant
though, so maybe it'd be better to have a translator comment like `This is
referring to 0 issues` or similar?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46683#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list