Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore) Bump i18next, react-i18next and i18next-parser and support for pluralization #788

Merged
merged 4 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

set -e # die on error

yarn run extract-translations
yarn turbo extract-translations
yarn pretty-quick --staged
yarn lerna run document --since main
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@
"verify": "turbo run lint && turbo run test && turbo run typescript",
"prettier": "prettier \"packages/**/src/**/*\" --write",
"postinstall": "husky install",
"extract-translations": "lerna run extract-translations -- --config ../../../tools/i18next-parser.config.js",
"test": "cross-env TZ=UTC jest --config jest.config.json --verbose false --passWithNoTests",
"test-watch": "cross-env TZ=UTC jest --watch --config jest.config.json",
"test-e2e": "playwright test",
"coverage": "yarn test --coverage"
},
"devDependencies": {
"@babel/highlight": "^7.18.6",
"@jest/types": "^28.1.3",
"@jest/types": "^29.6.3",
"@playwright/test": "^1.30.0",
"@swc/core": "^1.3.58",
"@swc/jest": "^0.2.22",
Expand All @@ -51,11 +50,11 @@
"fake-indexeddb": "^4.0.1",
"fork-ts-checker-webpack-plugin": "^7.2.13",
"husky": "^8.0.1",
"i18next-parser": "^5.4.0",
"i18next-parser": "^6.6.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^28.1.0",
"jest-cli": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lerna": "^4.0.0",
"openmrs": "workspace:^",
"postcss": "^8.4.6",
Expand All @@ -73,8 +72,7 @@
"webpack": "^5.88.0"
},
"resolutions": {
"minipass": "3.3.5",
"parse5": "^6"
"minipass": "3.3.5"
},
"packageManager": "[email protected]"
}
4 changes: 2 additions & 2 deletions packages/apps/esm-implementer-tools-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"analyze": "webpack --mode=production --env analyze=true",
"typescript": "tsc",
"lint": "eslint src --ext ts,tsx",
"extract-translations": "i18next 'src/**/*.component.tsx'"
"extract-translations": "i18next 'src/**/*.component.tsx' --config='../../../tools/i18next-parser.config.js'"
},
"keywords": [
"openmrs",
Expand Down Expand Up @@ -56,7 +56,7 @@
"react": "^18.1.0",
"react-ace": "^9.5.0",
"react-dom": "^18.1.0",
"react-i18next": "^11.16.9",
"react-i18next": "^11.18.6",
"rxjs": "^6.5.3",
"swr": "^2.2.2",
"webpack": "^5.88.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/apps/esm-login-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"analyze": "webpack --mode=production --env analyze=true",
"typescript": "tsc",
"lint": "eslint src --ext ts,tsx",
"extract-translations": "i18next 'src/**/*.component.tsx'"
"extract-translations": "i18next 'src/**/*.component.tsx' --config='../../../tools/i18next-parser.config.js'"
},
"keywords": [
"openmrs",
Expand Down Expand Up @@ -53,10 +53,10 @@
"devDependencies": {
"@openmrs/esm-framework": "^5.2.0",
"@openmrs/webpack-config": "^5.2.0",
"jest": "^28.1.0",
"jest": "^29.7.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-i18next": "^11.16.9",
"react-i18next": "^11.18.6",
"react-router-dom": "^6.3.0",
"rxjs": "^6.5.3",
"swr": "^2.2.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/apps/esm-offline-tools-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"analyze": "webpack --mode=production --env analyze=true",
"typescript": "tsc",
"lint": "eslint src --ext ts,tsx",
"extract-translations": "i18next 'src/**/*.component.tsx'"
"extract-translations": "i18next 'src/**/*.component.tsx' --config='../../../tools/i18next-parser.config.js'"
},
"keywords": [
"openmrs",
Expand Down Expand Up @@ -55,10 +55,10 @@
"@openmrs/esm-framework": "^5.2.0",
"@openmrs/webpack-config": "^5.2.0",
"@types/lodash-es": "^4.17.5",
"jest": "^28.1.0",
"jest": "^29.7.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-i18next": "^11.16.9",
"react-i18next": "^11.18.6",
"react-router-dom": "^6.3.0",
"rxjs": "^6.5.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/esm-offline-tools-app/translations/km.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"emptyStateText": "There are no {displayText} to display",
"home": "ទំព័រ​ដើម",
"home": "ផ្ទះ",
"homeHeader": "Offline home",
"homeOverviewCardOfflineActionsFailedToUpload": "Failed to upload",
"homeOverviewCardOfflineActionsHeader": "សកម្មភាពក្រៅបណ្តាញ",
Expand Down
6 changes: 3 additions & 3 deletions packages/apps/esm-primary-navigation-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"analyze": "webpack --mode=production --env analyze=true",
"typescript": "tsc",
"lint": "eslint src --ext ts,tsx",
"extract-translations": "i18next 'src/**/*.component.tsx'"
"extract-translations": "i18next 'src/**/*.component.tsx' --config='../../../tools/i18next-parser.config.js'"
},
"keywords": [
"openmrs",
Expand Down Expand Up @@ -53,10 +53,10 @@
"devDependencies": {
"@openmrs/esm-framework": "^5.2.0",
"@openmrs/webpack-config": "^5.2.0",
"jest": "^28.1.0",
"jest": "^29.7.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-i18next": "^11.16.9",
"react-i18next": "^11.18.6",
"react-router-dom": "^6.3.0",
"rxjs": "^6.5.3",
"webpack": "^5.88.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/framework/esm-framework/docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4412,7 +4412,7 @@ ___

| Name | Type |
| :------ | :------ |
| `T` | extends `HTMLElement` = `HTMLElement` |
| `T` | extends `HTMLElement`<`T`\> = `HTMLElement` |

#### Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Error.prepareStackTrace

#### Defined in

packages/framework/esm-framework/node_modules/@types/node/ts4.8/globals.d.ts:11
node_modules/@types/node/ts4.8/globals.d.ts:11

___

Expand All @@ -178,7 +178,7 @@ Error.stackTraceLimit

#### Defined in

packages/framework/esm-framework/node_modules/@types/node/ts4.8/globals.d.ts:13
node_modules/@types/node/ts4.8/globals.d.ts:13

## Methods

Expand All @@ -205,4 +205,4 @@ Error.captureStackTrace

#### Defined in

packages/framework/esm-framework/node_modules/@types/node/ts4.8/globals.d.ts:4
node_modules/@types/node/ts4.8/globals.d.ts:4
6 changes: 3 additions & 3 deletions packages/framework/esm-framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
"swr": "2.x"
},
"devDependencies": {
"jest": "28.1.0",
"jest-cli": "28.1.0",
"jest-environment-jsdom": "28.1.0",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"webpack": "^5.88.0"
}
}
4 changes: 2 additions & 2 deletions packages/framework/esm-react-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
"@openmrs/esm-feature-flags": "^5.2.0",
"@openmrs/esm-globals": "^5.2.0",
"dayjs": "^1.10.8",
"i18next": "^19.6.0",
"i18next": "^21.10.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-i18next": "^11.16.9",
"react-i18next": "^11.18.6",
"rxjs": "^6.5.3",
"swr": "^2.2.2",
"webpack": "^5.88.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/framework/esm-styleguide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
"@openmrs/esm-state": "^5.2.0",
"autoprefixer": "^9.8.8",
"css-minimizer-webpack-plugin": "^1.2.0",
"i18next": "^19.6.0",
"jest": "^28.1.2",
"jest-environment-jsdom": "^28.1.2",
"i18next": "^21.10.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.4.6",
"react": "^18.1.0",
"react-dom": "^18.1.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/shell/esm-app-shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
"dayjs": "^1.10.4",
"dexie": "^3.0.3",
"html-webpack-plugin": "^5.5.0",
"i18next": "^19.6.0",
"i18next-browser-languagedetector": "^4.3.1",
"i18next-icu": "^1.4.2",
"i18next": "^21.10.0",
"i18next-browser-languagedetector": "^6.1.8",
"i18next-icu": "^2.3.0",
"import-map-overrides": "^3.0.0",
"lodash-es": "4.17.21",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-i18next": "^11.7.0",
"react-i18next": "^11.18.6",
"react-router-dom": "^6.3.0",
"rxjs": "^6.5.3",
"semver": "^7.3.4",
Expand Down
9 changes: 0 additions & 9 deletions tools/i18next-parser.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,6 @@ module.exports = {
sort: true,
// Whether or not to sort the catalog

skipDefaultValues: false,
// Whether to ignore default values
// You may also specify a function accepting the locale and namespace as arguments

useKeysAsDefaultValue: false,
// Whether to use the keys as the default value; ex. "Hello": "Hello", "World": "World"
// This option takes precedence over the `defaultValue` and `skipDefaultValues` options
// You may also specify a function accepting the locale and namespace as arguments

verbose: false,
// Display info about the parsing including some stats

Expand Down
Loading
Loading