Open dschissler opened 8 years ago
Thanks for following up on this so quickly.
You might have noticed, but where parsers got sent something like ({ _: [0], gettext: [0], ngettext: [0, 1]}
) before, the position arrays inside got extended with 3 props (msgid
, msgid_plural
and msgctxt
).
The previous example becomes { _: [0, msgid: 0], gettext: [0, msgid: 0], ngettext: [0, 1, msgid: 0, msgid_plural:1]}
. It is a bit of a hack to manipulate the arrays, but this doesn't break the parsers while still enabling a more flexible spec.
It would be best if you could use the same default as gettext-handlebars. That way the old format can disappear someday.
Afterwards, you can indeed use the msgctxt
property to parse for contexts.
I won't be able to get to this for quite a while but its on my list.
@Zaszczyk I'll fix this after my Phalcon book is 100% finalized and sent to the printer (in hopefull 7-10 days).
I plan to start implementing this next week. @smhg Is this super complicated to do? I don't really have any idea about the scope of the changes.
If you want to follow the same order of changes in gettext-handlebars, look at these commits:
Thanks.
https://github.com/gmarty/xgettext/issues/56