Upcoming changes to the Web Translate It client

By Edouard on March 22, 2010

A few changes have been made to the API and to the ruby client. Changes on the API are backwards compatible, so it won’t affect any projects. However you will need to make a very tiny change to your projects if you upgrade the client from the current version (1.5.2) to the next version (1.6). If you don’t use the Web Translate It client, no action is necessary.

Changes to the API

Until today, calls to the File API to download or upload a file were using the id of the “master language file”, even to access a target file.

For example, for the project Web Translate It, in which the source language is English and the target language French, calls had to be like so:

English: webtranslateit.com/api/projects/…/files/1941/locales/en

French: webtranslateit.com/api/projects/…/files/1941/locales/fr

From now on, you can also fetch the target language files by using the target language file ID, which gives:

English: webtranslateit.com/api/projects/…/files/1941/locales/en



It makes things easier when programming tools with the API. This change is backwards compatible, so it won’t affect the current client or any tool you developed.

Upcoming changes to the client

You currently have to setup a configuration file which looks like so:

api_key: 'sekret'
ignore_locales: :en

# A list of files to translate
  1941: app/[locale].yml
  1943: defaults/[locale].yml

There are several problems with this approach.

  • it is a bit complicated to set up and requires the user to configure the project at two different places: on Web Translate It and on your project itself.
  • it makes too many assumptions. For example, it assumes that you want to have a file named pt_BR.yml for brazilian portuguese, although maybe you’d rather use pt-BR.yml. Also, sometimes the file extension changes depending of the language. For example you might want to have en.pot and de.po files.

To fix these issues, the upcoming version 1.6 will take another approach. All the configuration will take place in the File Manager, in which you will to set up the complete relative path of your language files. Your configuration file will now be much simpler:

api_key: 'sekret'

The File Manager will have to have the complete file paths like so:

The upcoming version of the client will be released early this week. Thank you for using Web Translate It.