Skip to content

Commit

Permalink
fix(web): freeze i18next to fix auspice locales
Browse files Browse the repository at this point in the history
Here I downgrade and freeze (through yarn "resolutions") versions of i18n packages to the same versions as specified in Auspice `package.json`:

```
"i18next": "19.3.2",
"react-i18next": "11.3.3",
```

This ensures correct display of namespaced entries. For example `sidebar: ColorBy` was displayed as `sidebar: ColorBy` and never translated. Now the correct string is pulled from JSON.

It seems that the versions previously used in Nextclade did not work correctly with whatever Auspice is using. Synchronizing these version makes it work.
  • Loading branch information
ivan-aksamentov committed Oct 21, 2022
1 parent 6cbb2f7 commit 3604038
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 27 deletions.
8 changes: 4 additions & 4 deletions packages_rs/nextclade-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"flag-icon-css": "3.5.0",
"formik": "2.2.9",
"history": "5.3.0",
"i18next": "21.6.16",
"i18next": "19.3.2",
"immutable": "4.0.0",
"intercept-stdout": "0.1.2",
"jschardet": "3.0.0",
Expand All @@ -127,7 +127,7 @@
"react-error-boundary": "3.1.4",
"react-file-icon": "1.1.0",
"react-helmet": "6.1.0",
"react-i18next": "11.16.7",
"react-i18next": "11.3.3",
"react-icons": "4.3.1",
"react-if": "4.1.4",
"react-loader-spinner": "5.1.4",
Expand Down Expand Up @@ -404,7 +404,7 @@
"eslint-plugin-security": "1.5.0",
"eslint-plugin-sonarjs": "0.13.0",
"eslint-plugin-unicorn": "42.0.0",
"i18next": "21.6.16",
"i18next": "19.3.2",
"lodash": "4.17.21",
"marked": "4.0.14",
"next": "12.1.6",
Expand All @@ -414,7 +414,7 @@
"react": "18.1.0",
"react-dom": "18.1.0",
"react-error-boundary": "2.2.3",
"react-i18next": "11.16.7",
"react-i18next": "11.3.3",
"react-redux": "7.2.8",
"redux": "4.2.0",
"reflect-metadata": "0.1.13",
Expand Down
52 changes: 29 additions & 23 deletions packages_rs/nextclade-web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1830,13 +1830,20 @@
dependencies:
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.8", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2", "@babel/runtime@^7.9.6":
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.6", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2", "@babel/runtime@^7.9.6":
version "7.17.9"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72"
integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==
dependencies:
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.3.1":
version "7.19.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.4.tgz#a42f814502ee467d55b38dd1c256f53a7b885c78"
integrity sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==
dependencies:
regenerator-runtime "^0.13.4"

"@babel/template@^7.12.7", "@babel/template@^7.16.7", "@babel/template@^7.3.3", "@babel/template@^7.8.6":
version "7.16.7"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155"
Expand Down Expand Up @@ -8719,7 +8726,7 @@ html-entities@^2.1.0, html-entities@^2.3.2:
resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46"
integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==

html-escaper@^2.0.0, html-escaper@^2.0.2:
html-escaper@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
Expand All @@ -8737,12 +8744,12 @@ html-minifier-terser@^5.0.1:
relateurl "^0.2.7"
terser "^4.6.3"

html-parse-stringify@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz#dfc1017347ce9f77c8141a507f233040c59c55d2"
integrity sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==
html-parse-stringify2@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/html-parse-stringify2/-/html-parse-stringify2-2.0.1.tgz#dc5670b7292ca158b7bc916c9a6735ac8872834a"
integrity sha512-wMKQ3aJ/dwXzDHPpA7XgsRXXCkEhHkAF6Ioh7D51lgZO7Qy0LmcFddC9TI/qNQJvSM1KL8KbcR3FtuybsrzFlQ==
dependencies:
void-elements "3.1.0"
void-elements "^2.0.1"

html-tags@^3.0.0, html-tags@^3.1.0, html-tags@^3.2.0:
version "3.2.0"
Expand Down Expand Up @@ -8853,12 +8860,12 @@ i18next-parser@6.3.0:
vinyl-fs "^3.0.2"
vue-template-compiler "^2.6.11"

i18next@21.6.16, i18next@^19.3.2, i18next@^21.2.0:
version "21.6.16"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.6.16.tgz#8cff8c3ba2ffaf8438a8c83fe284083f15cf3941"
integrity sha512-xJlzrVxG9CyAGsbMP1aKuiNr1Ed2m36KiTB7hjGMG2Zo4idfw3p9THUEu+GjBwIgEZ7F11ZbCzJcfv4uyfKNuw==
i18next@19.3.2, i18next@^19.3.2, i18next@^21.2.0:
version "19.3.2"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-19.3.2.tgz#a17c3c8bb0dd2d8c4a8963429df99730275b3282"
integrity sha512-QDBQ8MqFWi4+L9OQjjZEKVyg9uSTy3NTU3Ri53QHe7nxtV+KD4PyLB8Kxu58gr6b9y5l8cU3mCiNHVeoxPMzAQ==
dependencies:
"@babel/runtime" "^7.17.2"
"@babel/runtime" "^7.3.1"

iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24"
Expand Down Expand Up @@ -12920,14 +12927,13 @@ react-hot-loader@^4.8.4:
shallowequal "^1.1.0"
source-map "^0.7.3"

react-i18next@11.16.7, react-i18next@^11.3.3:
version "11.16.7"
resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.16.7.tgz#8d0680b7f4c8e43f59996336b7183ad576a28df7"
integrity sha512-7yotILJLnKfvUfrl/nt9eK9vFpVFjZPLWAwBzWL6XppSZZEvlmlKk0GBGDCAPfLfs8oND7WAbry8wGzdoiW5Nw==
react-i18next@11.3.3, react-i18next@^11.3.3:
version "11.3.3"
resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.3.3.tgz#a84dcc32e3ad013012964d836790d8c6afac8e88"
integrity sha512-sGnPwJ0Kf8qTRLTnTRk030KiU6WYEZ49rP9ILPvCnsmgEKyucQfTxab+klSYnCSKYija+CWL+yo+c9va9BmJeg==
dependencies:
"@babel/runtime" "^7.14.5"
html-escaper "^2.0.2"
html-parse-stringify "^3.0.1"
"@babel/runtime" "^7.3.1"
html-parse-stringify2 "2.0.1"

react-icons@4.3.1:
version "4.3.1"
Expand Down Expand Up @@ -15950,10 +15956,10 @@ vinyl@^2.0.0, vinyl@~2.2.1:
remove-trailing-separator "^1.0.1"
replace-ext "^1.0.0"

void-elements@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09"
integrity sha1-YU9/v42AHwu18GYfWy9XhXUOTwk=
void-elements@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==

vscode-json-languageservice@^4.1.6:
version "4.2.1"
Expand Down

0 comments on commit 3604038

Please sign in to comment.