Make WordPress Core


Ignore:
Timestamp:
11/20/2015 04:33:12 AM (9 years ago)
Author:
dd32
Message:

Merge the changes to GlotPress's POMO from upstream to WordPress's copy.
Fixes #34748

File:
1 edited

Legend:

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

    r35686 r35714  
    33 * Contains Translation_Entry class
    44 *
    5  * @version $Id: entry.php 718 2012-10-31 00:32:02Z nbachiyski $
     5 * @version $Id: entry.php 1157 2015-11-20 04:30:11Z dd32 $
    66 * @package pomo
    77 * @subpackage entry
     
    5050            $this->$varname = $value;
    5151        }
    52         if (isset($args['plural'])) $this->is_plural = true;
     52        if (isset($args['plural']) && $args['plural']) $this->is_plural = true;
    5353        if (!is_array($this->translations)) $this->translations = array();
    5454        if (!is_array($this->references)) $this->references = array();
     
    6969     */
    7070    function key() {
    71         if (is_null($this->singular)) return false;
     71        if ( null === $this->singular || '' === $this->singular ) return false;
    7272
    7373        // Prepend context and EOT, like in MO files
    74         $key = is_null($this->context)? $this->singular : $this->context.chr(4).$this->singular;
     74        $key = !$this->context? $this->singular : $this->context.chr(4).$this->singular;
    7575        // Standardize on \n line endings
    7676        $key = str_replace( array( "\r\n", "\r" ), "\n", $key );
Note: See TracChangeset for help on using the changeset viewer.