Hi Sven, I hope you have had a great vacation!
I don't think that a full_message option would be a feature to be explored by plugins only, for several reasons.
I18n different backend plugins make sense because some basic external API are kept unchanged (I18n.translate/t) and we can test different implementation without changing application source-code, with the ability to store the translations in different means and benchmark performance between several engines. That was an awesome job, but I don't think this approach would fit in the case of an extra parameter to validations.
I never understood why Rails never supported some way of specifying the full message. This is what I would call "Convention over Configuration". If you don't configure (specifying the message of full message) you only have to specify the validation and the attribute and a default message will be concatenated with the attribute in a default way. But it is lacking a bit of the configuration part when the default convention does not fit. It has the ability to override the message, but not for override how to concatenate it with the field, or not concatenating it at all.
And I don't think that only some users would benefit from this, but almost every one will have some situation where a full message would fit better than having to think about how to reformulate a phrase so that it starts with the attribute name. Also, I don't think this should be approached with I18n, since it is not an internationalization issue.
Rails is always recommended for agile development. Imagine the following scene: you present your solution to your client and she loved it, but has only a few adjustments.
She really care about UI and she feels that some error messages should be a bit different and ask you to change them to something that she would prefer that doesn't follow Rails concatenation convention. Then, what would you do? "Sorry madam, but this is actually not that simple to change and the code would become less maintainable if we do that. Would you please reconsider keeping the phrase as it is?" I doubt she would understand the reason why it is difficult to get full control about the error messages...
I can see, though, reasons for having plugins to validations but for other reasons. For instance, I believe many people would prefer the error message to appear next to the field with problem instead of showing all of them with a single error box. But this would require modifying ActionPack helpers instead of ActiveModel...
I simple don't think that a full_message option would be an edge case.
Sven Fuchs escreveu: