diff options
author | Andrew Dolgov <[email protected]> | 2013-04-01 19:17:25 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-01 19:17:25 +0400 |
commit | c050148df4b81eca3c0e1110b94a649e9b56f9b0 (patch) | |
tree | 5db38e72a2c22efa02671dc1258e5ae2075c9056 /lib/gettext/gettext.php | |
parent | d3b923c9177c7cfb30460d388d1dd8fbe9d91433 (diff) |
fix broken header of ru_RU translation thanks to Tomáš Chvátal; rebase translations
Diffstat (limited to 'lib/gettext/gettext.php')
-rwxr-xr-x | lib/gettext/gettext.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/gettext/gettext.php b/lib/gettext/gettext.php index a121f9c7e..5064047cb 100755 --- a/lib/gettext/gettext.php +++ b/lib/gettext/gettext.php @@ -409,12 +409,23 @@ class gettext_reader { function pgettext($context, $msgid) { $key = $context . chr(4) . $msgid; - return $this->translate($key); + $ret = $this->translate($key); + if (strpos($ret, "\004") !== FALSE) { + return $msgid; + } else { + return $ret; + } } function npgettext($context, $singular, $plural, $number) { - $singular = $context . chr(4) . $singular; - return $this->ngettext($singular, $plural, $number); + $key = $context . chr(4) . $singular; + $ret = $this->ngettext($key, $plural, $number); + if (strpos($ret, "\004") !== FALSE) { + return $singular; + } else { + return $ret; + } + } } |