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 for GH-1371 and for handling $$, which Edge does not handle properly. #194

Merged
merged 5 commits into from Oct 2, 2018

Conversation

@zarembsky
Copy link
Contributor

@zarembsky zarembsky commented Sep 17, 2018

  • [x ] Have you followed the guidelines in CONTRIBUTING.md?
  • [x ] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • [x ] Have you added an explanation of what your changes do?
  • [x ] Does your submission pass tests?
  • [x ] Did you lint your code prior to submission?
zarembsky added 2 commits Sep 17, 2018
@zarembsky zarembsky requested a review from ghostery/ghostery as a code owner Sep 17, 2018
"message": "While Ghostery is free, you can choose to support us through a small subscription of $DOLLARS$ per month in exchange for cool perks, such as color themes, priority help service, and more. Join our mission and subscribe!",
"placeholders": {
"dollars": {
"content": "$1"

This comment has been minimized.

@christophertino

christophertino Sep 18, 2018
Member

Should this be $2?

This comment has been minimized.

@IAmThePan

IAmThePan Sep 21, 2018
Contributor

@christophertino No, it should be $1 because Serge is passing in $2 into the translation function: t('subscribe_pitch', '@2') and $1 in the placeholder content is for when you will fill that space with a passed variable.

This comment has been minimized.

@IAmThePan

IAmThePan Sep 21, 2018
Contributor

@zarembsky There is another escaped $ in hub_supporter_price:
The $$ in between $SUP_START$ and $SUP_END$ is an escaped $.
Not sure if all escaped $ need to be fixed...

This comment has been minimized.

@zarembsky

zarembsky Sep 21, 2018
Author Contributor

Yes, same thing. I missed it. Did not look at the hub.

This comment has been minimized.

@zarembsky

zarembsky Sep 22, 2018
Author Contributor

$$ in Hub Supporter tab is fixed. Could not find any more similar cases.

@@ -1775,6 +1775,9 @@
},
"span_end": {
"content": "</span>"
},
"dollar_sign": {
"content": "$1"

This comment has been minimized.

@jsignanini

jsignanini Sep 26, 2018
Member

@zarembsky since the dollar sign is static content, can we just pass "content": "$" here? This way we don't have to remember to pass it in when we use this string.

"message": "While Ghostery is free, you can choose to support us through a small subscription of $DOLLARS$ per month in exchange for cool perks, such as color themes, priority help service, and more. Join our mission and subscribe!",
"placeholders": {
"dollars": {
"content": "$1"

This comment has been minimized.

@jsignanini

jsignanini Sep 26, 2018
Member

@zarembsky same as above here

This comment has been minimized.

@zarembsky

zarembsky Oct 2, 2018
Author Contributor

This suggestion does not work for Edge.

@@ -63,7 +63,7 @@ const SupporterView = (props) => {
{_renderButton(isSupporter, true)}
<div
className="SupporterView__headingCost SupporterView--addSideMargin flex-container align-middle"
dangerouslySetInnerHTML={{ __html: t('hub_supporter_price') }}
dangerouslySetInnerHTML={{ __html: t('hub_supporter_price', '$') }}

This comment has been minimized.

@jsignanini

jsignanini Sep 26, 2018
Member

@zarembsky using innerHTML to set the html content will trigger a review complaint form Firefox... can we figure out another way of doing this?

This comment has been minimized.

@zarembsky

zarembsky Oct 2, 2018
Author Contributor

We have dangerouslySetInnerHTML all over our code.

@jsignanini jsignanini merged commit dfd352f into develop Oct 2, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@jsignanini jsignanini deleted the feature/edgeFix branch Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants