poedit
poedit copied to clipboard
CLI version for strings extraction
Actually the interface has the cool feature of scanning the file and update the po with the new terms. I want to automatize this part and avoiding to use the interface for it so a command will speed up my job as developer, something that force the file to replace the old string with new will be very useful.
I want to automatize this part
Use xgettext
. That's what it's for.
That command support the POedit custom header? If yes sorry for the disturb.
No, it doesn't. If you want to extract from CLI instead of GUI, don't use these headers and use the tool that is actually meant for the job. It's not hard — see the GNU gettext manual linked from the Help menu.
My needs is based on the support of the PoEdit headers because in the WordPress world is used everywhere. So I will see on the gettext docs when I have time for it but I was hoping on something more fast to include that step on my building process.
but I was hoping on something more fast to include that step on my building process.
Step 1: Read the xgettext
man page, because there's probably a reason you're being pointed to it.
Step 2: Realize it is trivial to use and, indeed, "fast to include".
Step 3: There's no step 3.
At the moment, I have no plans for Poedit CLI — it would be a non-trivial amount of pointless work for something that xgettext
does already and does better. I'm reopening this as a feature request, but I'll be honest: it's not on the table now.
(A note for future readers: if you stumbled upon this and it would be useful for you, feel free to upvote; don't add "me too" comments unless there's something substantial to add.)
I created a python script that do that: https://github.com/CodeAtCode/PoEditZ Actually it is working only that the po file merged don't keep the old headers, I will do probably something with python to replace that but I don't understand why msgmerge don't keep the others.
I finished that script :-)
@Mte90 if you wish to make a PR for Poedit, please do so, it would be very welcome. However please don't fill this place, which is a Poedit bug tracker, with off-topic content such as commentary about your progress on your own pet project.
P.S. The name is "Poedit", not "PoEdit", "POEdit" or whatever else.