equal
deleted
inserted
replaced
1 <?php |
1 <?php |
2 /** |
2 /** |
3 * Contains Translation_Entry class |
3 * Contains Translation_Entry class |
4 * |
4 * |
5 * @version $Id: entry.php 621 2011-06-13 12:21:50Z nbachiyski $ |
5 * @version $Id: entry.php 718 2012-10-31 00:32:02Z nbachiyski $ |
6 * @package pomo |
6 * @package pomo |
7 * @subpackage entry |
7 * @subpackage entry |
8 */ |
8 */ |
9 |
9 |
10 if ( !class_exists( 'Translation_Entry' ) ): |
10 if ( !class_exists( 'Translation_Entry' ) ): |
63 function key() { |
63 function key() { |
64 if (is_null($this->singular)) return false; |
64 if (is_null($this->singular)) return false; |
65 // prepend context and EOT, like in MO files |
65 // prepend context and EOT, like in MO files |
66 return is_null($this->context)? $this->singular : $this->context.chr(4).$this->singular; |
66 return is_null($this->context)? $this->singular : $this->context.chr(4).$this->singular; |
67 } |
67 } |
68 |
68 |
69 function merge_with(&$other) { |
69 function merge_with(&$other) { |
70 $this->flags = array_unique( array_merge( $this->flags, $other->flags ) ); |
70 $this->flags = array_unique( array_merge( $this->flags, $other->flags ) ); |
71 $this->references = array_unique( array_merge( $this->references, $other->references ) ); |
71 $this->references = array_unique( array_merge( $this->references, $other->references ) ); |
72 if ( $this->extracted_comments != $other->extracted_comments ) { |
72 if ( $this->extracted_comments != $other->extracted_comments ) { |
73 $this->extracted_comments .= $other->extracted_comments; |
73 $this->extracted_comments .= $other->extracted_comments; |
74 } |
74 } |
75 |
75 |
76 } |
76 } |
77 } |
77 } |
78 endif; |
78 endif; |