Skip to content

Commit

Permalink
Merge pull request #67 from shafin-deriv/shafin/DAPI-578/chore-add-mi…
Browse files Browse the repository at this point in the history
…ssing-translation-in-landing-page

chore: add missing translation
  • Loading branch information
sandeep-deriv authored Jul 9, 2024
2 parents c7946f1 + fb2a505 commit 20b45a6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
6 changes: 6 additions & 0 deletions i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -864,5 +864,11 @@
},
"You've created the maximum number of tokens.": {
"message": "You've created the maximum number of tokens."
},
"Deriv account": {
"message": "Deriv account"
},
"Log out": {
"message": "Log out"
}
}
7 changes: 5 additions & 2 deletions src/components/AccountSwitcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import SelectedAccount from '../CustomSelectDropdown/account-dropdown/SelectedAc
import AccountDropdown from '../CustomSelectDropdown/account-dropdown/AccountDropdown';
import styles from './account_switcher.module.scss';
import SearchButton from '../SearchButton';
import Translate from '@docusaurus/Translate';

const AccountSwitcher = () => {
const { logout } = useLogout();
Expand Down Expand Up @@ -41,7 +42,9 @@ const AccountSwitcher = () => {
{is_toggle_dropdown && (
<div className={`${styles.accountDropdownContainer} ${dropdown_toggle}`}>
<div className={styles.dropdownHeader}>
<h5>Deriv account</h5>
<h5>
<Translate>Deriv account</Translate>
</h5>
<button
onClick={() => setToggleDropdown((prev) => !prev)}
className={styles.closeDropdown}
Expand All @@ -59,7 +62,7 @@ const AccountSwitcher = () => {
color={'tertiary'}
className={styles.logoutButton}
>
Log out
<Translate>Log out</Translate>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ describe('ClientLibraries', () => {
expect(client_text).toBeInTheDocument();
});
it('should render subtitle text properly', () => {
const client_subtitle = screen.getByText(
'Simplify your development processes and get your app up and running faster with the client library of your choice.',
);
expect(client_subtitle).toBeInTheDocument();
const regex =
/Simplify your development processes and get your app up and running\s*faster with the client library of your choice\./i;

expect(screen.getByText(regex)).toBeInTheDocument();
});
it('should navigate to the correct links on click', () => {
expect(screen.getByText('Go to the JavaScript library').closest('a')).toHaveAttribute(
Expand Down
2 changes: 1 addition & 1 deletion src/features/Home/GetStarted/GetStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const GetStarted = () => {
<img src='/img/guide.svg' className={styles.cardIcon} />
<section>
<Text type='subtitle-1' bold className={`${styles.dark} ${styles.header}`} as='h3'>
<Translate> 1. Learn about our API</Translate>
<Translate>1. Learn about our API</Translate>
</Text>
<p>
<Translate>Understand basic concepts and terminologies</Translate>
Expand Down

0 comments on commit 20b45a6

Please sign in to comment.