Skip to content

Conversation

@castamir
Copy link
Contributor

To prevent SelectBox values from being translated, we had to disable entire translator from this control and translate label and option-descript manualy.

I propose an opposite aproach - possibility to not translate these values =)

Copy link
Contributor

Choose a reason for hiding this comment

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

What an ugly name. What about $translateValues = TRUE?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was my first shot, but what about it's setter? From the name translateValues() I would guess that that method will return translated values and not just set a flag. Also logic of such method might be confusing (inverted)... What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

The confusion might be caused by double negation. Rather then $disable<sth> = FALSE, which means "it's ok, go", bool value should start with verb, like in question (e.g. "is container generated?"). I'd suggest $doTranslateValue, or rather $doTranslateOptions, because it's called on $options property.

@castamir Great idea btw. We use custom select box with translations off by default on it's values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@TomasVotruba thx for response.

Copy link
Contributor

Choose a reason for hiding this comment

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

Missing bool annotation

@TomasVotruba
Copy link
Contributor

👍

@castamir castamir force-pushed the master branch 2 times, most recently from 2782ccd to ae38142 Compare December 9, 2014 14:51
@castamir castamir changed the title SelectBox value translation can be disabled SelectBox: options translation can be disabled Dec 9, 2014
@dg dg force-pushed the master branch 2 times, most recently from b644bbd to 3b543ff Compare February 6, 2015 03:50
@solcik
Copy link
Contributor

solcik commented Feb 7, 2015

👍

@castamir
Copy link
Contributor Author

castamir commented Feb 7, 2015

ping @dg

Could you please give me some feedback?

@dg
Copy link
Member

dg commented Feb 7, 2015

doTranslateOptions is really bad name. I am considering another approach #58

@dg dg force-pushed the master branch 4 times, most recently from 75b0565 to 72a5c56 Compare February 8, 2015 13:00
@dg dg added this to the v2.4 milestone Feb 16, 2015
@dg dg force-pushed the master branch 4 times, most recently from 164ee7d to 7b7189f Compare February 18, 2015 11:04
@dg dg force-pushed the master branch 2 times, most recently from 131f7d2 to 532059a Compare May 21, 2015 11:49
@dg dg force-pushed the master branch 2 times, most recently from a57a557 to 55d0eb8 Compare June 19, 2015 12:05
@castamir castamir closed this Oct 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants