Open GoogleCodeExporter opened 9 years ago
What do you translate? Say I have in my Users model field named login, email.
Where should I translate them ?
Also is there no way to translate failed_object ?
Thanks for the patch.
Original comment by fannar
on 28 Feb 2008 at 10:06
Seb's patch allows you to define the field name in your yaml file.
I didn't include the patch yet since I want to make sure it would work for all.
(and
because I'm crazy busy)
Original comment by mattAimo...@gmail.com
on 28 Feb 2008 at 10:31
Ok. In my lang/is.yml file ? I have a text_field named login. So in my is.yml
I should to login: translated_text ?
Original comment by fannar
on 29 Feb 2008 at 1:33
@fannar exactly, that's if Seb's patch works fine. (don't forget that you need
to
apply the patch yourself)
Original comment by mattAimo...@gmail.com
on 29 Feb 2008 at 1:39
Ok. I have patched it and translated the the field name in my lang/lang.yml
file but just get __localization_missing__
Original comment by fannar
on 29 Feb 2008 at 1:44
I works. I had to capitalize, humanize the string in my lang file. So it needs
to be Login: Notandanafn but not
login: notandanafn. Also I would say that the split is not working for me.
Because now the error says:
Notandanafn: Login ...... <-- Should remove the first word in the msg string.
Original comment by fannar
on 29 Feb 2008 at 2:22
I made minor modifications to seb's patch. His version was showing both the
untranslated and translated version
of the class attribute. I also changed it so you don't have to supply an
uppercase version of the key in the
lang.yml file. I tested this with Rails 2.1 RC1
cheers :)
Original comment by bjarkigud@gmail.com
on 28 May 2008 at 10:06
Attachments:
I made some improvements to my previous patch. Now multi word keys are
translated correctly e.g.
password_confirmation attribute is mapped correctly. Also the code is a bit
cleaner and more readable.
Original comment by bjarkigud@gmail.com
on 28 May 2008 at 10:58
Attachments:
Patch works fine, but ive found an error using add_to_base method.
> def validate
> errors.add_to_base("bla-bla-bla") if some_field.blank?
> end
and we got:
* __localization_missing__ bla-bla-bla!
Any ideas?
Original comment by mail2r...@gmail.com
on 11 Jun 2008 at 11:11
Original issue reported on code.google.com by
seb.auge...@gmail.com
on 7 Dec 2007 at 9:31Attachments: