Changeset 22349 for trunk/wp-includes/pomo/translations.php
- Timestamp:
- 10/31/2012 10:13:51 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/pomo/translations.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pomo/translations.php
r18827 r22349 3 3 * Class for a set of entries for translation and their associated headers 4 4 * 5 * @version $Id: translations.php 590 2010-12-20 19:58:37Z nbachiyski $5 * @version $Id: translations.php 718 2012-10-31 00:32:02Z nbachiyski $ 6 6 * @package pomo 7 7 * @subpackage translations … … 30 30 return true; 31 31 } 32 32 33 33 function add_entry_or_merge($entry) { 34 34 if (is_array($entry)) { … … 82 82 * Given the number of items, returns the 0-based index of the plural form to use 83 83 * 84 * Here, in the base Translations class, the common logic for English is impl emented:84 * Here, in the base Translations class, the common logic for English is implmented: 85 85 * 0 if there is one element, 1 otherwise 86 86 * … … 122 122 } 123 123 } 124 124 125 125 function merge_originals_with(&$other) { 126 126 foreach( $other->entries as $entry ) { … … 149 149 return call_user_func($this->_gettext_select_plural_form, $count); 150 150 } 151 151 152 152 function nplurals_and_expression_from_header($header) { 153 153 if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) { … … 175 175 * Adds parantheses to the inner parts of ternary operators in 176 176 * plural expressions, because PHP evaluates ternary oerators from left to right 177 * 177 * 178 178 * @param string $expression the expression without parentheses 179 179 * @return string the expression with parentheses added … … 203 203 return rtrim($res, ';'); 204 204 } 205 205 206 206 function make_headers($translation) { 207 207 $headers = array(); … … 216 216 return $headers; 217 217 } 218 218 219 219 function set_header($header, $value) { 220 220 parent::set_header($header, $value); … … 235 235 var $entries = array(); 236 236 var $headers = array(); 237 237 238 238 function add_entry($entry) { 239 239 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)