Make WordPress Core


Ignore:
Timestamp:
06/16/2015 12:45:49 AM (11 years ago)
Author:
wonderboymusic
Message:

Allow 'Cockney' filter to be translated.

Updates unit test.

Props miqrogroove.
Fixes #31953.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r32650 r32788  
    103103            $cockney = array_keys( $wp_cockneyreplace );
    104104            $cockneyreplace = array_values( $wp_cockneyreplace );
    105         } elseif ( "'" != $apos ) { // Only bother if we're doing a replacement.
    106             $cockney = array( "'tain't", "'twere", "'twas", "'tis", "'twill", "'til", "'bout", "'nuff", "'round", "'cause", "'em" );
    107             $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" );
    108105        } else {
    109             $cockney = $cockneyreplace = array();
     106            /* translators: This is a comma-separated list of words that defy the syntax of quotations in normal use,
     107             * for example...  'We do not have enough words yet' ... is a typical quoted phrase.  But when we write
     108             * lines of code 'til we have enough of 'em, then we need to insert apostrophes instead of quotes.
     109             */
     110            $cockney = explode( ',', _x( "'tain't,'twere,'twas,'tis,'twill,'til,'bout,'nuff,'round,'cause,'em",
     111                'Comma-separated list of words to texturize in your language' ) );
     112
     113            $cockneyreplace = explode( ',', _x( '’tain’t,’twere,’twas,’tis,’twill,’til,’bout,’nuff,’round,’cause,’em',
     114                'Comma-separated list of replacement words in your language' ) );
    110115        }
    111116
Note: See TracChangeset for help on using the changeset viewer.