Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Form] Avoid button label translation when it's set to false#25249

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
TeLiXj wants to merge1 commit intosymfony:masterfromTeLiXj:patch-3
Closed

Conversation

@TeLiXj
Copy link
Contributor

QA
Branch?4.0
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?no
Fixed tickets
LicenseMIT
Doc PR

Improve my previous contribution to hide button label when it's set to false (#24148) because a missing translation error appears

Improve my previous contribution to hide button label when it's set to false (#24148) because a missing translation error appear
@nicolas-grekas
Copy link
Member

your previous contrib was for 2.7, you submitted against master, but described as 4.0
what's the right choice?

@TeLiXj
Copy link
ContributorAuthor

TeLiXj commentedDec 1, 2017
edited
Loading

It was on 2.7 branch but fabpot merged it into 3.4/4.0 branch. Now it's the same, only for 3.4/4.0 branches

@xabbuhxabbuh modified the milestones:2.7,3.4Dec 7, 2017
@xabbuh
Copy link
Member

xabbuh commentedDec 7, 2017
edited
Loading

Isn't the real issue that we try to displayfalse in the first place?

@TeLiXj
Copy link
ContributorAuthor

@xabbuh what do you mean?

@xabbuh
Copy link
Member

<buttontype="{{type|default('button') }}" {{block('button_attributes') }}>{{translation_domainissame as(false)?label:label|trans({},translation_domain) }}</button>

Here we always display thelabel variable. Why do we do that even when it isfalse.

@TeLiXj
Copy link
ContributorAuthor

Print false is same as print nothing because this I only check for label false one time.
If you don't print label when it's false (as you suggest) we have two options with the current code: check 2 times if label is false or execute previous ifs for nothing and finally ask if it's false. Maybe both are clear but less "microefficient".
We are writting more than the real impact of this change :)

@nicolas-grekasnicolas-grekas changed the base branch frommaster to3.4December 12, 2017 12:08
@nicolas-grekasnicolas-grekas changed the base branch from3.4 to4.0December 12, 2017 12:08
@nicolas-grekasnicolas-grekas changed the base branch from4.0 tomasterDecember 12, 2017 12:09
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(for 3.4)

@fabpot
Copy link
Member

Thank you@TeLiXj.

fabpot added a commit that referenced this pull requestJan 17, 2018
…se (TeLiXj)This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes#25249).Discussion----------[Form] Avoid button label translation when it's set to false| Q             | A| ------------- | ---| Branch?       | 4.0| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | no| Fixed tickets || License       | MIT| Doc PR        |Improve my previous contribution to hide button label when it's set to false (#24148) because a missing translation error appearsCommits-------368edd8 Avoid button label translation when it's set to false
@fabpotfabpot closed thisJan 17, 2018
This was referencedJan 29, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

5 participants

@TeLiXj@nicolas-grekas@xabbuh@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp