Monday 28 November 2011 5:39:40 pm
For those who don't know, ezlupdate is a fancy CLI tool that helps you create or update translation files (*.ts) from the strings you have in an extension for instance. These translation files can then be used with Qt Linguist.
This article will describe how to get this useful tool on MacOSX.
Once upon a time, there used to be a DMG file that you could download in order to install that tool with an installer, but it's not been updated for a long time and won't work with Mac OSX 10.7 Lion, since it doesn't support PowerPC apps any more.
The only alternative is to compile it from the sources available in your eZ Publish instance. ezlupdate is written in C++ with Qt.
Following commands need to be executed from a terminal, whatever the folder.
First check that MacPorts is up-to-date :
sudo port -d selfupdate
Then install Qt4 :
sudo port -d install qt4-mac
This can take a while since MacPorts will compile Qt4, so please go grab a cup of coffee (or tea if you prefer) :).
This operation needs to be done from ezlupdate sources directory which are located under share/ezlupdate-qt4.5/ezlupdate .
cd support/ezlupdate-qt4.5/ezlupdate qmake ezlupdate.pro make
If everything went OK, the binary will be found in bin/macosx under the main eZ Publish directory. You might want to have it in all your eZ Publish projects. If so, just copy the binary to a place registered in your $PATH, like /opt/local/bin :
sudo cp bin/macosx/ezlupdate /opt/local/bin
From now on, you'll be able to use ezlupdate to create and/or update your translation files.
You'll find some help this way :
Create an fre-FR translation file for myfancyextension extension and create the untranslated file as well :
cd /path/to/ezpublish ezlupdate -e myfancyextension -u