Skip to content

Commit

Permalink
build: clean up unused i18n (Uniswap#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzmp authored Mar 1, 2023
1 parent 0c7498a commit 26e4474
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: ./.github/actions/setup
- run: yarn prepare

- run: yarn prei18n:extract
- run: yarn prei18n:compile
- uses: crowdin/[email protected]
with:
upload_sources: true
Expand Down
2 changes: 0 additions & 2 deletions lingui.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 0 additions & 6 deletions src/cosmos/Swap.fixture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -111,7 +106,6 @@ function Fixture() {
defaultOutputTokenAddress={defaultOutputToken}
defaultOutputAmount={defaultOutputAmount}
hideConnectionUI={hideConnectionUI}
locale={locale}
defaultChainId={defaultChainId}
provider={connector}
theme={theme}
Expand Down

0 comments on commit 26e4474

Please sign in to comment.