Thursday, July 9, 2009

So far, so good

Today has been the day of testing code, fixing minor bugs and testing some more. I had 9 items on my list and I have managed to do 8 of them. The items are pretty much the same as the ones described in the previous post. I figured I'd do the last item tomorrow and then go through the list one more time.

Step 1:
Set up a repository with a website module and a translation module.

Step 2:
Put wml files in the english directory in the website module.

Step 3:
Make sure pootle reads the translation module.

Step 4:
Run wml2po to convert the wml files to po files and put them in the translation module.

While converting and updating the files, I noticed that files were being committed to the repository even though they had not changed. Or so I thought. It turns out that a few of the comments in the files would change every time I ran the script. The solution was to modify one of the regular expressions in the script to exclude a certain type of comments as well.

Step 5:
Restart pootle so it can detect the new files.

Step 6:
Translate a few strings using the pootle interface.

Step 7:
Commit using the pootle interface.

After a little back and forth I managed to give my user the right permissions. Translating and committing files using the pootle interface went without any further problems.

Step 8:
Run po2wml to convert the po files back to translated wml files.

I noticed that the script would convert the english po files back to english wml files. This certainly doesn't make much sense, and so the problem was fixed with an if statement.

Step 9:
Build and deploy the website.

Building the website is the one thing I haven't done today, and it is the first thing I'll do tomorrow.

No comments:

Post a Comment