diff --git a/src/components/SearchModal/ImportToken.tsx b/src/components/SearchModal/ImportToken.tsx
index 410a92e4fc..5a831a484f 100644
--- a/src/components/SearchModal/ImportToken.tsx
+++ b/src/components/SearchModal/ImportToken.tsx
@@ -18,6 +18,7 @@ import { ExternalLink } from '../../theme/components'
import ListLogo from 'components/ListLogo'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { PaddedColumn } from './styleds'
+import { Plural, Trans } from '@lingui/macro'
const Wrapper = styled.div`
position: relative;
@@ -59,7 +60,9 @@ export function ImportToken({ tokens, list, onBack, onDismiss, handleCurrencySel
{onBack ? : }
- Import {tokens.length > 1 ? 'Tokens' : 'Token'}
+
+
+
{onDismiss ? : }
@@ -68,9 +71,10 @@ export function ImportToken({ tokens, list, onBack, onDismiss, handleCurrencySel
- {
- "This token doesn't appear on the active token list(s). Make sure this is the token that you want to trade."
- }
+
+ This token doesn't appear on the active token list(s). Make sure this is the token that you want to
+ trade.
+
{tokens.map((token) => {
@@ -101,7 +105,7 @@ export function ImportToken({ tokens, list, onBack, onDismiss, handleCurrencySel
{list.logoURI && }
- via {list.name} token list
+ via {list.name} token list
) : (
@@ -109,7 +113,7 @@ export function ImportToken({ tokens, list, onBack, onDismiss, handleCurrencySel
- Unknown Source
+ Unknown Source
@@ -129,7 +133,7 @@ export function ImportToken({ tokens, list, onBack, onDismiss, handleCurrencySel
}}
className=".token-dismiss-button"
>
- Import
+ Import
diff --git a/src/i18n.tsx b/src/i18n.tsx
index 6683b99309..d3b1deb83d 100644
--- a/src/i18n.tsx
+++ b/src/i18n.tsx
@@ -4,10 +4,80 @@ import { I18nProvider } from '@lingui/react'
import { ReactNode } from 'react'
import { useActiveLocale, useSetLocaleFromUrl } from 'hooks/useActiveLocale'
import { SupportedLocale } from 'constants/locales'
+import {
+ af,
+ ar,
+ ca,
+ cs,
+ da,
+ de,
+ el,
+ en,
+ es,
+ fi,
+ fr,
+ he,
+ hu,
+ id,
+ it,
+ ja,
+ ko,
+ nl,
+ no,
+ pl,
+ pt,
+ ro,
+ ru,
+ sr,
+ sv,
+ tr,
+ uk,
+ vi,
+ zh,
+ PluralCategory,
+} from 'make-plural/plurals'
+
+type LocalePlural = {
+ [key in SupportedLocale]: (n: number | string, ord?: boolean) => PluralCategory
+}
+
+const plurals: LocalePlural = {
+ 'af-ZA': af,
+ 'ar-SA': ar,
+ 'ca-ES': ca,
+ 'cs-CZ': cs,
+ 'da-DK': da,
+ 'de-DE': de,
+ 'el-GR': el,
+ 'en-US': en,
+ 'es-ES': es,
+ 'fi-FI': fi,
+ 'fr-FR': fr,
+ 'he-IL': he,
+ 'hu-HU': hu,
+ 'id-ID': id,
+ 'it-IT': it,
+ 'ja-JP': ja,
+ 'ko-KR': ko,
+ 'nl-NL': nl,
+ 'no-NO': no,
+ 'pl-PL': pl,
+ 'pt-BR': pt,
+ 'pt-PT': pt,
+ 'ro-RO': ro,
+ 'ru-RU': ru,
+ 'sr-SP': sr,
+ 'sv-SE': sv,
+ 'tr-TR': tr,
+ 'uk-UA': uk,
+ 'vi-VN': vi,
+ 'zh-CN': zh,
+ 'zh-TW': zh,
+}
export async function dynamicActivate(locale: SupportedLocale) {
const { messages } = await import(`@lingui/loader!./locales/${locale}.po`)
- i18n.loadLocaleData(locale, { plurals: () => null })
+ i18n.loadLocaleData(locale, { plurals: () => plurals[locale] })
i18n.load(locale, messages)
i18n.activate(locale)
}