Will's blog

purpose: Will Kahn-Greene's blog of Miro, PyBlosxom, Python, GNU/Linux, random content, PyBlosxom, Miro, and other projects mixed in there ad hoc, half-baked, and with a twist of lemon

[home | blog home]

Fri, 20 May 2011

Miro 4.0: now with swedish chef!

A while back, Ned Batchelder wrote about poxx.py which he wrote that generates a completely translated .po file to help find strings in his apps that weren't being translated.

We on the Miro dev team had a similar need. Additionally, we have the problem where in some languages, the translated string is longer than the English version and that creates some sizing issues in the ui code.

I took Ned's poxx.py, fixed some issues I had with it, then rewrote the transform to do something reminiscent of what the Swedish Chef would say. The transform has the following properties:

  1. the output is vaguely readable
  2. the output is longer than the input which helps us find ui issues
  3. the output is clearly distinguished from English which helps us find strings that aren't getting translated
  4. the output is mildly amusing which is sometimes important in dark times

I threw it together in an hour. It's not a beautiful transform and it doesn't add any "bork bork bork". I might tweak it some rainy day.

It's in our git repository here:

https://git.participatoryculture.org/miro/tree/tv/resources/locale/poxx.py

It'll also be in Miro 4.0. You can choose the Swedish Chef language in the language dropdown in the Preferences dialog. It's "swch" and it'll be towards the bottom.

Also, skimming the comments of Ned's entry, there's another tool that does this:

http://translate.sourceforge.net/wiki/toolkit/podebug

Want to comment? Send an email to willg at bluesock dot org. Include the url for the blog entry in your comment so I have some context as to what you're talking about.


pyblosxom::1.5.3.wgkg

Copyright 1996 to 2013, Will Guaraldi Kahn-Greene, under the Creative Commons BY-SA 3.0 license

Creative Commons License
Will's Blog by William Kahn-Greene is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.