Skip to content

Commit

Permalink
adding missing translations and new number variables
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCastroGarcia committed Jan 17, 2022
1 parent 0aa15f6 commit 91b727e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
8 changes: 7 additions & 1 deletion components/MaturityInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import styles from './style.module.scss';

import keys from './translations.json';

import numbers from 'config/numbers.json';

interface Props {
maturity: Maturity;
}
Expand All @@ -22,7 +24,11 @@ function MaturityInfo({ maturity }: Props) {
(1000 * 3600 * 24);

const color =
days < 0 ? styles.error : days < 5 ? styles.warning : styles.status;
days < numbers.daysToError
? styles.error
: days < numbers.daysToWarning
? styles.warning
: styles.status;

return (
<div className={styles.maturityContainer}>
Expand Down
4 changes: 2 additions & 2 deletions components/SmartPoolInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function SmartPoolInfo() {

return (
<div className={styles.maturityContainer}>
<p className={styles.titleContainer}>Smart Pool</p>
<p className={styles.titleContainer}> {translations[lang].smartPool}</p>
<ul className={styles.table}>
<li className={styles.header}>
<div className={styles.assetInfo}>
Expand All @@ -27,7 +27,7 @@ function SmartPoolInfo() {
<p className={styles.asset}>DAI</p>
</div>
<div className={styles.buttonContainer}>
<Button text="Deposit" className="tertiary" />
<Button text={translations[lang].deposit} className="tertiary" />
</div>
</li>
<li className={styles.row}>
Expand Down
8 changes: 6 additions & 2 deletions components/SmartPoolInfo/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
"liquidity": "Liquidity",
"utilizationRate": "Utilization Rate",
"suppliers": "# of suppliers",
"borrowers": "# of borrowers"
"borrowers": "# of borrowers",
"deposit": "Deposit",
"smartPool": "Smart Pool"
},
"es": {
"days": "días",
"totalBorrowed": "Total Prestado",
"liquidity": "Liquidez",
"utilizationRate": "Tasa de Utilización",
"suppliers": "# de proveedores",
"borrowers": "# de prestamistas"
"borrowers": "# de prestamistas",
"deposit": "Depositar",
"smartPool": "Smart Pool"
}
}
4 changes: 3 additions & 1 deletion config/numbers.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"decimals": 2,
"approvalAmount": 99999999999
"approvalAmount": 99999999999,
"daysToWarning": 2,
"daysToError": 0
}

0 comments on commit 91b727e

Please sign in to comment.