# \[BUG\] libglade, gettext and empty msgstr

**URL:** <https://www.ruby-forum.com/t/bug-libglade-gettext-and-empty-msgstr/104402>\
**Category:** Ruby-Gnome 2\
**Created:** [May 17, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/bug-libglade-gettext-and-empty-msgstr/104402 "2007-05-17T16:12:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 17, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/bug-libglade-gettext-and-empty-msgstr/104402/1 "2007-05-17T16:12:35Z")

</div>

Hi,

the default behaviour of gettext is, that if a msgstr is empty the text  
from the msgid is displayed. This works perfectly with strings that are  
extracted from ruby files. But if the string comes from a glade file and  
is not translated the original string is not shown.

I use ruby gnome from CVS.

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/bug-libglade-gettext-and-empty-msgstr/104402/2 "2007-05-19T16:30:47Z")

</div>

Hi,

On Thu, 17 May 2007 15:45:17 +0200  
Detlef R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> the default behaviour of gettext is, that if a msgstr is empty the text  
> from the msgid is displayed. This works perfectly with strings that are  
> extracted from ruby files. But if the string comes from a glade file and  
> is not translated the original string is not shown.
> 
> I use ruby gnome from CVS.

Could you show us your sample ?

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 28, 2007, 3:25pm UTC](https://www.ruby-forum.com/t/bug-libglade-gettext-and-empty-msgstr/104402/3 "2007-05-28T15:25:24Z")

</div>

Am Samstag, den 19.05.2007, 23:29 +0900 schrieb Masao M.:

> > is not translated the original string is not shown.
> > 
> > I use ruby gnome from CVS.
> 
> Could you show us your sample ?

Hi,

first sorry for the long delay on response, but i was on holidays 🙂

You can download my app from here:

[http://det.cable.nu/kloetzle/index.rbx](http://det.cable.nu/kloetzle/index.rbx)

The lines in the po-file that make problems you’ll find in  
po/de/kloetzle.po 504 and 509.

The source file that uses the po and the glade file is  
in /lib/kloetzle/video/config.rb

After i replaced the empty msgstr with a copy of the msgid, the string  
is shown like expected. If it is from interest, the glade files are  
created with glade3.

Cheers  
detlef

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [June 25, 2007, 3:23pm UTC](https://www.ruby-forum.com/t/bug-libglade-gettext-and-empty-msgstr/104402/4 "2007-06-25T15:23:08Z")

</div>

Hi Detlef,

Sorry for late.

On Mon, 28 May 2007 15:04:35 +0200  
Detlef R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Am Samstag, den 19.05.2007, 23:29 +0900 schrieb Masao M.:
> 
> > Hi,
> > 
> > On Thu, 17 May 2007 15:45:17 +0200  
> > Detlef R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> After i replaced the empty msgstr with a copy of the msgid, the string  
> is shown like expected. If it is from interest, the glade files are  
> created with glade3.

I could reproduce “bbbbbbbbbbbbb” becomes empty.  
Then, I recompiled your mo-file using rmsgfmt, it becomes “bbbbbbbb…”.

So I suspect your klotzle.mo file was broken.  
Did you fix this by yourself?

HTH,  
Masao

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [June 25, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/bug-libglade-gettext-and-empty-msgstr/104402/5 "2007-06-25T15:27:09Z")

</div>

Hi Detlef,

Wow, it’s a miracle. Just now, I sended my previous message  
before your message was reached ;).

On Mon, 25 Jun 2007 15:19:52 +0200  
Detlef R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Am Samstag, den 19.05.2007, 23:29 +0900 schrieb Masao M.:
> > 
> > > > is not translated the original string is not shown.
> > 
> > created with glade3.
> > 
> > * * *
> 
> * * *
> 
> ruby-gnome2-devel-en mailing list  
> removed\_email\_address@domain.invalid  
> [ruby-gnome2-devel-en List Signup and Options](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [June 25, 2007, 4:21pm UTC](https://www.ruby-forum.com/t/bug-libglade-gettext-and-empty-msgstr/104402/6 "2007-06-25T16:21:26Z")

</div>

Hi Masao,

about the miracle: i saw someone from japan in my webserver logfiles  
viewing the kloetzle pages. And because i didn’t published this pages  
very far from now i thought on you 🙂 Then i thought about this old  
bug, looked at the actual state and saw that it was solved for me. BTW  
the .mo file was created by GetText.create\_mofiles so the old version  
seems to have a bug.

While we are at bugs:  
some time ago i reported a bug in the libglade ruby bindings. This got  
corrected in CVS some time ago. Because i want to release my kloetzle  
program in the next 2-3 weeks to the public: whats about an other  
ruby-gnome release? I don’t want to force my users to fetch things from  
CVS.

Cheers  
detlef

Am Montag, den 25.06.2007, 22:26 +0900 schrieb Masao M.:

> Hi Detlef,
> 
> Wow, it’s a miracle. Just now, I sended my previous message  
> before your message was reached ;).

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [June 25, 2007, 3:21pm UTC](https://www.ruby-forum.com/t/bug-libglade-gettext-and-empty-msgstr/104402/7 "2007-06-25T15:21:08Z")

</div>

Hi,

with the update to debians unstable tree and with it to the  
libruby-gettext1.8 package (version 1.9.0-1) this problem is gone.

Cheers  
detlef

Am Montag, den 28.05.2007, 15:04 +0200 schrieb Detlef R.:

> > > extracted from ruby files. But if the string comes from a glade file and  
> > > You can download my app from here:  
> > > is shown like expected. If it is from interest, the glade files are  
> > > [http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)
> 
> * * *
> 
> ruby-gnome2-devel-en mailing list  
> removed\_email\_address@domain.invalid  
> [ruby-gnome2-devel-en List Signup and Options](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)
