Saturday, August 21, 2010

How to run a Messages.sh file to create your .pot file

Some people regularly ask me how to create the .pot file of their program. They know the Messages.sh file is the key for it but they also realize that doing

cd /path/to/my/project
bash Messages.sh

Does not really work and then they are a bit stalled.

The answer is quite simple, but you need to know it ;-) You have to run the extract-messages.sh script that lives in the l10n-kde4/scripts

That still will fail as the script tries to save the .pot files in a folder called "po", so all in all these are the commands to get the .pot file of your project


cd /path/to/my/project
mkdir po
bash /path/to/l10n-kde4/scripts/extract-messages.sh


And that's it :-)

3 comments:

Anonymous said...

Thank you so much for this! I need to regenerate the .pot for Basket and was at a loss for how to do it. Thanks again!

Unknown said...

For future reference, the scripts can be found in:
svn co svn://anonsvn.kde.org/home/kde/branches/stable/l10n-kde4/scripts

Alexander Potashev said...

Now you also need "mkdir enpo".