문제

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

도움이 되었습니까?

해결책 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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top