Development Tools

Our development tools are open source and distributed under MIT license. They are freely available at GitHub http://github.com/99translastions so you can easily access it or fork in your own repository to customize the functionality.
General integration idea is to trigger automatic update of new translations from the source code to the web site and also automatic update of translations from the web site back after translators worked on them.
It is better to use the tools in conjunction with a version control system to avoid possible data loss or corruption since the tools by themselves do not provide any backup or version control means
Ruby / Rake plugin
http://github.com/99translastions/ruby-tools the plugin defines 2 rake tasks in order to upload master translations and download translated files from the server.
The plugin is downloadable from GitHub web site and should be installed in vendor/plugins folder of your rails application. After installation you should follow printed instructions (README) and edit configuration file located in config/trans.yml to setup your project API key and provide path to your translation files.
Java / Ant tasks
http://github.com/99translastions/ant-tools is a little Ant (http://ant.apache.org) plugin that enables 2 new tasks in order to upload master translation file and download translation files from the server.
In order to install you should download the module from http://github.com/99translastions/ant-tools/tree/master and run
ant dist. That will create ant-trans.jar file that contains all classes that you need.
Next step will be to define custom tasks in your ant build file as:
<taskdef name="trans-download" classname="DownloadTask" classpath="ant-trans.jar"/> <taskdef name="trans-upload" classname="UploadTask" classpath="ant-trans.jar"/>
With that you can go a head and use trans-download and trans-upload tasks.
Both tasks take 2 common parameters:
- attribute ‘api‘ with value equal to the API key for your project at 99translations.com
- attribute ‘tranlationFile‘ with name of the translation file – note it has to be created manually on the server prior to using this tools
Additionaly trans-download task requires parameter:
- attribute ‘locale‘ with locale value for downloaded file.
Example (test.xml):
<target name="test-upload"> <trans-upload api="232322" translationFile="test.properties" file="test.properties" /> </target> <target name="test-download"> <trans-download api="232322" translationFile="test.properties" file="test_de.properties" locale="de" /> </target>
Make / cURL / Custom Configuration
If your project uses make or shell script as a build system you can easily integrate 99translations.com in it using curl (http://curl.haxx.se/) or wget (http://www.gnu.org/software/wget/) utilities well know in Unix world.
99translations server API consists of 3 HTTP calls:
- http://99translations.com/download/:API_KEY/:FILE/:LOCALE is used to download translated file from the server.
- http://99translations.com/upload_master/:API_KEY/:FILE is used to upload master translation file to the server. Note that file has to be created on the server manually before automatic use.
- http://99translations.com/upload/:API_KEY/:FILE/:LOCALE is used to upload a translation file to the server.
Parameter description:
- :API_KEY – project key provide by 99translations.com on the project page – secret key consists of random set of letters and digits to get access to the server
- :FILE – master translation file name within the project
- :LOCALE – locale of the downloaded or uploaded translation file. Usually language or country code.
Example Makefile2
all_trans: upload de fr
upload:
curl -F upload=@po/proj.pot http://99translations.com/upload_master/24361314445/proj.pot
de:
curl http://99translations.com/download/24361314445/proj.pot/de > po/de.po
fr:
curl http://99translations.com/download/24361314445/proj.pot/fr > po/fr.po