Hi Piotr,

welcome to the list!

While we've explored features for I18n I've always wondered why  
there's a concept of pluralization but none of "generization" on our  
list. I've never seen anything like that in existing Ruby solutions  
before though so I've sort of dropped it from my mind. So I find it  
interesting that you bring that up now.

How many languages share this concept of cross-tables of gender vs  
gramatical number (singular/plural)? If it's a huge portion it might  
actually make sense to include that just like pluralization is a  
feature. If it's just a few (European) languages, it might rather go  
into a plugin?

In any case it might make a lot of sense to implement this in a way so  
that it can be used in combination with other solutions ... so we can  
experiment with it and see how it works out in practice. Do you mind  
to whip a plugin up from that?

Are you aware that you can define validation messages per attribute?  
So that should provide sufficient flexibility for "non-unisex"  
messages even without "genderization" support.


On 31.10.2008, at 22:38, Piotr Sarnacki wrote:

>
> Hi,
>
> The thing that allways annoys me in translations and validations in
> rails is gender. In Polish, Russian and many other languages words
> have gender and validation messages should be different for each
> gender.
>
> I was talking to Yaroslav (http://github.com/yaroslav) and he said the
> he created set of unisex messages. I couldn't find out good way to
> make polish messages unisex (you can do it but it seems so
> unnatural...). So I've monke patched validations to support somthing
> like that: http://pastie.org/303000
>
> Gender of word "lamp" is feminine in polish so :feminine key will be
> picked up. The good part of this solution is that error messages look
> more natural and I don't have to set custom messages for all of my
> attributes.
>
> The obvious drawback is size of translation tables.
>
> I can't see any more drawbacks right now so it would be great if
> someone could review that idea.
>
> Implementation looks like that: http://pastie.org/303921 - any
> thougths on how to achieve it without monkey patching?
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"rails-i18n" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rails-i18n?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to