eZ Community » Blogs » Jérôme Vieilledent » Getting ezlupdate for MacOSX

By

Getting ezlupdate for MacOSX

Monday 28 November 2011 5:39:40 pm

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

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.

Tools that you'll need

  • Latest XCode (main developer tools from Apple, with all needed compilation tools). You can get it for free from the App Store.
  • MacPorts (CLI tool providing easy commands to compile/install/remove programs, similarly to apt-get or yum). Please follow the installation steps from the website.
  • Qt4 (to be installed via MacPorts)

Installing the dependencies

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) :).

Compiling ezlupdate

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

Using ezlupdate

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 :

ezlupdate --help

Create an fre-FR translation file for myfancyextension extension and create the untranslated file as well :

cd /path/to/ezpublish
ezlupdate -e myfancyextension -u 

Enjoy !

Proudly Developed with from