summaryrefslogtreecommitdiff
path: root/lib/gettext/gettext.php
diff options
context:
space:
mode:
authorBarak Korren <[email protected]>2013-04-01 18:39:57 +0300
committerBarak Korren <[email protected]>2013-04-01 18:39:57 +0300
commit3f44977129ef0ab3c6233dc94d8c46ca2fa039f0 (patch)
tree53001b5acd5637666abe9281f880c33376ab0466 /lib/gettext/gettext.php
parent32b7a340adb9c1acd209049512c0b5d53ed04276 (diff)
parentc050148df4b81eca3c0e1110b94a649e9b56f9b0 (diff)
Merge branch 'master' of https://github.com/gothfox/Tiny-Tiny-RSS.git into tunable-fetches
Diffstat (limited to 'lib/gettext/gettext.php')
-rwxr-xr-xlib/gettext/gettext.php17
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;
+ }
+
}
}