From 3b98150c82f881cb538e16a66e94be2f4f22e664 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 19 Feb 2010 18:01:50 +0000 Subject: [PATCH] Sync pomo. Props nbachiyski. fixes #11832 git-svn-id: http://svn.automattic.com/wordpress/trunk@13228 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pomo/entry.php | 2 +- wp-includes/pomo/mo.php | 4 ++-- wp-includes/pomo/po.php | 4 ++-- wp-includes/pomo/streams.php | 2 +- wp-includes/pomo/translations.php | 6 ++++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/wp-includes/pomo/entry.php b/wp-includes/pomo/entry.php index 1ce5f9ac49..07ddfd4d11 100644 --- a/wp-includes/pomo/entry.php +++ b/wp-includes/pomo/entry.php @@ -2,7 +2,7 @@ /** * Contains Translation_Entry class * - * @version $Id: entry.php 351 2009-12-03 11:39:08Z nbachiyski $ + * @version $Id: entry.php 406 2010-02-07 11:10:24Z nbachiyski $ * @package pomo * @subpackage entry */ diff --git a/wp-includes/pomo/mo.php b/wp-includes/pomo/mo.php index 9b2ac1d0aa..4020642525 100644 --- a/wp-includes/pomo/mo.php +++ b/wp-includes/pomo/mo.php @@ -2,7 +2,7 @@ /** * Class for working with MO files * - * @version $Id: mo.php 293 2009-11-12 15:43:50Z nbachiyski $ + * @version $Id: mo.php 406 2010-02-07 11:10:24Z nbachiyski $ * @package pomo * @subpackage mo */ @@ -201,7 +201,7 @@ class MO extends Gettext_Translations { * 0x00 as a plural translations separator */ function &make_entry($original, $translation) { - $entry = & new Translation_Entry(); + $entry = new Translation_Entry(); // look for context $parts = explode(chr(4), $original); if (isset($parts[1])) { diff --git a/wp-includes/pomo/po.php b/wp-includes/pomo/po.php index 558a369ed1..631b703a8d 100644 --- a/wp-includes/pomo/po.php +++ b/wp-includes/pomo/po.php @@ -2,7 +2,7 @@ /** * Class for working with PO files * - * @version $Id: po.php 283 2009-09-23 16:21:51Z nbachiyski $ + * @version $Id: po.php 406 2010-02-07 11:10:24Z nbachiyski $ * @package pomo * @subpackage po */ @@ -254,7 +254,7 @@ class PO extends Gettext_Translations { return false; } // add comment - $this->add_comment_to_entry($entry, $line); + $this->add_comment_to_entry($entry, $line);; } elseif (preg_match('/^msgctxt\s+(".*")/', $line, $m)) { if ($is_final($context)) { PO::read_line($f, 'put-back'); diff --git a/wp-includes/pomo/streams.php b/wp-includes/pomo/streams.php index 341fee4540..256e22e452 100644 --- a/wp-includes/pomo/streams.php +++ b/wp-includes/pomo/streams.php @@ -3,7 +3,7 @@ * Classes, which help reading streams of data from files. * Based on the classes from Danilo Segan * - * @version $Id: streams.php 293 2009-11-12 15:43:50Z nbachiyski $ + * @version $Id: streams.php 406 2010-02-07 11:10:24Z nbachiyski $ * @package pomo * @subpackage streams */ diff --git a/wp-includes/pomo/translations.php b/wp-includes/pomo/translations.php index 11f9b8459f..98c3f4e0ed 100644 --- a/wp-includes/pomo/translations.php +++ b/wp-includes/pomo/translations.php @@ -2,7 +2,7 @@ /** * Class for a set of entries for translation and their associated headers * - * @version $Id: translations.php 291 2009-10-21 05:46:08Z nbachiyski $ + * @version $Id: translations.php 406 2010-02-07 11:10:24Z nbachiyski $ * @package pomo * @subpackage translations */ @@ -104,7 +104,9 @@ class Translations { * @return void **/ function merge_with(&$other) { - $this->entries = array_merge($this->entries, $other->entries); + foreach( $other->entries as $entry ) { + $this->entries[$entry->key()] = $entry; + } } }