hi all my app has two languages, I''m using gettext to manage them and so far so good. My question is about maintenance. If I fix a typo in a _() enclosed string, for example in an rhtml file, then the translated version of that string will no longer be valid will it? even if the translation itself had no errors. Is that the case and if so will i be forced to have the _() string re-translated every time there''s even a small change in them or is there a better way of updating the source string without changing the translation? thanks al
You can use a "dummy" language in your source code, and then "translate" into your litteral language. IOW, use a "Developer''s English" (yeah, the one full of spilling mistakes...) in the source wich you then translate into "High English" as a first target language. Then never change the Developer''s English, but only the "translation". (Unless, of course, the actual structure of your text/pages changes -- but then you would have to retranslate in any case). On 6/24/06, Alan Bullock <liststuff@gmail.com> wrote:> hi all > > my app has two languages, I''m using gettext to manage them and so far so > good. My question is about maintenance. If I fix a typo in a _() enclosed > string, for example in an rhtml file, then the translated version of that > string will no longer be valid will it? even if the translation itself had > no errors. Is that the case and if so will i be forced to have the _() > string re-translated every time there''s even a small change in them or is > there a better way of updating the source string without changing the > translation? > > thanks > al > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- http://railfrog.com/ RailFrog, the user-friendly, open-source web site deployment and content management system built with Rails; producing well structured and standards-compliant pages with Web 2.0 goodness.
Hi, On Sat, 24 Jun 2006 16:01:56 +0100 "Alan Bullock" <liststuff@gmail.com> wrote:> hi all > > my app has two languages, I''m using gettext to manage them and so far so > good. My question is about maintenance. If I fix a typo in a _() enclosed > string, for example in an rhtml file, then the translated version of that > string will no longer be valid will it? even if the translation itself had > no errors. Is that the case and if so will i be forced to have the _() > string re-translated every time there''s even a small change in them or is > there a better way of updating the source string without changing the > translation?Ruby-GetText(And GNU GetText) support this issue well. This is the one of the largest reason why we use GetText family. After fixed a string, run updatepo task again. Then, the new msgid appears in your po files and old one move to bottom of the po files like as: #~ msgid "Destroy" #~ msgstr "Destroy" Then, you check the lines and copy and paste it to new msgid. But almost all cases, updatepo task finds new msgid and copy msgstr automatically, so you won''t need to copy and paste by yourself. Thus, small typo in msgid will be changed automatically, but in some case you need it by hands. Anyway My recommandation of the development process: 1. Develop your app in English. (Even you develop your app in your locale, the new messages is showed in English. But you don''t need to re-translate it this time) 2. before releasing it, send new po-files to translaters(or translate it by yourself). So you don''t need to re-translate every time. -- .:% Masao Mutoh<mutoh@highway.ne.jp>