Make WordPress Core


Ignore:
Timestamp:
10/31/2012 10:13:51 PM (14 years ago)
Author:
nbachiyski
Message:

Sync POMO with GlotPress

See ​http://glotpress.trac.wordpress.org/browser/trunk/pomo/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pomo/translations.php

    r18827 r22349  
    33 * Class for a set of entries for translation and their associated headers
    44 *
    5  * @version $Id: translations.php 590 2010-12-20 19:58:37Z nbachiyski $
     5 * @version $Id: translations.php 718 2012-10-31 00:32:02Z nbachiyski $
    66 * @package pomo
    77 * @subpackage translations
    … …  
    3030                return true;
    3131        }
    32        
     32
    3333        function add_entry_or_merge($entry) {
    3434                if (is_array($entry)) {
    … …  
    8282         * Given the number of items, returns the 0-based index of the plural form to use
    8383         *
    84          * Here, in the base Translations class, the common logic for English is implemented:
     84         * Here, in the base Translations class, the common logic for English is implmented:
    8585         *      0 if there is one element, 1 otherwise
    8686         *
    … …  
    122122                }
    123123        }
    124        
     124
    125125        function merge_originals_with(&$other) {
    126126                foreach( $other->entries as $entry ) {
    … …  
    149149                return call_user_func($this->_gettext_select_plural_form, $count);
    150150        }
    151        
     151
    152152        function nplurals_and_expression_from_header($header) {
    153153                if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) {
    … …  
    175175         * Adds parantheses to the inner parts of ternary operators in
    176176         * plural expressions, because PHP evaluates ternary oerators from left to right
    177          * 
     177         *
    178178         * @param string $expression the expression without parentheses
    179179         * @return string the expression with parentheses added
    … …  
    203203                return rtrim($res, ';');
    204204        }
    205        
     205
    206206        function make_headers($translation) {
    207207                $headers = array();
    … …  
    216216                return $headers;
    217217        }
    218        
     218
    219219        function set_header($header, $value) {
    220220                parent::set_header($header, $value);
    … …  
    235235        var $entries = array();
    236236        var $headers = array();
    237        
     237
    238238        function add_entry($entry) {
    239239                return true;
Note: See TracChangeset for help on using the changeset viewer.