Fix pgettext when there is no translation.
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user