---------- Vidaresend melding ----------
Emne: source file lookup Dato: Torsdag 5. november 2009 Frå: Nick Shaforostoff shaforostoff@gmail.com Til: kde-i18n-doc@kde.org
Hi all.
Probably all of you noticed that 'Unit metadata' toolview of Lokalize lists source (usually .cpp) files that contain current message. To make these links actually work some setup has to be done.
First of all remember that original SVN directory structure must be retained, because all the scripts use relative paths.
I already done the setup for Russian and commited it's results to SVN, so that now any Russian translator who has l10n-kde4/scripts directory checked out (and appropriately placed in his filesystem) gets it immediately for free. Of course he also needs a complete Lokalize installation (for example on debian one has to install all the packages suggested by 'lokalize' -- see http://packages.debian.org/sid/lokalize)
You can see how it looks like at http://websvn.kde.org/trunk/l10n-kde4/ru/ Whether to commit the setup to your lang's SVN or not, it is your decision.
MYLANG=fr cd l10n-kde4 svn up scripts svn up -N ru svn up ru/lokalize-scripts mkdir $MYLANG/lokalize-scripts cp ru/lokalize-scripts/opensrc.rc $MYLANG/lokalize-scripts/opensrc.rc
you need to have lokalize project file in MYLANG directory, for example for Russian it is called ru/index.lokalize
this basically makes scripts/lokalize/opensrc.py script visible to Lokalize when it loads $MYLANG project
after completing these procedures start Lokalize and things should work
I've just extended this opensrc.py script to do web file lookup on lxr.kde.org, but it still first looks up source files locally if you have them checked out. In this case it is very handy to have 'locate' commandline tool set up (it indexes all the files in the system once a week and works much faster than 'find'; debian users should do apt-get install mlocate)
If you have problems setting things up, just ask me on this list, providing as much of details regarding your system as possible.
-------------------------------------------------------