Allow 'Cockney' filter to be translated.

Updates unit test.

Props miqrogroove.
Fixes #31953.

Built from https://develop.svn.wordpress.org/trunk@32788


git-svn-id: http://core.svn.wordpress.org/trunk@32759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-06-16 00:46:24 +00:00
parent b126a0144f
commit 7db2c06ab6
2 changed files with 10 additions and 5 deletions

View File

@ -102,11 +102,16 @@ function wptexturize( $text, $reset = false ) {
if ( isset($wp_cockneyreplace) ) {
$cockney = array_keys( $wp_cockneyreplace );
$cockneyreplace = array_values( $wp_cockneyreplace );
} elseif ( "'" != $apos ) { // Only bother if we're doing a replacement.
$cockney = array( "'tain't", "'twere", "'twas", "'tis", "'twill", "'til", "'bout", "'nuff", "'round", "'cause", "'em" );
$cockneyreplace = array( $apos . "tain" . $apos . "t", $apos . "twere", $apos . "twas", $apos . "tis", $apos . "twill", $apos . "til", $apos . "bout", $apos . "nuff", $apos . "round", $apos . "cause", $apos . "em" );
} else {
$cockney = $cockneyreplace = array();
/* translators: This is a comma-separated list of words that defy the syntax of quotations in normal use,
* for example... 'We do not have enough words yet' ... is a typical quoted phrase. But when we write
* lines of code 'til we have enough of 'em, then we need to insert apostrophes instead of quotes.
*/
$cockney = explode( ',', _x( "'tain't,'twere,'twas,'tis,'twill,'til,'bout,'nuff,'round,'cause,'em",
'Comma-separated list of words to texturize in your language' ) );
$cockneyreplace = explode( ',', _x( '’tain’t,’twere,’twas,’tis,’twill,’til,’bout,’nuff,’round,’cause,’em',
'Comma-separated list of replacement words in your language' ) );
}
$static_characters = array_merge( array( '...', '``', '\'\'', ' (tm)' ), $cockney );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32787';
$wp_version = '4.3-alpha-32788';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.