MailingList


Translating text

View: New views
2 Messages — Rating Filter:   Alert me  

Translating text

by m.a.m.vanbeek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I was hoping someone here knows a solution or package that can make the
following happen:

Assuming the following:
1) On a server with Ruby on Rails a website has been made using
Globalize to handle translations
2) All data for a certain locale has been added to the database

Doing this:
1) Get all items from the database in the default locale and check if
the translation in the current locale exists
   if this translation doesn't exist, then display a translation form in
the browser (view), to enable a translator to
   add the translation
2) Get all items from the database in the default locale and the total
amount of translations/percentage completed for
   different (predefined) languages and display them in the browser

Further wondering the following:
   Is there a script/program which can scan all views and make sure all
translatable strings are translated by Globalize
   I.e. <a href="some link" title="funky">Click here</a> =>
          <a href="some link" title="<%= "funky".t %>"><%= "Click
here".t %></a>
   And save these changes to a temporary file (like .updated.rhtml), so
a reviewer can look for mistakes made by the
   script/program.

I hope someone can make sense out of this,

Thanks in advance,
Mark

Re: Translating text

by davidnwelton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 1) Get all items from the database in the default locale and check if
> the translation in the current locale exists
>    if this translation doesn't exist, then display a translation form in
> the browser (view), to enable a translator to
>    add the translation

There's some code floating around there to do this.  If I have a bit
of time, I'll try and package up what I have.

> 2) Get all items from the database in the default locale and the total
> amount of translations/percentage completed for
>    different (predefined) languages and display them in the browser
>
> Further wondering the following:
>    Is there a script/program which can scan all views and make sure all
> translatable strings are translated by Globalize
>    I.e. <a href="some link" title="funky">Click here</a> =>
>           <a href="some link" title="<%= "funky".t %>"><%= "Click
> here".t %></a>
>    And save these changes to a temporary file (like .updated.rhtml), so
> a reviewer can look for mistakes made by the
>    script/program.

That would be handy indeed!

--
David N. Welton
http://www.welton.it/davidw/