Hi, On Sun, 3 Dec 2006 19:57:40 +0100 "Malte M." <[EMAIL PROTECTED]> wrote:
> Masao Mutoh wrote: > > environment.rb: > > ----- > > require 'gettext' > > GetText.add_default_locale_path("/home/malte/Krakel/eventoj/locale/%{locale}/LC_MESSAGES/%{name}.mo") > > > > require 'gettext/rails' > > ----- > > I changed that to the following: > > ---- > require 'gettext' > include GetText > add_default_locale_path("/home/malte/Krakel/eventoj/locale/%{locale}/LC_MESSAGES/%{name}.mo") > require 'gettext/rails' > ---- > > and it works. It means to include GetText at the toplevel, because > ApplicationController does not exist yet when environment.rb is > executed, but it works. :) > > @Thomas: You're right, if I put rails.mo into locale/eo/ instead of > locale/eo/LC_MESSAGES/, then it is found. Actually, that is a nice > solution, too, and I think I will choose this one. Hm, if this is > a bug, then its source seems to be around line 200 of gettext/rails.rb. > Maybe the line > > locale_path = File.join(caller[0].split(/app.controllers/)[0] + > "locale") > should read > > locale_path = File.join(caller[0].split(/app.controllers/)[0], > "locale", "LC_MESSAGES") > > instead? Anyway, thank you both for solving my problem! No. the locale_path is the topdir of the locale path. So, it becomes both of topdir/#{lang}/locale/foo.mo, topdir/#{lang}/locale/LC_MESSAGES/foo.mo. #See gettext/textdomain.rb for more details. > > BTW, I think the best way to support your language is > > to include your language in Ruby-GetText-Package. > > If you help me, I can include your language to my official package. > > #Ask me directly if you are interested in it. > > I'll send you the po file as soon as I consider it finished. I'll forget > this, so please remind me eventually ;-) And keep up the great work > you do on your Ruby libraries. I'll send you the newest version of po files. Thanks in advance. Masao. _______________________________________________ Railsi18n-discussion mailing list Railsi18n-discussion@rubyforge.org http://rubyforge.org/mailman/listinfo/railsi18n-discussion