Moin Thomas, thanks for your reply. I'm afraid your advice did
not really help me. Maybe I should try and state the point of
my problem clearer.

Thomas Baustert wrote:
> Don't forget to insert
> 
> init_gettext "rails"
> 
> into your ApplicationController.

Basically, Gettext is working for me (translating e.g. table
names), which means that I have done this already. The thing
which does not work is only related to my rails.mo file,
generated from rails.po. This is po/rails.pot in the ruby-
gettext source directory. It contains default messages for
rails à la "%{num} errors prohibited this %{record} from being
saved".

> You can also add a path using:
> 
> add_default_local_path(".../locale/%{tag}/LC_MESSAGES/%{name}.mo")

Actually, when the application is running, the path is set right:

  $ ls locale/eo/LC_MESSAGES/
  eventoj.mo  rails.mo

  $ ./script/console
  Loading development environment.
  irb> ApplicationController.add_default_locale_path 'foo'
    => ["foo",
       "/home/malte/Krakel/eventoj/locale/%{locale}/LC_MESSAGES/%{name}.mo",
       "/usr/share/locale/%{locale}/LC_MESSAGES/%{name}.mo",
       "/usr/local/share/locale/%{locale}/LC_MESSAGES/%{name}.mo"]

But it seems that these directories are not searched for rails.mo.
(Note that it works for eventoj.mo, the mo file for my application.)
Instead, rails.mo is in (for me) 
/usr/lib/ruby/gems/1.8/gems/gettext-1.8.0/data/locale/*/LC_MESSAGES,
and found therein. My problem is that I do not want to put my custom
translation there, but do not understand how to tell Gettext that it
is somewhere else.

Hope we'll get this done.

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