Changeset 30663 for trunk/src/wp-includes/pomo/translations.php
- Timestamp:
- 11/30/2014 09:40:53 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pomo/translations.php
r29479 r30663 18 18 * Add entry to the PO structure 19 19 * 20 * @param object&$entry20 * @param array|Translation_Entry &$entry 21 21 * @return bool true on success, false if the entry doesn't have a key 22 22 */ … … 31 31 } 32 32 33 /** 34 * @param array|Translation_Entry $entry 35 * @return bool 36 */ 33 37 function add_entry_or_merge($entry) { 34 38 if (is_array($entry)) { … … 58 62 } 59 63 64 /** 65 * @param array $headers 66 */ 60 67 function set_headers($headers) { 61 68 foreach($headers as $header => $value) { … … 64 71 } 65 72 73 /** 74 * @param string $header 75 */ 66 76 function get_header($header) { 67 77 return isset($this->headers[$header])? $this->headers[$header] : false; 68 78 } 69 79 80 /** 81 * @param Translation_Entry $entry 82 */ 70 83 function translate_entry(&$entry) { 71 84 $key = $entry->key(); … … 73 86 } 74 87 88 /** 89 * @param string $singular 90 * @param string $context 91 * @return string 92 */ 75 93 function translate($singular, $context=null) { 76 94 $entry = new Translation_Entry(array('singular' => $singular, 'context' => $context)); … … 98 116 } 99 117 118 /** 119 * @param string $singular 120 * @param string $plural 121 * @param int $count 122 * @param string $context 123 */ 100 124 function translate_plural($singular, $plural, $count, $context = null) { 101 125 $entry = new Translation_Entry(array('singular' => $singular, 'plural' => $plural, 'context' => $context)); … … 140 164 * they can't share it effectively. 141 165 * 166 * @param int $count 142 167 */ 143 168 function gettext_select_plural_form($count) { … … 150 175 } 151 176 177 /** 178 * @param string $header 179 * @return array 180 */ 152 181 function nplurals_and_expression_from_header($header) { 153 182 if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) { … … 163 192 * Makes a function, which will return the right translation index, according to the 164 193 * plural forms header 194 * @param int $nplurals 195 * @param string $expression 165 196 */ 166 197 function make_plural_form_function($nplurals, $expression) { … … 204 235 } 205 236 237 /** 238 * @param string $translation 239 * @return array 240 */ 206 241 function make_headers($translation) { 207 242 $headers = array(); … … 217 252 } 218 253 254 /** 255 * @param string $header 256 * @param string $value 257 */ 219 258 function set_header($header, $value) { 220 259 parent::set_header($header, $value); … … 254 293 } 255 294 295 /** 296 * @param string $singular 297 * @param string $context 298 */ 256 299 function translate($singular, $context=null) { 257 300 return $singular; … … 266 309 } 267 310 311 /** 312 * @param string $singular 313 * @param string $plural 314 * @param int $count 315 * @param string $context 316 */ 268 317 function translate_plural($singular, $plural, $count, $context = null) { 269 318 return 1 == $count? $singular : $plural;
Note: See TracChangeset
for help on using the changeset viewer.