Closed ma-si closed 7 years ago
Translation with text_domain not working for gettext.
In second example key is uiname with whitespace. Case working:
In second example key is uiname with whitespace.
uiname
PoEdit Source keywords: translate:1 translatePlural:1,2
$this->translatePlural('name', 'names', 1, 'ui') TextDomain storage gives: ["storage":"ArrayObject":private]=> array(2) { ["name"]=> array(3) { [0]=> string(5) "imiÄ™" [1]=> string(6) "imiona" [2]=> string(5) "imion" } ["names"]=> string(0) "" }
$this->translatePlural('name', 'names', 1, 'ui')
["storage":"ArrayObject":private]=> array(2) { ["name"]=> array(3) { [0]=> string(5) "imiÄ™" [1]=> string(6) "imiona" [2]=> string(5) "imion" } ["names"]=> string(0) "" }
PoEdit Source keywords: translate:1,2c translatePlural:1,2,4c
This is configuration to update only defined text_domain from source code. PoEdit works well
$this->translatePlural('name', 'names', 1, 'ui') TextDomain storage gives: ["storage":"ArrayObject":private]=> array(2) { ["uiname"]=> array(3) { [0]=> string(5) "imiÄ™" [1]=> string(6) "imiona" [2]=> string(5) "imion" } ["names"]=> string(0) "" }
["storage":"ArrayObject":private]=> array(2) { ["uiname"]=> array(3) { [0]=> string(5) "imiÄ™" [1]=> string(6) "imiona" [2]=> string(5) "imion" } ["names"]=> string(0) "" }
In .po file there is one difference: msgctxt "ui" msgid "name" msgid_plural "names" msgstr[0] "imię" msgstr[1] "imiona" msgstr[2] "imion"
.po
\x04 EOT in storage array key
\x04
["storage":"ArrayObject":private]=> array(2) { ["ui\x04name"]=> array(3) { [0]=> string(5) "imię" [1]=> string(6) "imiona" [2]=> string(5) "imion" } ["names"]=> string(0) "" }
Translation with text_domain not working for gettext.
PoEdit Source keywords: translate:1 translatePlural:1,2
$this->translatePlural('name', 'names', 1, 'ui')
TextDomain storage gives:["storage":"ArrayObject":private]=> array(2) { ["name"]=> array(3) { [0]=> string(5) "imiÄ™" [1]=> string(6) "imiona" [2]=> string(5) "imion" } ["names"]=> string(0) "" }
Case not working:
PoEdit Source keywords: translate:1,2c translatePlural:1,2,4c
$this->translatePlural('name', 'names', 1, 'ui')
TextDomain storage gives:["storage":"ArrayObject":private]=> array(2) { ["uiname"]=> array(3) { [0]=> string(5) "imiÄ™" [1]=> string(6) "imiona" [2]=> string(5) "imion" } ["names"]=> string(0) "" }
In
.po
file there is one difference: msgctxt "ui" msgid "name" msgid_plural "names" msgstr[0] "imię" msgstr[1] "imiona" msgstr[2] "imion"