Question

I'm quite new to poEdit, and I'm successfully translating 95% of my keys in my javascript templates and files.

I use this syntax __("key"), mainly <%= __("key") %>.

But (there always is a but), for some reason, this key email in placeholder

enter code here<input type='text' name='username' placeholder='<%= _("email") %>'>

is not parsed with poEdit.

I'm using Python parser; with __ keyword. What did I miss ?

Thanks for you help

Was it helpful?

Solution 2

Unlike @Vaclav said below, I finally did not rely on xgettext (and its language validation) and made my own parser (just a parser) in PHP.

Here is the open source project, if it could help some of you https://github.com/Wisembly/jsgettext

Best

OTHER TIPS

You say yourself that you use the __ (double underscore) keyword. _ (single underscore) used in your other example is a different identifier, so of course it isn’t found.

As a side note, lying to the tools (be it Poedit or xgettext) about the language (as you do, this is no Python) is bound to cause… interesting… things sooner or later.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top