From: Laurent Sansonetti Date: 2005-03-08T03:42:56+09:00 Subject: Re: Using (x)gettext with Ruby files Hi, On Mon, 7 Mar 2005 16:52:53 +0900, Sascha Ebach wrote: > Hi, > > I want to localize some Ruby files and was trying to use xgettext. It > doesn't support Ruby as a language. All I want to do though is extract > everything within _("") and _(''). Are there any recommendations on how > to use gettext / xgettext with Ruby files? When I run xgettext through > my files I get messages like these: > > xgettext: warning: file `helpers/application_helper.rb' extension `rb' > is unknown; will try C > > and > > controllers/page_controller.rb:39: warning: unterminated character constant > > The second message comes from a comment which includes a ' > > # ... don't ... > > Obviously it nows nothing about Ruby. > > I also found rgettext, but it's functionality is very limited. > > How do you extract your strings from your Ruby files? > In Alexandria (alexandria.rubyforge.org) I use rgettext from Ruby-GetText package, as follow: rgettext -o And it works perfectly, since the beginning. It supports splitted strings with + or \. HTH, Laurent