First off, I am using ruby 1.8.4 installed under Ubuntu Breezy Badger, with ruby-gettext 1.5.0 installed as a gem. I have found a weird behavior with rgettext parsing certain .rb files. Whenever rgettext encounters a file containing an array whose first element is being accessed in the code, I get the following error: "numeric literal without digits" For example, if I include the following code: // test.rb line ... 10 a = [1,2] 11 a ... and I run : > rgettext test.rb I get the following result # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2006-06-04 00:47+0200\n" "PO-Revision-Date: 2006-06-04 00:47+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <email@example.com>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" numeric literal without digits Exit 1 If I remove that piece of code, it all runs smoothly. Would anyone know what that error could be caused by ? Is there any way to fix it ?
on 2006-06-04 03:08
on 2006-06-04 08:25
Hi, Your problem is similer with this FAQ: http://www.yotabanana.com/hiki/?ruby-gettext-faq#r.... Actually, your code works on my linux box. % ruby -v ruby 1.8.4 (2005-12-24) [i686-linux] Confirm your ruby version again ? On Sun, 4 Jun 2006 08:08:33 +0900
on 2006-06-04 19:52
> Hi, > > Your problem is similer with this FAQ: > http://www.yotabanana.com/hiki/?ruby-gettext-faq#r.... > > Actually, your code works on my linux box. > % ruby -v > ruby 1.8.4 (2005-12-24) [i686-linux] > > Confirm your ruby version again ? I am on ruby 1.8.4: > ruby -v ruby 1.8.4 (2005-12-24) [x86_64-linux] I am on AMD64. Is this the problem ?
on 2006-06-04 22:39
On 6/4/06, Maxime C. <firstname.lastname@example.org> wrote: > > I am on ruby 1.8.4: > > ruby -v > ruby 1.8.4 (2005-12-24) [x86_64-linux] > > I am on AMD64. Is this the problem ? Maybe not. Your code as posted works fine for me, and: $ uname -a Linux monarch 2.6.9-1.667smp #1 SMP Tue Nov 2 15:09:11 EST 2004 x86_64 x86_64 x86_64 GNU/Linux $ ruby -v ruby 1.8.4 (2005-12-24) [x86_64-linux] and I'm using gettext (1.5.0) Stuart
on 2006-06-05 02:51
I guess there must be something wrong with my configuration. The ruby binary compiled for my distrib is probably at fault. I'll see in the future if I have the same problem again. Thanks for your help.