Sync pomo. Props nbachiyski. fixes #11832
git-svn-id: http://svn.automattic.com/wordpress/trunk@13228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ebdbcbc4b3
commit
3b98150c82
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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])) {
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Classes, which help reading streams of data from files.
|
||||
* Based on the classes from Danilo Segan <danilo@kvota.net>
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue