Forum: Rails I18n i18n translators tools

Posted by pejuko (Guest)
on 2010-08-10 15:27
(Received via mailing list)
Hi,

there is new tool for handling translation files. You can install it
using command

gem install i18n-translators-tools

This package brings you useful utility and library which can help you
to handle
locale files and translations in your Ruby projects. Offers also built-
in simple
console editor. Supported formats are YAML, Ruby, Gettext po, QT
Linguist TS and
Java Properties.

It can
-- convert between various format (yml <=> rb <=> po <=> ts <=>
properties)
-- merge
-- statistics
-- translate (built-in simple text translator)

There are also some backends for i18n library:

-- I18n::Backend::Simple.send(:include, I18n::Backend::Translator)
   (Extended format. i18n-translators-tools brings extended format)
-- I18n::Backend::Simple.send(:include, I18n::Backend::PO)
-- I18n::Backend::Simple.send(:include, I18n::Backend::TS)
-- I18n::Backend::Simple.send(:include, I18n::Backend::Properties)

Read README.md file and run i18n-translate without parameters
for more information.

source code are at github:
http://github.com/pejuko/i18n-translators-tools
Posted by pejuko (Guest)
on 2010-08-10 15:41
(Received via mailing list)
oops, actualy, there is a typo:

> There are also some backends for i18n library:
>
> -- I18n::Backend::Simple.send(:include, I18n::Backend::Translator)
>    (Extended format. i18n-translators-tools brings extended format)

backend for the extended format is:
I18n::Backend::Translate
Posted by Andrés Gutiérrez (andresgutgon)
on 2010-08-10 16:07
(Received via mailing list)
2010/8/10 pejuko <pejuko@gmail.com>

> oops, actualy, there is a typo:
>
> > There are also some backends for i18n library:
> >
> > -- I18n::Backend::Simple.send(:include, I18n::Backend::Translator)
> >    (Extended format. i18n-translators-tools brings extended format)
>
> backend for the extended format is:
> I18n::Backend::Translate
>
Could you put an usage example with a rails App (2.3.x or 3.0.x)?
An example of a simple UI interface to translate App files.
Posted by pejuko (Guest)
on 2010-08-10 16:27
(Received via mailing list)
Well, there is simple standalone web translator as a working example:
http://github.com/pejuko/i18n-web-translator

It is written using framework ramaze (I have sent it there because
this group is enlisted as a mailing-list for the i18n-library)

However, the scenario for using this tool is following:

In your application you just include backend
I18n::Backend::Simple.send(:include, I18n::Backend::Translator)

for your locales you need to have some default file (eg. default.yml
in eg. locale directory) and then you can use i18n-translate tool
for merging files. If you want to use PO files then you need include
also I18n::Backend::PO etc.

I also recomend to use fallbacks plugin.
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)

Some usage examples are also in README.md file:
http://github.com/pejuko/i18n-translators-tools/blob/master/README.md
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.