Tech
Up one levelThe following tutorial details the steps I took to internationalize (starting with a Spanish translation) the interface of Plone Translation Hub, a Plone Archetypes-based product.
Not so long ago I found myself in the rather embarrassing position of having authored a translation collaboration tool for use by an international user base without having implemented the platform's (Plone) internationalization (i18n) facilities. That is, I gave the application an English interface and left it at that. Furthermore I began to consider how I might extend this application to enable the more professional users to leverage their existing translation tools, like the industry-standard Trados, rather than being confined to using my application's Web interface when actually performing a translation (even if a cut-and-paste workaround is available). Correcting the first problem and laying the groundwork for solving the second entailed giving myself a pretty extensive lesson in both open standards and Open Source software for Computer Aided Translation (CAT), which I summarize below.
Today for a site using Plone Translation Hub I had to programatically update the roles for all users who had logged in since March 9th, given that this group was known to be responsible enough to be worthy of the "Reviewer" role. One of the site managers asked that I simply run a "SQL query" to do this--if only it were that easy! Actually it's not that much harder with the ZODB, but it took me a while to find the "userFolderEditUser" method that I needed to do this, which was frustrating. I ended up simply using a temporary script object placed in the root of the portal:
Over the last couple of days, I put together some reStructuredText tools for gedit, the lightweight text editor for the Gnome desktop on Linux. They include syntax highlighting, some keyboard shortcuts, and an HTML preview feature that I derived from another developer's earlier work on Markdown support.