# Gettext and maintenance

**URL:** <https://www.ruby-forum.com/t/gettext-and-maintenance/64346>\
**Category:** Rails\
**Created:** [June 24, 2006, 5:02pm UTC](https://www.ruby-forum.com/t/gettext-and-maintenance/64346 "2006-06-24T17:02:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![orotone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/90db22/32.png) [@orotone](https://www.ruby-forum.com/u/orotone)\
**Post date:** [June 24, 2006, 5:02pm UTC](https://www.ruby-forum.com/t/gettext-and-maintenance/64346/1 "2006-06-24T17:02:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![orotone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/90db22/32.png) [@orotone](https://www.ruby-forum.com/u/orotone)\
**Post date:** [June 24, 2006, 7:26pm UTC](https://www.ruby-forum.com/t/gettext-and-maintenance/64346/2 "2006-06-24T19:26:09Z")

</div>

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 B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> thanks  
> al
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
[http://railfrog.com/](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.

---

<div class="post-metadata">

**Author:** ![orotone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/90db22/32.png) [@orotone](https://www.ruby-forum.com/u/orotone)\
**Post date:** [June 25, 2006, 4:47am UTC](https://www.ruby-forum.com/t/gettext-and-maintenance/64346/3 "2006-06-25T04:47:19Z")

</div>

Hi,

On Sat, 24 Jun 2006 16:01:56 +0100  
“Alan B.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.
