PledgeBank is now available in Esperanto. Getting this translation up and running was very instructive. During the process, we found numerous strings missed from the translation file, a variety of interesting bugs, and had to make various improvements all over the place (things that are the same in English whether something is singular or plural are not so in other languages, and the fonts that we use for PDF posters don’t contain the glyphs needed, to name but two examples).
Many thanks go to Tim Morley, the translator, who now finds himself having to respond to any Esperanto contact emails we get (sorry!) 🙂
Spanish also went live recently (thanks Hugo!), Russian and Ukranian are both near completion, German is on its way, and there are others we’ve heard about too, like Greek and Polish.
…and I think I’ve ignored the last two or three “hassle”s I’ve received. 🙂
PledgeBank is quite an unusual site. Many international websites simply need translation (e.g. Debian in Chinese), there aren’t any data items which vary between regions. Others have multiple international markets, with a special website tweaked for each one (for example Amazon in Canada, which has some French and English text on every page).
PledgeBank is slightly different. First of all the interface needs translating into other languages, like Debian. And we don’t quite have markets like Amazon. Partly this is because we don’t yet know what our markets are, so we just make sites for every country and language combination. We have pledges, which have both a local area and a language associated with them. We’ve also got global pledges.
All this means that sometimes pledges and text in multiple languages gets shown on one page. For example, if your browser is configured for the Brazilian language, and you are in Brazil, then www.pledgebank.com will look like this. At the time of writing there is only one Brazilian pledge, so below it we show some global pledges in English as examples.
We use some software called GNU gettext to do our translations. Obviously, I’m not telling the truth – people do the translation, gettext just substitutes the translations into the pages. It’s a great piece of software, simple, old, well used and supported, with good tools for translators to update translations with.
For some time there’s been a bug in PledgeBank. On certain pages the language can change back and forth several times, and gettext would start returning translations for earlier languages rather than the current one. I’m setting the
LANGenvironment variable to tell it what language to use. After much debugging and an email to GNU, it turns out that this is to do with gettext’s cache. The cache was behaving differently on FreeBSD and Linux, which was confusing me even more.
To clear the cache you rebind the text domain, that is call
textdomain(textdomain(NULL)), after changing the environment variable. This makes everything work happily everywhere. And the main point of this post is to get that nugget into search engines, so anybody else with the same problem has a hope of finding out..
Today, I have been working on YourConstituencyMailingList (which will thankfully not be its final title, I keep spelling Constituency wrong myself 🙂 ). The database now has knowledge of which member of a YCML is the MP, and records comments made by that person, so that they can appear differently in the thread of comments. Also comment email alerts for when new comments are posted to a particular message; I guess I should add RSS feeds of comments, messages, and so on too. A Welsh translation of PledgeBank is coming along nicely, hope to have that up as soon as it’s ready.
I guess I should post the photos from our week in Wales. An excellent time was had by all, and I haven’t had to eat since. 😉 We started testing PledgeBank in Portuguese (many thanks to Fabiana for the translation), worked on YCML and what to do with international pledges, and more, all whilst sharing a 26.4k (if we were lucky) dial-up connection. I also began getting to grips with juggling, something I’ve always wanted to do but never got around to. 🙂
In the three days since PledgeBank launched we’ve had lots of people from around the world asking if they could help translate the site into other languages. We’d love for this to happen, but in order to do so the site needs to be adapted to work in different tongues. The system we plan to use is gettext, and we’re looking for a volunteer to take a lead on making this happen. So if you’ve direct experience with gettext, or you think you could bend it to your will, please get in touch.