Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support msgctxt for keyword parameter #5

Open
dschissler opened this issue Oct 8, 2016 · 6 comments
Open

Support msgctxt for keyword parameter #5

dschissler opened this issue Oct 8, 2016 · 6 comments

Comments

@dschissler
Copy link
Collaborator

gmarty/xgettext#56

@smhg
Copy link

smhg commented Oct 8, 2016

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.

@dschissler
Copy link
Collaborator Author

I won't be able to get to this for quite a while but its on my list.

@dschissler
Copy link
Collaborator Author

dschissler commented Nov 21, 2016

@Zaszczyk I'll fix this after my Phalcon book is 100% finalized and sent to the printer (in hopefull 7-10 days).

@dschissler
Copy link
Collaborator Author

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.

@smhg
Copy link

smhg commented Dec 4, 2016

If you want to follow the same order of changes in gettext-handlebars, look at these commits:

  1. Support msgctxt
  2. Use new parameter format (mentioned above)

@dschissler
Copy link
Collaborator Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants