try extracting en-US.po only in the github workflow

This commit is contained in:
Moody Salem 2021-05-29 15:32:51 -05:00
parent 7f837810e0
commit 408a07ebd4
No known key found for this signature in database
GPG Key ID: 8CB5CD10385138DB
5 changed files with 15 additions and 1785 deletions

@ -17,6 +17,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Extract translations
run: "yarn lingui extract --locale en-US"
- name: Synchronize
uses: crowdin/github-action@1.1.0
with:

1
.gitignore vendored

@ -6,6 +6,7 @@
/src/locales/**/*.js
/src/locales/**/*.ts
/src/locales/**/*.json
/src/locales/**/en-US.po
# dependencies
/node_modules

@ -126,8 +126,7 @@
"compile-contract-types": "yarn compile-external-abi-types && yarn compile-v3-contract-types",
"compile-external-abi-types": "typechain --target ethers-v5 --out-dir src/abis/types './src/abis/**/*.json'",
"compile-v3-contract-types": "typechain --target ethers-v5 --out-dir src/types/v3 './node_modules/@uniswap/?(v3-core|v3-periphery)/artifacts/contracts/**/*.json'",
"build": "yarn compile-contract-types yarn i18n:extract && yarn i18n:compile && react-scripts build",
"i18n:extract": "lingui extract --locale en-US --overwrite",
"build": "yarn compile-contract-types && yarn i18n:compile && react-scripts build",
"i18n:compile": "lingui compile",
"integration-test": "start-server-and-test 'serve build -l 3000' http://localhost:3000 'cypress run'",
"postinstall": "yarn compile-contract-types",

@ -10,7 +10,7 @@ import useParsedQueryString from './useParsedQueryString'
function parseLocale(maybeSupportedLocale: string): SupportedLocale | undefined {
const lowerMaybeSupportedLocale = maybeSupportedLocale.toLowerCase()
return SUPPORTED_LOCALES.find(
(locale) => locale.toLowerCase() === lowerMaybeSupportedLocale || locale.slice(0, 2) === lowerMaybeSupportedLocale
(locale) => locale.toLowerCase() === lowerMaybeSupportedLocale || locale.split('-')[0] === lowerMaybeSupportedLocale
)
}

File diff suppressed because it is too large Load Diff