Tuesday, June 23, 2009

If at first you don't succeed

I decided to look into po4a and its configuration file, hoping that it would be a better solution than svn hooks. Turns out it was a dead end. Using the configuration file will only help keep the translated documents updated (for example, the Norwegian version of gsoc.wml), but it doesn't do much for the pot and po files.

I have, however, received good feedback on the email I sent to the tor-gsoc mailing list last week, asking for suggestions and ideas regarding my solution with svn hooks. One of the suggestions was to have a script that one can run any number of times, and if the input hasn't changed it won't do anything.

So, my new and improved plan is to take the hooks that I have, clean up the code and, instead of checking for new files in a revision/transaction using svnlook, checkout/update a working copy of the HEAD and find out what files I need to update from svn up.

Some questions have been raised as to what should be done with Pootle. At the moment, Pootle needs to be restarted to learn about new files. The good news is that this will be improved in the next version, where one can tell Pootle to rescan for files from the admin interface. A possible, but not pretty, solution could be to have a cron job that runs the script and restarts Pootle once a day.

No comments:

Post a Comment