Skip to content
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

fix css toggle-button ignores title translation #44

Merged
merged 2 commits into from
Dec 7, 2020

Conversation

adroste
Copy link
Contributor

@adroste adroste commented Dec 6, 2020

Unfortunately, the current implementation ignores translations and the buttons texts are hardcoded inside the css.
The easiest fix is to use the title attribute of the parent div that is already translated.

Which issue does this PR address?

Closes #43

Unfortunately, the current implementation ignores translations and the buttons texts are hardcoded inside the css. 
The easiest fix is to use the title attribute of the parent div that is already translated.
@CLAassistant
Copy link

CLAassistant commented Dec 6, 2020

CLA assistant check
All committers have signed the CLA.

@nikku nikku requested review from a team, philippfromme and barmac and removed request for a team December 7, 2020 07:38
@philippfromme
Copy link
Contributor

Thanks for your contribution. I will have a look. 👍

@barmac
Copy link
Member

barmac commented Dec 7, 2020

I like the solution and left just one small suggestion about code readability. Thanks for you contribution! :)

width: 46px;
height: 46px;
line-height: 46px;
padding: 10px;
Copy link
Member

Choose a reason for hiding this comment

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

This is not related to the translation issue, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is. Fixed width does not work, otherwise you end up with an overflowing box and/or weird spacing. I replaced the line-height/height with padding for simplicity.
If you want to maintain the 46px height, just keep the line-height/height and only set padding to left/right.

Copy link
Member

Choose a reason for hiding this comment

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

All right. So we should never have had fixed width here.

Co-authored-by: Maciej Barelkowski <maciejbarel@gmail.com>
@barmac
Copy link
Member

barmac commented Dec 7, 2020

I will be happy to merge this today, if you could only squash the changes and adjust the commit message to our contributing guidlines. Thanks!

@barmac barmac merged commit 65f3277 into bpmn-io:master Dec 7, 2020
@barmac
Copy link
Member

barmac commented Dec 7, 2020

I will be happy to merge this today, if you could only squash the changes and adjust the commit message to our contributing guidlines. Thanks!

Already merged. Have a look at 038bb3c if you want to check what I meant :)

And thanks for your contribution!

@philippfromme
Copy link
Contributor

Thx @barmac ❤️

@barmac
Copy link
Member

barmac commented Dec 7, 2020

Released in v2.0.4 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Open/Close toggle button is hardcoded and cannot be translated
4 participants