On Jun 26, 5:37 pm, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote:
>
> generally i think its a bad practice to maintain error text inside the
> action code (and config files). i think its much better to decouple
> this. currently i prefer using error code's (aka constants) and mapping
> them inside the template. not ideal either. maybe a config file is not
> so bad .. not sure .. overall i am just not happy with the situation there.
>

I also feel not so comfortable putting literal inside validation YAML
file.

I saw some people using constant like code for all translatable texts
throughout the
application, but it doesn't feel good either, as it affects
readability.

But it seems good to just apply such idea to error messages and
something
similar. Currently I cannot avoid using both validation yaml and
validate() method,
so I must put error messages separately, which doesn't seem right,
and
is somewhat difficult to maintain. Using a error code reference can
centralize
such task, and also can facilitate error message reuse.

Also, it can help when I want to explicitly set localized page title
or email subject in an action.

Tamcy


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to