From Sim-Im
Revision as of 18:24, 1 May 2009 by Shaplov (talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to navigation Jump to search

From time to time it is useful to synchronize current .po files (files with interface messages translated into different languages) with messages from source code. Developers occasionally changes interface and this changes should be imported into i18n files.

Sim-IM i18n system was developed using kde3's i18n tools, so to extract messages from source code you will need special version of xgettext: kde-xgettext. It can be downloaded here. (Do not forget to rename executable file into kde-xgettext after building). If you are using debian-powered OS, you may build kde-xgettext package using ubuntu's rules files

After getting kde-xgettext, you should create build-dir as you do while building Sim-IM and generate make files with ENABLE_TARGET_UPDATE_MESSAGES option turned on

 cmake -D ENABLE_TARGET_UPDATE_MESSAGES:boolean=true [path to source dir]

As a result you will get makefile with special target 'update-messages' in it. Run it!

 make update-messages

Make script will scan all the source code, extract all messages that should be translated and put them in po/sim.pot file, and merge them with existing translations in po/*.po files. Previous versions of i18n files will be saved in po/*.backup, so if you want too keep old data, do not run updating twice.

Then check if everything is ok, and commit updated messages into repository, hope you know how to do it ;-)