New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PropertyAccess] Add french singular for words like typologies > typologie #13721
Conversation
I'm not sure if the |
it would be typology -> typologies in english |
I'm -1 when this is adding support for other languages than French. Supporting plain English pluralization/singularization is already hard enough, adding support for even more languages makes it impossible. Anyway, thank you for taking the time to fill in a bug report and create a PR (including PR template)! |
@wouterj what do you think about removing this "pluralization black-magic" even for English. What's the problem of writing some methods using bad English grammar in exchange of having zero problems, zero magic and a nice performance bump? |
There is no magic, just plain english rules. |
@wouterj anything related to languages created by humans is magic, because they are as irregular as they can get. By the way, the "magic pluralizator" used by Symfony (and used too by other frameworks) may be lacking some irregular plurals found on this list: http://en.wikipedia.org/wiki/English_plurals#Irregular_plurals |
Closing as we only support English here. Actually, I think that using French (or any other language) in method names is a big mistake as it makes reading the code really strange and messy. @javiereguiluz I agree with you and I was against adding such a thing in Symfony, but well, we need to support it now. |
Remove this difficult magic in 3.0 will be appreciate. |
@webda2l and then not support pluralization? I'm afraid that'll break too much code... |
@webda2l the issue is that using |
Yes recurrent debate #9205 #5013 When magic doesn't work well, and PRs likes #13618 and #13714 are needed, facts that broken names for adders/removers are less important in my mind... Or maybe find alternative to add/remove naming that broke less name, plus/minus? ... |
Thanks for replying, still I think that there should be a way to tell to symfony to use another translator. @fabpot I understand the fact that it should handle everything or nothing or a way to tell to symfony to use a specific getter/setter maybe. Using english can be very usefull sometimes but when you work with a french customer that have specific words related to his business, translate them can be confusing for your team or for him. We'll stick with our fork for the moment until 2.7 is released. Thanks all. |
I think we should add support like proposed in this PR (but then reverted before merging): #3819 |
| Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#13721, symfony#13723 | License | MIT | Doc PR | WIP
| Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#13721, symfony#13723 | License | MIT | Doc PR | WIP - [ ] Document new feature
| Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#13721, symfony#13723 | License | MIT | Doc PR | WIP - [ ] Document new feature
| Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#13721, symfony#13723 | License | MIT | Doc PR | WIP - [ ] Document new feature
| Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#13721, symfony#13723 | License | MIT | Doc PR | WIP - [ ] Document new feature
Hi,
We just encountered a problem while using 'by_reference' attribute as false in a form which caused a
NoSuchPropertyException
because the StringUtil class in PropertyAccess doesn't handle correctly the case when for example you have "Typologies" (plural) that should be translated into "Typologie" and not "Typology".I just add this case and a test case which covered the word "typologies" and it seems that it doesn't break other test cases.