On Thu, 25 Feb 2010 14:16:17 +0900
Martin André <[email protected]> wrote:

> Is there an easy method to tell Pootle that my files have to be 
> processed through po2prop before the commit? 

yes there is Mozilla contributed a "hooks" feature to pootle where you
can write scripts to be run before or after certain events.

you need to create a python file inside the pootle/scripts/ directory.
with filename being the same as your project code.

functions inside that file named after the hooks get called when the
corresponding event happens (initialize, precommit, postcommit,
preupdate or postupdate).

check pootle/scripts/sumo.py for example hooks and
pootle/scripts/hooks.py for the implementation details.

we never used this feature in translate (though we think it's a cool
idea) and we don't actively test it. so hopefully someone from mozilla
will offer some help here.

on a longer term these hooks won't be needed for properties files,
the upcoming 2.1 version of Pootle will support Java properties as well
as php arrays, QT ts, TMX, TBX and various subtitles formats.

you can already test this functionality by checking latest svn trunk,
but it is still far from ready. (feedback and patches are most
welcome :-)

cheers,
Alaa

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to