Automatically create POT file

Translations of Suffusion into other languages. This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.
Forum rules
This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.
Locked
kaotiko
Posts: 2
Joined: 18 Nov 2011, 15:42

Automatically create POT file

Post by kaotiko » 18 Nov 2011, 16:14

Hi!

I was looking for a trick to automatically regenerate the translation file and finally I found a nice solution.
I'm using linux and don't know if a similar solution is available in windows, but I know that exists the gettext function for windows.... don't know....

Download and extract suffusion theme and In terminal you must go to the path of the extracted folder and execute the next command:

find . -iname "*.php" | xargs xgettext -L PHP --keyword=__ --keyword=_e --from-code=UTF-8 -o translation/suffusion.pot


.... and wuala!! here you have a clean, ordered and beautiful template to update your translated files. ;)

Hope this can help somebody :p . See you!!

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: Automatically create POT file

Post by sayontan » 19 Nov 2011, 22:23

There is a file called suffusion.po included with the theme in the translation folder - that is always up to date with the latest version strings. There is an easy way to generate the file. You can zip the theme and upload it to http://www.icanlocalize.com/tools/php_scanner. It will generate the file for you.

Locked