[glotpress-updates] [GlotPress] #491: Pass GP_Original to GP_Translation_Warnings::check()
GlotPress
noreply at wordpress.org
Sun Sep 13 09:10:06 UTC 2015
#491: Pass GP_Original to GP_Translation_Warnings::check()
-------------------------+-----------------------------
Reporter: ocean90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Keywords: |
-------------------------+-----------------------------
With the current method – `function check( $singular, $plural,
$translations, $locale )` – we have no access to fields like `context` or
`comment` of an original. Both could be useful if you want to implement
contextual warnings.
One idea idea would be to change the method to:
{{{
function check( $original, $translations, $locale ) {
$singular = $original->singular;
$plural = $original->plural;
}}}
Or just add the (optional) argument:
{{{
function check( $singular, $plural, $translations, $locale, $original =
null )
}}}
--
Ticket URL: <https://glotpress.trac.wordpress.org/ticket/491>
GlotPress <https://glotpress.trac.wordpress.org>
Easy comin', easy goin'
More information about the glotpress-updates
mailing list