Not able to translate 'yes'

1,341 views
Skip to first unread message

abtrapp

unread,
Apr 16, 2009, 8:41:53 AM4/16/09
to rails-i18n
This is very funny:

I am using I18n in the current version of rails and it works really
great!

BUT:

yes: 'ja'
<%= t "yes" %>

leads to a missing translation error for "yes". If I change "yes" in
the property file and the view (for example to "yey") everything works
fine. I tried this several times.

The same effect appears for the String "no" which can't be found too.

Do I have to user notyes or notno to get this working or is there
another way around the must funny bug I have ever seen *rofl*

Thank you very much in advance!

Anton

koulikoff

unread,
Apr 16, 2009, 9:03:20 AM4/16/09
to rails-i18n
try
"yes": 'ja'

Clemens Kofler

unread,
Apr 17, 2009, 7:07:56 AM4/17/09
to rails-i18n
Check here: http://www.yaml.org/refcard.html

Yes/No, On/Off etc. are treated as booleans, so - as koulikoff said -
you have to use them as explicit string values.

bagwanpankaj

unread,
Apr 18, 2009, 1:03:35 AM4/18/09
to rails-i18n
yes/no are reserved words in ruby n treated as boolean values
TRY somthin like:
ya: 'ja'
not: 'no'
Reply all
Reply to author
Forward
0 new messages