Commit 408a07eb authored by Moody Salem's avatar Moody Salem

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

parent 7f837810
...@@ -17,6 +17,18 @@ jobs: ...@@ -17,6 +17,18 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 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 - name: Synchronize
uses: crowdin/github-action@1.1.0 uses: crowdin/github-action@1.1.0
with: with:
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
/src/locales/**/*.js /src/locales/**/*.js
/src/locales/**/*.ts /src/locales/**/*.ts
/src/locales/**/*.json /src/locales/**/*.json
/src/locales/**/en-US.po
# dependencies # dependencies
/node_modules /node_modules
......
...@@ -126,8 +126,7 @@ ...@@ -126,8 +126,7 @@
"compile-contract-types": "yarn compile-external-abi-types && yarn compile-v3-contract-types", "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-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'", "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", "build": "yarn compile-contract-types && yarn i18n:compile && react-scripts build",
"i18n:extract": "lingui extract --locale en-US --overwrite",
"i18n:compile": "lingui compile", "i18n:compile": "lingui compile",
"integration-test": "start-server-and-test 'serve build -l 3000' http://localhost:3000 'cypress run'", "integration-test": "start-server-and-test 'serve build -l 3000' http://localhost:3000 'cypress run'",
"postinstall": "yarn compile-contract-types", "postinstall": "yarn compile-contract-types",
......
...@@ -10,7 +10,7 @@ import useParsedQueryString from './useParsedQueryString' ...@@ -10,7 +10,7 @@ import useParsedQueryString from './useParsedQueryString'
function parseLocale(maybeSupportedLocale: string): SupportedLocale | undefined { function parseLocale(maybeSupportedLocale: string): SupportedLocale | undefined {
const lowerMaybeSupportedLocale = maybeSupportedLocale.toLowerCase() const lowerMaybeSupportedLocale = maybeSupportedLocale.toLowerCase()
return SUPPORTED_LOCALES.find( return SUPPORTED_LOCALES.find(
(locale) => locale.toLowerCase() === lowerMaybeSupportedLocale || locale.slice(0, 2) === lowerMaybeSupportedLocale (locale) => locale.toLowerCase() === lowerMaybeSupportedLocale || locale.split('-')[0] === lowerMaybeSupportedLocale
) )
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment