-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translation][Form] Do not translate form labels and placeholders when 'translation_domain' is false #16031
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
Restless-ET
wants to merge
3
commits into
symfony:2.8
from
Restless-ET:2.8-disable-translations-when-translation_domain-is-false
Closed
Conversation
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
@@ -57,7 +57,7 @@ | |||
{%- endif -%} | |||
<select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %}> | |||
{%- if placeholder is not none -%} | |||
<option value=""{% if required and value is empty %} selected="selected"{% endif %}>{{ placeholder != '' ? placeholder|trans({}, translation_domain) }}</option> | |||
<option value=""{% if required and value is empty %} selected="selected"{% endif %}>{{ placeholder != '' ? (translation_domain is same as (false) ? placeholder : placeholder|trans({}, translation_domain)) }}</option> |
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.
please remove the extra space between as
and (
same as(false)
@Restless-ET Can you add some unit tests to cover the changes? |
dc506a8
to
8c4911f
Compare
…ranslation_domain is set to false on form.
8c4911f
to
709ac51
Compare
@fabpot Added some unit tests as requested. |
👍 Status: Reviewed |
👍 |
Thank you @Restless-ET. |
fabpot
added a commit
that referenced
this pull request
Nov 25, 2015
…laceholders when 'translation_domain' is false (Restless-ET) This PR was squashed before being merged into the 2.8 branch (closes #16031). Discussion ---------- [Translation][Form] Do not translate form labels and placeholders when 'translation_domain' is false | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Seems like this behaviour was already partially added (as stated [here](#16016 (comment))) to solve the problem of expanded choice widgets. Commits ------- 0e0b904 [Translation][Form] Do not translate form labels and placeholders when 'translation_domain' is false
nicolas-grekas
added a commit
that referenced
this pull request
Nov 29, 2015
…colas-grekas) This PR was merged into the 2.7 branch. Discussion ---------- Forward compatibility with AbstractLayout* 2.8 tests | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Related to #16031 Commits ------- ef61e54 Forward compatibility with AbstractLayout* 2.8 tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Seems like this behaviour was already partially added (as stated here) to solve the problem of expanded choice widgets.