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!

> 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.

Malte

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Railsi18n-discussion mailing list
Railsi18n-discussion@rubyforge.org
http://rubyforge.org/mailman/listinfo/railsi18n-discussion

Reply via email to