Skip to content

Commit

Permalink
fix: updated translations
Browse files Browse the repository at this point in the history
  • Loading branch information
kiremitrov123 committed Apr 7, 2023
1 parent a41af38 commit 905f6b9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/PaymentForm/PaymentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const PaymentForm: React.FC<Props> = ({ couponCode, setUpdatingOrder }) => {
</div>
</div>
<div>
<Button label="Continue" variant="contained" color="primary" onClick={paymentData.handleSubmit as () => void} size="large" fullWidth />
<Button label={t('checkout.continue')} variant="contained" color="primary" onClick={paymentData.handleSubmit as () => void} size="large" fullWidth />
</div>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en_US/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"weak": "Weak"
},
"sign_up": "Sign up",
"terms_consent": "I accept the {{termsUrl}} of JW Player.",
"user_exists": "There is already a user with this email address",
"view_password": "View password",
"email_updates": "Yes, I want to receive {{siteName}} updates by email."
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/nl_NL/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
"weak": ""
},
"sign_up": "",
"terms_consent": "",
"user_exists": "",
"view_password": "",
"email_updates": ""
Expand Down
5 changes: 3 additions & 2 deletions src/services/inplayer.account.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import InPlayer, { AccountData, Env, GetRegisterField, UpdateAccountData, FavoritesData, WatchHistory } from '@inplayer-org/inplayer.js';
import i18next from 'i18next';

import type {
AuthData,
Expand Down Expand Up @@ -397,11 +398,11 @@ function formatPublisherConsents(consent: Partial<GetRegisterField>) {
}

function getTermsConsent(): Consent {
const label = 'I accept the <a href="https://inplayer.com/legal/terms" target="_blank">Terms and Conditions</a> of JW Player.';
const termsUrl = '<a href="https://inplayer.com/legal/terms" target="_blank">Terms and Conditions</a>';
return formatPublisherConsents({
required: true,
name: 'terms',
label,
label: i18next.t('account:registration.terms_consent', { termsUrl }),
});
}

Expand Down

0 comments on commit 905f6b9

Please sign in to comment.