Sascha Ebach
3/7/2005 10:51:00 PM
Laurent Sansonetti schrieb:
> Hi,
>
> On Tue, 8 Mar 2005 06:39:00 +0900, Sascha Ebach
> <se@digitale-wertschoepfung.de> wrote:
>
>>Laurent Sansonetti wrote:
>>
>>>In Alexandria (alexandria.rubyforge.org) I use rgettext from
>>>Ruby-GetText package, as follow:
>>>
>>>rgettext <ruby_files> -o <pot_file>
>>>
>>>And it works perfectly, since the beginning. It supports splitted
>>>strings with + or \.
>>
>>I will have a look at that, but what if you have lots of <ruby_files>?
>>there is a limit on how many files you can pass as arguments. I suspect
>>I will probably have to modify rgettext. Maybe it could accept a glob.
>>
>
>
> I do not think there is a limit (except your shell's, or maybe Ruby
> itself). Actually I ran it with 38 files at once, without any problem
> :)
The shell has the limit I think. That is the reaons for programs like
xargs. Try it with 300 or 1000 files to see what I mean.
Now that I have thought about it, it shouldn't be that hard to patch up
rgettext.
Did you try to use rgettext on eruby files? If yes, did it work? You
could have something like this:
<html>
<body>
Use gettext for l18n. It has the ability to extract strings via a
function like this _("This text will be translated").
<%= link_to _("Documentation") %>
...
_("This text will be translated") should not be translated. But
everything in between <% .. %> should.
Sascha