forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WALL] Lubega / WALL-4977 / Enable wallets translations for Français …
…(FR) (deriv-com#17092) * feat: add french translations to wallets * fix: default options desc * fix: add more success footer button * fix: get allowed languages mock * fix: applied comments * fix: design updates * fix: wrap wallets in localize * fix: subtasks * fix: subtasks * fix: additional kyc info form * fix: cfd password modal tnc redirection language * fix: modal button width * fix: responsive ui issues * fix: enter password hint * Merge branch 'master' of github.com:binary-com/deriv-app into WALL-4977/wallets-french-translation * fix: latest changes * fix: tablet view issues * fix: desktop desc size * fix: message max width
- Loading branch information
1 parent
c0f191d
commit 8452b12
Showing
48 changed files
with
234 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 20 additions & 11 deletions
31
packages/wallets/src/components/Base/WalletLink/WalletLink.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,34 @@ | ||
import React from 'react'; | ||
import { getStaticUrl } from '../../../helpers/urls'; | ||
import { getInitialLanguage } from '@deriv-com/translations'; | ||
import { getStaticUrl, setUrlLanguage } from '../../../helpers/urls'; | ||
import './WalletLink.scss'; | ||
|
||
type TVariant = 'bold' | 'normal'; | ||
|
||
interface LinkProps { | ||
children?: React.ReactNode; | ||
href?: React.AnchorHTMLAttributes<HTMLAnchorElement>['href']; | ||
language?: string; | ||
staticUrl?: React.AnchorHTMLAttributes<HTMLAnchorElement>['href']; | ||
variant?: TVariant; | ||
} | ||
|
||
const WalletLink: React.FC<LinkProps> = ({ children, href, staticUrl, variant = 'normal' }) => ( | ||
<a | ||
className={`wallets-link wallets-link__variant--${variant}`} | ||
href={href ?? (staticUrl ? getStaticUrl(staticUrl) : '#')} | ||
rel='noopener noreferrer' | ||
target='_blank' | ||
> | ||
{children} | ||
</a> | ||
); | ||
const WalletLink: React.FC<LinkProps> = ({ children, href, language, staticUrl, variant = 'normal' }) => { | ||
const getHref = () => { | ||
setUrlLanguage(getInitialLanguage()); | ||
return getStaticUrl(staticUrl, language); | ||
}; | ||
|
||
return ( | ||
<a | ||
className={`wallets-link wallets-link__variant--${variant}`} | ||
href={href ?? (staticUrl ? getHref() : '#')} | ||
rel='noopener noreferrer' | ||
target='_blank' | ||
> | ||
{children} | ||
</a> | ||
); | ||
}; | ||
|
||
export default WalletLink; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
} | ||
|
||
&__success-footer { | ||
width: 24rem; | ||
width: 26rem; | ||
|
||
@include mobile-or-tablet-screen { | ||
width: 100%; | ||
|
Oops, something went wrong.