From 26e44747c78e429d7702f24f2e6bde416a0e00fd Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Wed, 1 Mar 2023 13:35:01 -0800 Subject: [PATCH] build: clean up unused i18n (#522) --- .github/workflows/release.yaml | 2 +- lingui.config.ts | 2 -- package.json | 6 ++---- src/cosmos/Swap.fixture.tsx | 6 ------ 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 240781449..565c5bcc6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,7 +15,7 @@ jobs: - uses: ./.github/actions/setup - run: yarn prepare - - run: yarn prei18n:extract + - run: yarn prei18n:compile - uses: crowdin/github-action@1.4.8 with: upload_sources: true diff --git a/lingui.config.ts b/lingui.config.ts index 5d4fad743..7f22424da 100644 --- a/lingui.config.ts +++ b/lingui.config.ts @@ -46,13 +46,11 @@ const linguiConfig = { 'vi-VN', 'zh-CN', 'zh-TW', - 'pseudo', ], orderBy: 'messageId', rootDir: '.', runtimeConfigModule: ['@lingui/core', 'i18n'], sourceLocale: 'en-US', - pseudoLocale: 'pseudo', } export default linguiConfig diff --git a/package.json b/package.json index 0fa80b970..f6a931dbf 100644 --- a/package.json +++ b/package.json @@ -28,10 +28,8 @@ "contracts:compile:abi": "typechain --target ethers-v5 --out-dir src/abis/types \"./src/abis/**/*.json\"", "contracts:compile:v3": "typechain --target ethers-v5 --out-dir src/types/v3 \"./node_modules/@uniswap/**/artifacts/contracts/**/*.json\"", "contracts:compile": "yarn contracts:compile:abi && yarn contracts:compile:v3", - "prei18n:extract": "touch src/locales/en-US.po", - "i18n:extract": "lingui extract --locale en-US", - "i18n:compile": "yarn i18n:extract && lingui compile", - "i18n:pseudo": "lingui extract --locale pseudo && lingui compile", + "prei18n:compile": "lingui extract --locale en-US", + "i18n:compile": "lingui compile", "ajv:compile": "node scripts/compileAjvValidators.js", "prepare": "yarn contracts:compile && yarn i18n:compile && yarn ajv:compile", "prepublishOnly": "yarn build", diff --git a/src/cosmos/Swap.fixture.tsx b/src/cosmos/Swap.fixture.tsx index 280e65d00..827cae2ad 100644 --- a/src/cosmos/Swap.fixture.tsx +++ b/src/cosmos/Swap.fixture.tsx @@ -2,11 +2,9 @@ import { tokens } from '@uniswap/default-token-list' import { TokenInfo } from '@uniswap/token-lists' import { darkTheme, - DEFAULT_LOCALE, defaultTheme, DialogAnimationType, lightTheme, - SUPPORTED_LOCALES, SupportedChainId, SwapWidget, } from '@uniswap/widgets' @@ -71,9 +69,6 @@ function Fixture() { const [width] = useValue('width', { defaultValue: 360 }) - const locales = [...SUPPORTED_LOCALES, 'fa-KE (unsupported)', 'pseudo'] - const locale = useOption('locale', { options: locales, defaultValue: DEFAULT_LOCALE, nullable: false }) - const [theme, setTheme] = useValue('theme', { defaultValue: defaultTheme }) const [darkMode] = useValue('darkMode', { defaultValue: false }) useEffect(() => setTheme((theme) => ({ ...theme, ...(darkMode ? darkTheme : lightTheme) })), [darkMode, setTheme]) @@ -111,7 +106,6 @@ function Fixture() { defaultOutputTokenAddress={defaultOutputToken} defaultOutputAmount={defaultOutputAmount} hideConnectionUI={hideConnectionUI} - locale={locale} defaultChainId={defaultChainId} provider={connector} theme={theme}