Here’s what I’ll be working on in the coming weeks, and why it may look like not much is happening Form Tools-wise… All the following features relate to Open Translate, Form Tools’ translation management script.
1. Google Translate
In the last couple of years Google has come out a number of extremely cool stuff relating for translation, including the Google Translate API which allows developers to translate content via their own scripts. For the foreseeable future, automated translation of text is never going to be as solid as that done by a real translator, but it’s a good start. My plan is integrate Google Translate API with Open Translate to provide a base translation of all languages that they offer. These translations will then be open for other translators to review and improve.
Depending on the quality of the translations, this should significantly reduce the amount of work for translators as well as provide an initial – albeit bug-laden – translation file for many languages that haven’t been tackled yet. These languages will then be bundled with the main download file so that people can choose their language right in the installation script. To encourage better translations for all of us, I’ll be storing the Reliability Percentage (see: translations.formtools.org) of each translation in the corresponding translation file. Until that percentage is > 90% (or something), I’ll include a link in the admin UI to encourage non-English speaking users to help translate their language.
2. Data Versioning
So… this is a fun one! A little backstory first. I wrote Open Translate (opentranslate.org) a couple of years ago to properly handle community translations, and up until now it’s held up pretty well. But now that Form Tools 2 is out of Beta, I need to complete a feature that I spec’d out but never completed: versioning. The text that needs to be translated for Form Tools 2.0.0 is now FIXED, I won’t be modifying it. This is going to be the case for all “final” releases from now on. You’ll be able to download a translation file for whatever version you’re using. [I HATE WordPress’s annoying “You’re version is out of date! Upgrade now!” line that appears at the top of the screen every few weeks to persuade people to upgrade. I won’t ever do that. You can stay on v2.0.0 for years to come if you want, and I won’t bug you. Promise. 🙂 ]
So anyway, the goal is to allow translators to be able to pick a version that they want to translate – whatever version of the script is relevant for them.
Now here’s the catch: I don’t want to duplicate any text + translations for each version (2.0.1, 2.0.2 etc). I want all of them to share the same text + translations as much as possible to minimize the amount of work done (one of the golden rules of software development is duplication == bad!) Also, if a user is running 2.1.8 and translates some text that’s been unchanged & untranslated since 2.0.0, I want that translation to be automatically added to ALL versions from 2.0.0 onwards.
As you can imagine, this is getting complicated! Neat problem, huh?
My original plan was to base Open Translate entirely on SVN (Subversion), which so that all translations and data were versioned. Subversion is just that: it’s a versioning tool that keeps a repository of all data and offers ways to slice and dice the information depending on what you need. In fact, this is the script that powers the Form Tools upgrade mechanism and helps generate the custom zipfiles containing whatever files have changed since your last version. It’s used on this site to keeps a giant database of all Form Tools files: themes, modules, API and Core.
Despite its many virtues, after much hemming and hawing I decided against using it for Open Translate. Partly for technical reasons that I won’t go into, but also partly because Open Translate would still have needed a duplicate database of the data and translations o allow for quick searching and access of the data via a web-based UI.
So…. long story is that I’ll now be adding in versioning support to Open Translate. I have it all sketched out and it’s a thing of beauty.
3. Module Translations
This is something I’ve been hopelessly delinquent about. Once the above two are complete I’ll be adding the option for modules to be translated as well. Right now all of them have a single, English language file. Weak!
And that’s all folks.