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: Change acknowledgement text and button #5611

Merged
merged 9 commits into from
Nov 22, 2020

Conversation

Saumyachitransh01
Copy link
Member

Fixes #5608

Corrected Acknowledgement text and buttons - (Snapshots After correction)

For paid tickets:-

Screenshot from 2020-11-13 21-04-18

For free tickets:-

Screenshot from 2020-11-13 21-03-47

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Nov 13, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/6joccmsu6
✅ Preview: https://open-event-frontend-git-pay.eventyay.vercel.app

{{t
'By clicking "Pay Now", I acknowledge that I have read and that I agree with all the terms of services and privacy policy of Open Event.'}}
'By clicking "Proceed to Checkout", I acknowledge that I have read and that I agree with the '}} <a href='https://eventyay.com/terms'>terms of services</a>{{t ' and ' }}<a href='https://eventyay.com/privacy-policy'>privacy policy</a> {{ ' on this website.'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

you have created external links. create internal links. use terms and privacy-policy route.

@codecov
Copy link

codecov bot commented Nov 13, 2020

Codecov Report

Merging #5611 (660fb29) into development (5bbb10c) will increase coverage by 0.32%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5611      +/-   ##
===============================================
+ Coverage        23.25%   23.57%   +0.32%     
===============================================
  Files              493      510      +17     
  Lines             5182     5417     +235     
  Branches            38       59      +21     
===============================================
+ Hits              1205     1277      +72     
- Misses            3972     4124     +152     
- Partials             5       16      +11     
Impacted Files Coverage Δ
app/components/footer-main.js 66.66% <0.00%> (-23.34%) ⬇️
app/components/tabbed-navigation.js 33.33% <0.00%> (-20.00%) ⬇️
app/components/modals/tax-info-modal.js 11.11% <0.00%> (-11.12%) ⬇️
app/controllers/index.js 27.27% <0.00%> (-9.10%) ⬇️
app/components/forms/user-payment-info-form.js 20.00% <0.00%> (-8.58%) ⬇️
app/components/modals/modal-base.js 22.85% <0.00%> (-2.15%) ⬇️
app/utils/computed-helpers.js 19.56% <0.00%> (-1.72%) ⬇️
app/routes/application.js 83.78% <0.00%> (-1.59%) ⬇️
app/components/widgets/forms/image-upload.js 22.64% <0.00%> (-0.44%) ⬇️
app/router.js 100.00% <0.00%> (ø)
... and 54 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bbb10c...934a87a. Read the comment docs.

afzal442
afzal442 previously approved these changes Nov 13, 2020
Copy link
Contributor

@afzal442 afzal442 left a comment

Choose a reason for hiding this comment

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

Well done.

<p>
{{t
'By clicking "Order Now", I acknowledge that I have read and that I agree with the '}} <a href='https://eventyay.com/terms'>terms of services</a>{{t ' and ' }}<a href='https://eventyay.com/privacy-policy'>privacy policy</a> {{ ' on this website.'}}
</p>
Copy link
Member

Choose a reason for hiding this comment

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

Please use relative links.

@maze-runnar
Copy link
Contributor

maze-runnar commented Nov 19, 2020

@Saumyachitransh01 use the following and complete PR

<LinkTo @route="pages" @model="privacy-policy" class="item">
        {{t 'Privacy Policy'}}
  </LinkTo>
<LinkTo @route="pages" @model="terms" class="item">
        {{t 'terms'}}
      </LinkTo>

@Saumyachitransh01
Copy link
Member Author

<LinkTo @route="pages" @model="privacy-policy" class="item">
{{t 'Privacy Policy'}}

<LinkTo @route="pages" @model="terms" class="item">
{{t 'terms'}}

Thank you so much @maze-runnar, but I tried this and it's not responding in browser. Showing 404 not found

Screenshot from 2020-11-19 15-05-34

@iamareebjamal
Copy link
Member

Your local server does not have the pages necessary for it

@iamareebjamal
Copy link
Member

@Saumyachitransh01
Copy link
Member Author

@iamareebjamal
Copy link
Member

/privacy /terms

@Saumyachitransh01
Copy link
Member Author

Saumyachitransh01 commented Nov 20, 2020

/privacy /terms

It's still showing no routes for both of these

@iamareebjamal
Copy link
Member

It won't show on your local server.

{{t
'By clicking "Pay Now", I acknowledge that I have read and that I agree with all the terms of services and privacy policy of Open Event.'}}
'By clicking "Proceed to Checkout", I acknowledge that I have read and that I agree with the '}} <LinkTo @route='terms'>{{t 'terms of services'}}</LinkTo>{{t ' and ' }}<LinkTo @route='privacy'>{{t 'privacy policy'}}</LinkTo> {{ ' on this website.'}}
Copy link
Member

Choose a reason for hiding this comment

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

You have to use anchor tag, not LinkTo

Copy link
Member Author

@Saumyachitransh01 Saumyachitransh01 Nov 20, 2020

Choose a reason for hiding this comment

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

<a href="{{href-to 'terms'}}"> ?

Copy link
Member

@iamareebjamal iamareebjamal Nov 20, 2020

Choose a reason for hiding this comment

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

<a href="/terms">

@Saumyachitransh01
Copy link
Member Author

@iamareebjamal please check now

<p>
{{t
'By clicking "Pay Now", I acknowledge that I have read and that I agree with all the terms of services and privacy policy of Open Event.'}}
'By clicking "Order Now", I acknowledge that I have read and that I agree with the '}}
<a href='/terms'>terms of services</a>{{t ' and ' }}<a href='/privacy'>privacy policy</a> {{ ' on this website.'}}
Copy link
Member

Choose a reason for hiding this comment

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

Repetition. The only difference is "Proceed to Checkout" and "Order Now"

Copy link
Member Author

Choose a reason for hiding this comment

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

This is what is asked in the issue.
It's same there too, only difference is Order Now and Proceed to Checkout

Copy link
Member

Choose a reason for hiding this comment

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

I know. There should be no duplication. This can be achieved without that

Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot from 2020-11-20 18-56-57

Would this work?

Copy link
Member

Choose a reason for hiding this comment

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

Try

{{t
'By clicking "Pay Now", I acknowledge that I have read and that I agree with all the terms of services and privacy policy of Open Event.'}}
</p>
{{t 'By clicking'}}{{#if this.isPaidOrder}} {{t ' "Proceed to Checkout"'}} {{else}} {{t ' "Order Now"'}}{{/if}}
Copy link
Member

Choose a reason for hiding this comment

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

Use a single message with placeholders like here https://github.com/Cropster/ember-l10n#singular-translations

Co-authored-by: Areeb Jamal <jamal.areeb@gmail.com>
@@ -279,12 +279,13 @@
{{t 'Acknowledgement'}}
</h4>
<p>
{{t
'By clicking "Pay Now", I acknowledge that I have read and that I agree with all the terms of services and privacy policy of Open Event.'}}
{{t 'By clicking "{{orderState}}", I acknowledge that I have read and that I agree with the '
Copy link
Member

Choose a reason for hiding this comment

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

Invalid syntax

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks a lot for correcting so many mistakes :)
But it was working perfectly and no console errors either.

{{t
'By clicking "Pay Now", I acknowledge that I have read and that I agree with all the terms of services and privacy policy of Open Event.'}}
{{t 'By clicking "{{orderState}}"' orderState=(if this.isPaidOrder (t "Proceed to Checkout") (t "Order Now"))}}
{{', I acknowledge that I have read and that I agree with the '}}
Copy link
Member

@iamareebjamal iamareebjamal Nov 21, 2020

Choose a reason for hiding this comment

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

The entire message should be one string to make it translatable.

{{t 'By clicking "{{orderState}}", I acknowledge that I have read and that I agree with the {{terms}} and {{privacyPolicy}} on this website.' orderState=(if this.isPaidOrder (t "Proceed to Checkout") (t "Order Now')) terms=... privacyPolicy=...}}

Or else it will be separated in multiple different sentences which don't make sense in translation:

  1. By clicking "{{orderState}}" ???
  2. , I acknowledge that I have read and that I agree with the umm?
  3. and space surrounded and?
  4. on this website. what's the context?

When making things translatable by wrapping in t you have to make sure it makes sense to the translator

@message = {{t 'By clicking "{{orderState}}", I acknowledge that I have read and that I agree with the {{terms}} and {{privacy}} on this website.'
orderState=(if this.isPaidOrder (t "Proceed to Checkout") (t "Order Now"))}} as |text placeholder|>
{{~#if (eq placeholder 'terms')}}<a href="/terms">terms of services</a>{{~/if~}}
{{~#if (eq placeholder 'privacy')}}<a href="/privacy">privacy policy</a>{{~/if~}}
Copy link
Member

@iamareebjamal iamareebjamal Nov 22, 2020

Choose a reason for hiding this comment

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

Why not use terms='<a href="/terms">terms of services</a>' and privacy='<a href="/privacy">privacy policy</a>' like in orderState?

Copy link
Member Author

Choose a reason for hiding this comment

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

Was showing error

Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot from 2020-11-22 23-11-10

This one

Copy link
Member

Choose a reason for hiding this comment

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

You have to wrap that in string

Copy link
Member Author

@Saumyachitransh01 Saumyachitransh01 Nov 22, 2020

Choose a reason for hiding this comment

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

Tried and didn't worked with that too. Browser was showing no link only the text inside quotes

@iamareebjamal iamareebjamal changed the title Acknowledgement Text and Button fix: Change acknowledgement text and button Nov 22, 2020
@auto-label auto-label bot added the fix label Nov 22, 2020
@iamareebjamal iamareebjamal merged commit 4998bec into fossasia:development Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order Forms: Acknowledgement text and button not suitable
6 participants