-
Notifications
You must be signed in to change notification settings - Fork 8
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
Extract comments #6
Comments
I'll probably implement this using subexpressions, e.g. {{_ "foo" "bar" (i18n-comment "comment")}} |
Isn't it possible to use Handlebars comments like so: {{! Extra information about this sentence.}}
{{_ "This should be translated."}} It would match gettext in other languages. And can it be triggered by an I ask because gmarty/xgettext is an attempt to mimic GNU's xgettext (for template languages). It is where this project is mainly used. |
FYI, I ended up forking this project to implement some more features. For one thing, I don't need to use gmarty/xgettext (I plan on using build tools instead of a command line tool). gmarty/xgettext's API is also very limited, e.g. no domains, so I feel no reason to maintain backwards compatibility. Feel free to cherry-pick whatever features you want. I may contribute some of them back to here if I have time. |
I might have been a bit quick pushing you to contribute. I'm sorry, but I am a bit short on time this month. I do think it is crucial this project can be used stand-alone. It isn't just a library for gmarty/xgettext. This might not have been clear, but I'm very appreciative of your work to take this project to a better level of gettext-feature support. The only "guideline" I used up until now were xgettext's CLI parameters as a list of possible parameters. Most of which are meant for gmarty/xgettext, but some of which flow through to this library. You think that is too much of a constraint? |
Sorry for not getting back to you sooner. I have no problem merging my fork back into this project if that's what we decide is best. My only concern is that gettext-handlebars isn't the best name for this project, since it really only implements extraction, not the gettext runtime functions. Obviously not a huge deal, but something to consider. There's still a bunch of stuff I want to implement in my fork, but then I'll circle back and see what we can merge back up into this project. |
gettext has the notion of "extracted comments." These are comments from the developers designed to aid the translators, e.g:
Obviously, you need to get creative in how the same is done in a markup language. Maybe a sub-expression?
The text was updated successfully, but these errors were encountered: