Automatic Translations with Autolang for Gettext

Problem

  1. Translation = boring
  2. Translation time = €
  3. Cannot be automated

Solution

  1. Translate everything automatically
  2. Correct any errors

Magic

  1. Use Google Translate API
  2. Remove Namespaces (Movie|Name = Nombre )
  3. Preserve String replacements (hello %{name} = Olla %{name} )

Install

http://github.com/grosser/autolang
Copy autolang.rake OR checkout into lib/tasks(if you are using rails, otherwise place it where rake can find it)

(Non-ruby?: install ruby + rubygems + rake-gem)

Usage

rake autolang:translate L=es POT_FILE=x.pot

Example Output

(commandline output, translations are written to "es.po")
Translating...
register
registro
--------------------------------------------------------------------------------
login
inicio de sesión
--------------------------------------------------------------------------------
Your DVD is being built and will be finished soon.
Su DVD se está construyendo y será terminado pronto.
--------------------------------------------------------------------------------
Invitation sent to %{email}
Invitación enviada a %{email}
....
Advertisements

One thought on “Automatic Translations with Autolang for Gettext

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s