diff --git src/wp-includes/pomo/translations.php b/translations.php
index be9081a..206e55b 100755
|
old
|
new
|
require_once dirname( __FILE__ ) . '/entry.php';
|
| 12 | 12 | |
| 13 | 13 | if ( ! class_exists( 'Translations', false ) ) : |
| 14 | 14 | class Translations { |
| | 15 | /** |
| | 16 | * @var array |
| | 17 | */ |
| 15 | 18 | var $entries = array(); |
| | 19 | |
| | 20 | /** |
| | 21 | * @var array |
| | 22 | */ |
| 16 | 23 | var $headers = array(); |
| 17 | 24 | |
| 18 | 25 | /** |
| … |
… |
if ( ! class_exists( 'Translations', false ) ) :
|
| 78 | 85 | |
| 79 | 86 | /** |
| 80 | 87 | * @param string $header |
| | 88 | * @return string|false Returns element if present, false otherwise. |
| 81 | 89 | */ |
| 82 | 90 | function get_header( $header ) { |
| 83 | 91 | return isset( $this->headers[ $header ] ) ? $this->headers[ $header ] : false; |
| … |
… |
if ( ! class_exists( 'Translations', false ) ) :
|
| 85 | 93 | |
| 86 | 94 | /** |
| 87 | 95 | * @param Translation_Entry $entry |
| | 96 | * @return string|false Returns element key if present, false otherwise. |
| 88 | 97 | */ |
| 89 | 98 | function translate_entry( &$entry ) { |
| 90 | 99 | $key = $entry->key(); |
| … |
… |
if ( ! class_exists( 'Translations', false ) ) :
|
| 117 | 126 | * from their headers. |
| 118 | 127 | * |
| 119 | 128 | * @param integer $count number of items |
| | 129 | * @return bool |
| 120 | 130 | */ |
| 121 | 131 | function select_plural_form( $count ) { |
| 122 | 132 | return 1 == $count ? 0 : 1; |
| … |
… |
if ( ! class_exists( 'Translations', false ) ) :
|
| 134 | 144 | * @param string $plural |
| 135 | 145 | * @param int $count |
| 136 | 146 | * @param string $context |
| | 147 | * @return int|string |
| 137 | 148 | */ |
| 138 | 149 | function translate_plural( $singular, $plural, $count, $context = null ) { |
| 139 | 150 | $entry = new Translation_Entry( |
| … |
… |
if ( ! class_exists( 'Translations', false ) ) :
|
| 189 | 200 | * they can't share it effectively. |
| 190 | 201 | * |
| 191 | 202 | * @param int $count |
| | 203 | * @return mixed the function result, or false on error. |
| 192 | 204 | */ |
| 193 | 205 | function gettext_select_plural_form( $count ) { |
| 194 | 206 | if ( ! isset( $this->_gettext_select_plural_form ) || is_null( $this->_gettext_select_plural_form ) ) { |
| … |
… |
if ( ! class_exists( 'Translations', false ) ) :
|
| 219 | 231 | * |
| 220 | 232 | * @param int $nplurals |
| 221 | 233 | * @param string $expression |
| | 234 | * @return array |
| 222 | 235 | */ |
| 223 | 236 | function make_plural_form_function( $nplurals, $expression ) { |
| 224 | 237 | try { |
| … |
… |
if ( ! class_exists( 'NOOP_Translations', false ) ) :
|
| 301 | 314 | * Provides the same interface as Translations, but doesn't do anything |
| 302 | 315 | */ |
| 303 | 316 | class NOOP_Translations { |
| | 317 | /** |
| | 318 | * @var array |
| | 319 | */ |
| 304 | 320 | var $entries = array(); |
| | 321 | |
| | 322 | /** |
| | 323 | * @var array |
| | 324 | */ |
| 305 | 325 | var $headers = array(); |
| 306 | 326 | |
| | 327 | /** |
| | 328 | * @param Translation_Entry $entry |
| | 329 | * @return true |
| | 330 | */ |
| 307 | 331 | function add_entry( $entry ) { |
| 308 | 332 | return true; |
| 309 | 333 | } |
| … |
… |
if ( ! class_exists( 'NOOP_Translations', false ) ) :
|
| 340 | 364 | /** |
| 341 | 365 | * @param string $singular |
| 342 | 366 | * @param string $context |
| | 367 | * @return string |
| 343 | 368 | */ |
| 344 | 369 | function translate( $singular, $context = null ) { |
| 345 | 370 | return $singular; |
| … |
… |
if ( ! class_exists( 'NOOP_Translations', false ) ) :
|
| 365 | 390 | * @param string $plural |
| 366 | 391 | * @param int $count |
| 367 | 392 | * @param string $context |
| | 393 | * @return string |
| 368 | 394 | */ |
| 369 | 395 | function translate_plural( $singular, $plural, $count, $context = null ) { |
| 370 | 396 | return 1 == $count ? $singular : $plural; |