CONSOLE-4778: Bump i18next and react-i18next to the reasonably recent version
Updating i18next and react-i18next to reasonably stable version.
i18next: 23.16.x
react-i18next: 15.1.x
Verified the changes on dynamic plugins for breaking changes: None found on Dynamic Demo plugin, CronTab plugin, KubeVirt plugin
@krishagarwal278: This pull request references CONSOLE-4778 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.
In response to this:
Updating i18next and react-i18next to reasonably stable version.
i18next: 23.16.x
react-i18next: 15.1.x
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
/retest
/label docs-approved /label px-approved
/label px-approved /label docs-approved
qe-approval / verified label: /assign @yapei @yanpzhan
@krishagarwal278: This pull request references CONSOLE-4778 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.
In response to this:
Updating i18next and react-i18next to reasonably stable version.
i18next: 23.16.x
react-i18next: 15.1.x
Verified the changes on dynamic plugins for breaking changes: None found on Dynamic Demo Plugin, CronTab plugin, KubeVirt plugin
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
@krishagarwal278: This pull request references CONSOLE-4778 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.
In response to this:
Updating i18next and react-i18next to reasonably stable version.
i18next: 23.16.x
react-i18next: 15.1.x
Verified the changes on dynamic plugins for breaking changes: None found on Dynamic Demo plugin, CronTab plugin, KubeVirt plugin
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
/label tide/merge-method-squash
/retest
Checked on cluster launched against the pr. There is not regression issue. /label qe-approved /verified by @yanpzhan
@krishagarwal278: This pull request references CONSOLE-4778 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.
In response to this:
Updating i18next and react-i18next to reasonably stable version.
i18next: 23.16.x
react-i18next: 15.1.x
Verified the changes on dynamic plugins for breaking changes: None found on Dynamic Demo plugin, CronTab plugin, KubeVirt plugin
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
@yanpzhan: This PR has been marked as verified by @yanpzhan.
In response to this:
Checked on cluster launched against the pr. There is not regression issue. /label qe-approved /verified by @yanpzhan
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
Walkthrough
Dependency bumps for i18next/react-i18next and i18next-parser; TFunction type imports moved from react-i18next to i18next; many translation returns changed from plain strings to React nodes; getVSphereHealth parameter order changed; assorted typing and small JSX adjustments across UI and tests.
Changes
| Cohort / File(s) | Change Summary |
|---|---|
Dependency updates dynamic-demo-plugin/package.json, frontend/package.json |
Bumped i18next and react-i18next; dynamic-demo-plugin also updated i18next-parser to ^9.3.0. |
TFunction import/source migration & test typing casts frontend/packages/metal3-plugin/src/validations/validations.tsx, frontend/packages/topology/src/__tests__/TopologyShortcuts.spec.tsx, frontend/packages/vsphere-plugin/src/components/persist.ts, frontend/packages/vsphere-plugin/src/components/utils.ts, frontend/packages/console-plugin-sdk/src/utils/__tests__/extension-i18n.spec.ts, frontend/packages/dev-console/src/components/import/__tests__/import-submit-utils.spec.ts, frontend/packages/dev-console/src/components/catalog/providers/__tests__/useConsoleSamples.spec.ts |
Switched TFunction type imports from 'react-i18next' to 'i18next'; tests adjusted with casts or removed explicit TFunction annotations. |
Translation return wrapping (string → ReactNode) dynamic-demo-plugin/src/components/CustomOverviewDetailItem.tsx, frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx, frontend/public/components/about-modal.tsx, frontend/public/components/error.tsx, frontend/public/components/monitoring/receiver-forms/alert-manager-receiver-forms.tsx, frontend/public/components/pod.tsx, frontend/packages/console-app/src/components/nodes/NodesPage.tsx, frontend/public/components/cron-job.tsx, frontend/public/components/modals/column-management-modal.tsx, frontend/public/components/monitoring/receiver-forms/alert-manager-receiver-forms.tsx, frontend/public/components/error.tsx |
Replaced plain-string translation returns with JSX fragments (e.g., <>{t('...')}</>) so translated values are React nodes. |
Operator CSV status type assertions frontend/packages/operator-lifecycle-manager/src/status/csv-status.ts |
Added casts of i18n.t(...) results to ClusterServiceVersionStatus in multiple branches. |
VSphere plugin parameter reorder & callsite updates frontend/packages/vsphere-plugin/src/components/getVSphereHealth.ts, frontend/packages/vsphere-plugin/src/components/ClusterOverview/VSphereStatus.tsx |
Changed getVSphereHealth signature from (t, responses, k8sResult) to (responses, k8sResult, t?); updated call sites to new ordering. |
i18n usage / translation callback refactor frontend/public/module/k8s/get-resources.ts |
Removed local TFunction wrapper; now imports default i18next and passes i18next.t to translateExtension; integrated i18n loading flag. |
useTranslationExt & validation typing changes frontend/packages/console-plugin-sdk/src/utils/useTranslationExt.ts, frontend/packages/console-shared/src/utils/yup-validations.ts |
Removed explicit TFunction usage; tightened useTranslationExt options to UseTranslationOptions<string>; nameValidationSchema no longer types t as TFunction. |
Component typing changes (React.FC → React.FCC) frontend/public/components/custom-resource-definition.tsx |
Multiple components changed from React.FC to React.FCC; added CustomResourceDefinitionsPageProps alias and minor JSX wrapping in table cells. |
Minor runtime-safe adjustments & locale edits frontend/public/components/modals/configure-count-modal.tsx, frontend/public/components/about-modal.tsx, frontend/public/locales/en/public.json |
Coerced a t(...) result to String(...) in one place; wrapped some translations in fragments; removed trailing periods from two locale keys/values. |
Misc — UI small JSX updates frontend/packages/console-app/src/components/nodes/NodesPage.tsx, frontend/public/components/pod.tsx, frontend/public/components/cron-job.tsx, frontend/public/components/modals/column-management-modal.tsx |
Small JSX changes to return React nodes (fragments) for translated content in various UI components. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~25 minutes
- Verify all VSphere
getVSphereHealthcall sites updated and that optionaltis provided where needed. - Confirm
ClusterServiceVersionStatuscasts match runtime values and do not mask mismatches. - Review
React.FCCtyping changes incustom-resource-definition.tsxfor downstream compatibility. - Ensure replacing local translation wrapper with
i18next.tinget-resources.tspreserves translation behavior and respects loading state.
✨ Finishing touches
- [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Comment @coderabbitai help to get the list of available commands and usage tips.
/retest
/retest
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: krishagarwal278
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@krishagarwal278: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| ci/prow/okd-scos-e2e-aws-ovn | cb45dcf8a79dcab7585ae2af0a3f3e8520e0f307 | link | false | /test okd-scos-e2e-aws-ovn |
| ci/prow/e2e-gcp-console | 18305fd1c440c32e466fd32c684639878d516589 | link | true | /test e2e-gcp-console |
| ci/prow/frontend | 18305fd1c440c32e466fd32c684639878d516589 | link | true | /test frontend |
| ci/prow/okd-scos-images | 9ac9e36e6bca30bd2b7f84752cc588f4cb842b44 | link | true | /test okd-scos-images |
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.