简体   繁体   中英

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM