Revert "Translator: fall back to LC_ALL if LC_MESSAGES is not defined"

This reverts commit 9fe2d4928d.
This commit is contained in:
Alexander A. Klimov 2015-06-12 13:29:31 +02:00
parent 9fe2d4928d
commit b58ffbe034
1 changed files with 2 additions and 12 deletions

View File

@ -100,11 +100,7 @@ class Translator
{
$contextString = "{$context}\004{$text}";
$translation = dcgettext(
$domain,
$contextString,
defined('LC_MESSAGES') ? LC_MESSAGES : LC_ALL
);
$translation = dcgettext($domain, $contextString, LC_MESSAGES);
if ($translation == $contextString) {
return $text;
@ -130,13 +126,7 @@ class Translator
{
$contextString = "{$context}\004{$textSingular}";
$translation = dcngettext(
$domain,
$contextString,
$textPlural,
$number,
defined('LC_MESSAGES') ? LC_MESSAGES : LC_ALL
);
$translation = dcngettext($domain, $contextString, $textPlural, $number, LC_MESSAGES);
if ($translation == $contextString || $translation == $textPlural) {
return ($number == 1 ? $textSingular : $textPlural);