From 7db2c06ab6a7213289c4125585424f47126d7c6d Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 16 Jun 2015 00:46:24 +0000 Subject: [PATCH] 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 --- wp-includes/formatting.php | 13 +++++++++---- wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 7fb0fe2245..c4aed55562 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 7f31dbc6ff..fb9c72bf7c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.