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/mo.php

    r34348 r35714  
    33 * Class for working with MO files
    44 *
    5  * @version $Id: mo.php 718 2012-10-31 00:32:02Z nbachiyski $
     5 * @version $Id: mo.php 1157 2015-11-20 04:30:11Z dd32 $
    66 * @package pomo
    77 * @subpackage mo
     
    125125        $exported = $entry->singular;
    126126        if ($entry->is_plural) $exported .= chr(0).$entry->plural;
    127         if (!is_null($entry->context)) $exported = $entry->context . chr(4) . $exported;
     127        if ($entry->context) $exported = $entry->context . chr(4) . $exported;
    128128        return $exported;
    129129    }
     
    135135    function export_translations($entry) {
    136136        //TODO: warnings for control characters
    137         return implode(chr(0), $entry->translations);
     137        return $entry->is_plural ? implode(chr(0), $entry->translations) : $entry->translations[0];
    138138    }
    139139
Note: See TracChangeset for help on using the changeset viewer.