|
@@ 390-394 (lines=5) @@
|
| 387 |
|
foreach ( $this->mMessages[$code]['translated'] as $key => $value ) { |
| 388 |
|
$missing = false; |
| 389 |
|
foreach ( $variables as $var ) { |
| 390 |
|
if ( preg_match( "/$var/sU", $this->mGeneralMessages['translatable'][$key] ) && |
| 391 |
|
!preg_match( "/$var/sU", $value ) |
| 392 |
|
) { |
| 393 |
|
$missing = true; |
| 394 |
|
} |
| 395 |
|
if ( !preg_match( "/$var/sU", $this->mGeneralMessages['translatable'][$key] ) && |
| 396 |
|
preg_match( "/$var/sU", $value ) |
| 397 |
|
) { |
|
@@ 395-399 (lines=5) @@
|
| 392 |
|
) { |
| 393 |
|
$missing = true; |
| 394 |
|
} |
| 395 |
|
if ( !preg_match( "/$var/sU", $this->mGeneralMessages['translatable'][$key] ) && |
| 396 |
|
preg_match( "/$var/sU", $value ) |
| 397 |
|
) { |
| 398 |
|
$missing = true; |
| 399 |
|
} |
| 400 |
|
} |
| 401 |
|
if ( $missing ) { |
| 402 |
|
$mismatchMessages[$key] = $value; |
|
@@ 421-425 (lines=5) @@
|
| 418 |
|
$this->loadMessages( $code ); |
| 419 |
|
$messagesWithoutPlural = []; |
| 420 |
|
foreach ( $this->mMessages[$code]['translated'] as $key => $value ) { |
| 421 |
|
if ( stripos( $this->mGeneralMessages['translatable'][$key], '{{plural:' ) !== false && |
| 422 |
|
stripos( $value, '{{plural:' ) === false |
| 423 |
|
) { |
| 424 |
|
$messagesWithoutPlural[$key] = $value; |
| 425 |
|
} |
| 426 |
|
} |
| 427 |
|
|
| 428 |
|
return $messagesWithoutPlural; |