[wp-trac] [WordPress Trac] #15985: _c (deprecated) by _x
WordPress Trac
wp-trac at lists.automattic.com
Sun Dec 26 15:01:44 UTC 2010
#15985: _c (deprecated) by _x
--------------------------+-----------------------------
Reporter: arena | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: 3.1
Severity: normal | Keywords:
--------------------------+-----------------------------
_x is declaring _c as deprecated, however _x and _c are not doing the same
thing
reminder :
{{{
function _c( $text, $domain = 'default' ) {
_deprecated_function( __FUNCTION__, '2.9', '_x()' );
return before_last_bar( translate( $text, $domain ) );
}
}}}
{{{
function _x( $single, $context, $domain = 'default' ) {
return translate_with_gettext_context( $single, $context, $domain );
}
}}}
_x should clean up the string calling : before_last_bar()
after analysing the code, i really do not understand how the $context
variable is handled as it is not present in the po/mo files
thank you for your explanations
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15985>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list