Crowd Localizing Under Version Control
Join the DZone community and get the full member experience.Join For Free
although managing all your code via a version control system is a good approach, it becomes tricky when particular files need to be translated, especially when crowd translation is planned. it is not just about sending files to the localizing agency and storing the result in the version system. in this case you have to provide an intuitive localizing system where non-technical people can simply enter the localized text. anything technical, e.g. synchronizing the localized content with the versioning system, should run in the background.
these features are available out of the box in the launchpad platform. however, this platform can only host projects versioned in the bazaar version control system. while bazaar is used for many well-known projects like ubuntu, mysql or inkscape, it is not as popular as git. unfortunately, the most popular platform for git based projects, github , doesn't cover this scenario at all.
but let’s not give up just yet. the localization process can be divided into two parts. the source files can be kept in your favorite versioning platform, while, a dedicated web-based localization management tool translates them. both systems can communicate via platform apis.
localization management tools, namely transifex , crowdin , poeditor or get localization , are ready for crowdsourcing, they offer intuitive user interfaces and can be accessed externally via api. unlike any custom solution they even offer to leverage their localizing communities for you. make your project public and current users can openly request to join your team.
a few months ago i stumbled upon the txgh ruby project that aims to integrate transifex with github. it uses the api of both systems to synchronize them. it runs its own embedded server to process the incoming events. i like the idea, but a ruby-based solution doesn't fit well within my java ecosystem. so i implemented it in java as a servlet application, which can run on apache tomcat with my other apps. it actually simplifies my environment as no extra embedded server is required.
how it works
both transifex and github can send post requests when specific events happen. the specific java servlet can process these requests and when particular ones are detected, it can synchronize the updated content. what needs to be synchronized is specified in the configuration file.
if both transifex and github projects are set properly, the resource for translation (specified in the configuration file) should be fetched into transifex automatically and updated whenever it is changed in github.
once this resource appears in transifex, everyone can translate it. every language is processed separately and only recommitted to github after it is fully translated and verified. when completed, localized files should never be modified directly via github as they will be out of sync and any changes would be lost during subsequent updates.
further details can be found on project page https://github.com/drifted-in/txgh
btw, do you like astronomy? would you like to support one of my projects? are you impatient to see this all in action? follow this link https://www.transifex.com/projects/p/planisphere/ :-)
Opinions expressed by DZone contributors are their own.