Em 13-09-2009 21:01, Mateo Murphy escreveu:
> ...
>> Anyway, the patch I intend to prepare for submission is not directly
>> related to I18n in my opinion.
>>      
>
> Since error messages go through the I18n system, any changes made will
> necessarily involve the I18n code to some degree. i.e. it would be
> hard to patch any code related to full_messages without affecting I18n
> related code.

That is why I asked if there is already any repository with these 
changes... :)

> Furthermore, I think that *any* code that relates to
> displaying text needs to keep I18n in mind.
>    

I agree, I will certainly have i18n in mind when preparing the patch, 
but I just wanted to enforce that I don't think this should be handled 
only in i18n code. This issue should not be so i18n related as it is today.

>> Please, see my comments on subject at:
>>
>> https://rails.lighthouseapp.com/projects/8994/tickets/1687-flexible-formatting-for-ar-validation-error-messages
>> #ticket-1687-36
>>      
>
>
> Right, I hadn't checked in on that thread in a while.
>
> As of 2.3.4, you have two possibilities:
>
> 1) you can specify a separate message and full_message per validation
> using the I18n.
>
> 2) you can change the full_message to something other than
> '{{attribute}} {{message}}', like simply '{{message}}'. This would
> mean that whatever you set as message will also be used for the
> full_message.
>
> Now, I realize this may seem like a workaround to doing it directly in
> the model,

That is exactly what I think. I see this should not be a real problem in 
internationalized applications. But if you think about one-language 
application, it should hardly need to worry about i18n and the 
translation files. It would just be so much simpler to write the full 
messages directly in the models when this approach fits better.

>   (although I'd argue that it's probably better to have all
> the text strings in one place anyway,) but I think it does cover what
> you're trying to do?
>    

Rails 2.3.4 i18n module certainly allows me to do what I want. I just 
don't think it is the best way of approaching the full message control 
in validations. And I'm really concerned in trying to make Rails be as 
simple as possible in my demonstration to the company where I work, when 
I have the opportunity to talk about Rails.

Thank you for you feedback,

Rodrigo.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to