-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update translation.rst #4989
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
Closed
Closed
Update translation.rst #4989
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
265604b
[#4243] Tweaks to the new var-dumper component
weaverryan 09a6fd7
[Form] Add entity manager instance support for em option
GeLoLabs 1a29f24
typos in the var-dumper component
nicolas-grekas 9caea6f
feature #4336 [Form] Add entity manager instance support for em optio…
weaverryan 3329bd2
feature #4424 [#4243] Tweaks to the new var-dumper component (weaverr…
weaverryan 0d5cb0d
Merge branch '2.7'
weaverryan 0c92fab
Merge branch '2.7'
weaverryan 51224e9
Merge branch '2.7'
wouterj d6ce29f
Merge branch '2.7'
weaverryan f24b645
Merge branch '2.7'
weaverryan d969e8b
Merge branch '2.7'
weaverryan 0fb81cc
Merge branch '2.7'
weaverryan 6b73990
Merge branch '2.7'
wouterj 8099ac1
Merge branch '2.7'
weaverryan 486baf8
Merge branch '2.7'
wouterj d921dcd
Merge branch '2.7'
wouterj f0ac8bb
Merge branch '2.7'
weaverryan 3454883
Merge branch '2.7'
weaverryan d30dc9e
Merge remote-tracking branch 'origin/master'
weaverryan 2d1c336
Merge branch '2.7'
weaverryan e539bd1
Merge branch '2.7'
weaverryan 0906e0c
Merge branch '2.7'
weaverryan 4056218
Merge branch '2.7'
weaverryan 07aa543
Merge branch '2.7'
weaverryan 2fcebc1
Merge branch '2.7'
wouterj 8131844
Merge branch '2.7'
weaverryan cb6f846
Merge branch '2.7'
weaverryan 9e5fc6c
Merge branch '2.7'
weaverryan 56db7af
Merge branch '2.7'
weaverryan 27296ad
Merge branch '2.7'
wouterj 353995e
Merge branch '2.7'
weaverryan fcfea43
Merge branch '2.7'
wouterj 6ef6a04
Merge branch '2.7'
weaverryan bcab77b
bump Symfony requirements to PHP 5.5
xabbuh d33b78b
don't describe removed usage of Yaml::parse()
xabbuh 6f9832d
Merge branch '2.7'
wouterj 42d2b15
Merge branch '2.7'
weaverryan 7d2f0f3
Removed 2.5 versionadded as its deprecated
wouterj 92b10b1
bug #4758 [Components][Yaml] don't describe removed usage of Yaml::pa…
wouterj 032a6b4
Merge branch '2.7'
wouterj c859790
Fixed markup
wouterj 9919bca
Revert "Fixed markup"
wouterj ca3b4c8
feature #4753 bump Symfony requirements to PHP 5.5 (xabbuh)
wouterj a17bdd7
Merge branch '2.7'
wouterj dc25c65
minor #4769 [2.7] Removed 2.5 versionadded as its deprecated (WouterJ)
weaverryan 050f7ce
Documented true regex
wouterj 7363c9b
Merge branch '2.6' into 2.7
weaverryan 907ee0d
Merge branch '2.7'
weaverryan 728205f
Replaced setDefaultOptions by the new configureOptions method
peterrehm 74d2e30
feature #4786 Replaced setDefaultOptions by the new configureOptions …
weaverryan 885c378
[#4786] Adding a few versionadded's for the changed method name
weaverryan e4d22f0
added documentation for the new absolute_url() and relative_path() Tw…
fabpot 6e6bae8
Small grammar-ish fix
wouterj 6c498d4
feature #4805 added documentation for the new absolute_url() and rela…
weaverryan 8fe9069
added documentation for the new absolute_url() and relative_path() Tw…
fabpot a5addaa
[#4805] Adding versionadded
weaverryan 61ea87b
Merge branch '2.6' into 2.7
weaverryan c33b371
Merge branch '2.7'
weaverryan 7c07a44
Merge branch '2.6' into 2.7
weaverryan 99e2996
Merge branch '2.7'
weaverryan a57db5b
feature #4879 Documented true regex (WouterJ)
weaverryan 39f6876
Merge branch '2.6' into 2.7
weaverryan 714f630
Merge branch '2.7'
weaverryan bc29584
Merge branch '2.6' into 2.7
wouterj 87eb36c
Merge branch '2.7'
wouterj d71fe6d
Merge branch '2.6' into 2.7
wouterj c0f9f67
Merge branch '2.7'
wouterj 78f4f69
Merge branch '2.6' into 2.7
wouterj ebe2706
Added January changelog
wouterj ad97700
Merge branch '2.7'
wouterj 6fd286b
Added January changelog
wouterj 7f8d6bd
Merge branch '2.6' into 2.7
wouterj 8d56ad7
Merge branch '2.7'
wouterj ef39a01
Remove diff
wouterj 70902f5
Merge branch '2.6' into 2.7
weaverryan 81e8c13
Merge branch '2.7'
weaverryan b7f7421
Update translation.rst
solazs 94914c5
Review note about setting the translator locale in a controller.
solazs d5566b1
Finaly touches on translation locale setting note
solazs fdae4bc
Merge branch 'master' of https://github.com/solazs/symfony-docs into …
solazs cbc91e3
Remove useless setLocale() call and add code block with locale setter
solazs 30b4dfa
Revert "Merge branch 'master' of https://github.com/solazs/symfony-do…
solazs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Finaly touches on translation locale setting note
- Loading branch information
commit d5566b15b4d0ce0d7c4e064d2c0aa7fdcac0047d
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really great point and thing to add. But I think showing the
$request->setLocale()
above is misleading. It does serve to highlight that this method exists, which is good, but as we point out, setting the locale won't actually work.Are there downsides to setting the locale directly on the translator from the controller? Or do we think this is kind of hackish? If it is hackish (it seems so to me, but I also can't think of a real downside), then I think we should:
kernel.request
, with a link to the event listener sections.What do you all think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does feel hackish, but I can't really see why it shouldn't be done this way. It works perfectly and I could not find any other way to change the local of the translator in the controller.
I believe it feels hackish, because the translator service is normally not accessed, so this means another depency. This shouldn't cause any problems though.
This is a great idea! I'll sketch a new version as soon as I can and push it, see if you like it.