Fix pgettext when there is no translation.

This commit is contained in:
Michal Čihař
2010-04-01 09:53:54 +02:00
parent 831f7ae5ee
commit add9bc3a38

View File

@@ -409,7 +409,12 @@ class gettext_reader {
function pgettext($context, $msgid) { function pgettext($context, $msgid) {
$key = $context . chr(4) . $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) { function npgettext($context, $singular, $plural, $number) {