Search code examples
javascriptlocalizationpoeditxgettext

poEdit do not find my placeholders' translations


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


Solution

  • 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