feat(i18n): improve i18n (#1692)
* replaced i18next with lingui * integrate lingui in i18n and update dev setup * updated components to @lingui * fix compile error after rebase * detect locale * add all previous languages to linguirc * address pr feedback * remove it for now * ignore generate *js files, various fixes * added more translations * fixed yarn build command * wrapped more hardcoded english around <Trans> * finished second round of translations * added support for pseudo-en locale * improvements * moved copy.tsx to different branch * moved extra files to different branch * regenerated po * clean up * more fixes * regenerate po * remove messages.js * clean up * addressed pr feedback * regenerated po
Showing
lingui.config.js
0 → 100644
... | ... | @@ -6,6 +6,11 @@ |
"devDependencies": { | ||
"@emotion/core": "^11.0.0", | ||
"@ethersproject/experimental": "^5.2.0", | ||
"@lingui/cli": "^3.9.0", | ||
"@lingui/detect-locale": "^3.9.0", | ||
"@lingui/loader": "^3.9.0", | ||
"@lingui/macro": "^3.9.0", | ||
"@lingui/react": "^3.9.0", | ||
"@metamask/jazzicon": "^2.0.0", | ||
"@popperjs/core": "^2.4.4", | ||
"@reach/dialog": "^0.10.3", | ||
... | ... | @@ -24,6 +29,9 @@ |
"@styled-system/css": "^5.1.5", | ||
"@typechain/ethers-v5": "^7.0.0", | ||
"@types/jest": "^25.2.1", | ||
"@types/lingui__core": "^2.7.1", | ||
"@types/lingui__macro": "^2.7.4", | ||
"@types/lingui__react": "^2.8.3", | ||
"@types/lodash.flatmap": "^4.5.6", | ||
"@types/luxon": "^1.24.4", | ||
"@types/multicodec": "^1.0.0", | ||
... | ... | @@ -70,9 +78,6 @@ |
"eslint-plugin-react": "^7.19.0", | ||
"eslint-plugin-react-hooks": "^4.0.0", | ||
"ethers": "^5.2.0", | ||
"i18next": "^15.0.9", | ||
"i18next-browser-languagedetector": "^3.0.1", | ||
"i18next-xhr-backend": "^2.0.1", | ||
"inter-ui": "^3.13.1", | ||
"lightweight-charts": "^3.3.0", | ||
"lodash.flatmap": "^4.5.0", | ||
... | ... | @@ -89,7 +94,6 @@ |
"react-dom": "^17.0.1", | ||
"react-feather": "^2.0.8", | ||
"react-ga": "^2.5.7", | ||
"react-i18next": "^10.7.0", | ||
"react-markdown": "^4.3.1", | ||
"react-popper": "^2.2.3", | ||
"react-redux": "^7.2.2", | ||
... | ... | @@ -123,10 +127,12 @@ |
"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 && react-scripts build", | ||
"build": "yarn compile-contract-types yarn i18n:extract && yarn i18n:compile && react-scripts build", | ||
"i18n:extract": "lingui extract", | ||
"i18n:compile": "lingui compile", | ||
"integration-test": "start-server-and-test 'serve build -l 3000' http://localhost:3000 'cypress run'", | ||
"postinstall": "yarn compile-contract-types", | ||
"start": "yarn compile-contract-types && react-scripts start", | ||
"start": "yarn compile-contract-types && yarn i18n:extract && yarn i18n:compile && react-scripts start", | ||
"storybook": "start-storybook -p 6006", | ||
"test": "react-scripts test --env=jsdom" | ||
}, | ||
... | ... |
src/i18n.ts
deleted
100644 → 0
src/i18n.tsx
0 → 100644
src/locales/en/messages.po
0 → 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment