[gettext-u-en] Gettext not working in production mode. Only works in development.
Diego Barros
diego at heyboyo.com
Sun Sep 14 20:44:34 EDT 2008
Hi all,
I have a Rails application which is using GetText (1.10.0).
My own strings are translated correctly when I run in both production and
development mode.
But, the ActiveRecord::Base.default_error_messages are not translated when I
run my application in production mode. They are translated in development
mode though.
Given the following GetText strings:
default_error_messages.update(
:inclusion => N_("%{fn} is not included in the list"),
:exclusion => N_("%{fn} is reserved"),
:invalid => N_("%{fn} is invalid"),
:confirmation => N_("%{fn} doesn't match confirmation"),
:accepted => N_("%{fn} must be accepted"),
:empty => N_("%{fn} can't be empty"),
:blank => N_("%{fn} can't be blank"),
:too_long => N_("%{fn} is too long (maximum is %d characters)"),
:too_short => N_("%{fn} is too short (minimum is %d characters)"),
:wrong_length => N_("%{fn} is the wrong length (should be %d
characters)"),
:taken => N_("%{fn} has already been taken"),
:not_a_number => N_("%{fn} is not a number")
)
For example, "%{fn} has already been taken" is correctly being translated to
my other non-English locales, but only when I run in development mode. I do
not see any errors when I run in production mode, the translations are just
not happening.
These are the version numbers of my setup:
Ruby version 1.8.6 (i686-darwin8.10.1)
RubyGems version 1.0.1
Rails version 1.2.3
Active Record version 1.15.3
Action Pack version 1.13.3
Action Web Service version 1.2.3
Action Mailer version 1.3.3
Active Support version 1.4.2
GetText version 1.10.0
Has anyone experienced this? Any help would be greatly appreciated.
Cheers,
Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/gettext-users-en/attachments/20080915/5523d222/attachment.html>
More information about the gettext-users-en
mailing list