Isn't that similar to what Diego's plugin also does? The problem with this:
> [:activerecord][:attributes][:user][:name], then, if miss: > [:activerecord][:attributes][:name], then, if miss: is that there could be a model Name. That's what I understand Diego solves with the :global-attributes namespace. Or am I missing something? Sorry ... I'm only following this peripherally cause I'm up to my ears in other stuff :-/ On 25.11.2008, at 23:03, Carlos Júnior wrote: > Sven, I think that would be really nice and useful if the > translations could be inheritable. > So, take this example: > pt-BR: > name: Nome > activerecord: > attributes: > user: > name: Nome > if you translated something once in a toplevel, you shouldn't need > to translate it again, but you can replace it: > pt-BR: > name: Nome > activerecord: > attributes: > user: > name: Nome completo > But, if you don't want, this would be enough: > pt-BR: > name: Nome > This is quite simple: > I18n.t "activerecord.attributes.user.name" would try: > [:activerecord][:attributes][:user][:name], then, if miss: > [:activerecord][:attributes][:name], then, if miss: > [:activerecord][:name], then, if miss > [:name], and it would finally find the translation, or, if it miss: > then I18n.t would return the translation missing string > This approach would be very welcome, if you think that "name" would > be used in many places of the applications, such as a lot of > translations. > What do you think? > I can implement this as a plugin or as a patch if you want. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
