On 03.01.2011 14:48, Bernhard Schussek wrote:
> I agree that parameters should have a unified naming and cannot really
> add much to your post.
Goody, let's hope we can have some feedback from Fabien on this.
> We switched to using message keys in symfony 1 projects two years ago
> and could fix these problems. I think this should be a best practice
> and encouraged by the core framework in Symfony2.
I would like that very much, and I'm glad there seem to be support. I
didn't raise it because I didn't want to get attention off the other
issue, but abstract translation keys are much better imo.
That is by the way why I worked on a patch a while back to have yaml
file merge recursively into foo.bar.baz keys, so that you can easily do
namespacing, for example:
# messages.en.yml
users:
create_form:
name: Name
email: E-Mail
Then {% trans "users.create_form.name" %} will work. Saves you a lot of
repetition, avoids typos, and is more readable than one gigantic list imo.
Cheers
--
Jordi Boggiano
@seldaek :: http://seld.be/
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" 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-devs?hl=en