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
i18n support in devconsole helm components #7117
Conversation
frontend/packages/dev-console/src/components/helm/form/HelmChartVersionDropdown.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/helm/form/HelmChartVersionDropdown.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/helm/form/HelmReleaseRollbackForm.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/helm/form/HelmInstallUpgradeForm.tsx
Outdated
Show resolved
Hide resolved
localize strings in |
frontend/packages/dev-console/src/components/helm/details/history/HelmReleaseHistoryRow.tsx
Outdated
Show resolved
Hide resolved
@@ -140,7 +142,7 @@ const HelmInstallUpgradeForm: React.FC<FormikProps<FormikValues> & HelmInstallUp | |||
isSubmitting={status?.isSubmitting || isSubmitting} | |||
submitLabel={helmAction} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can no translate this enum as it also use to show the form type of Install
, Upgrade
or Rollback
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's about
submitLabel={helmAction} | |
submitLabel={t(`devconsole~${helmAction}`)} |
?
Not perfect but should work. Don't know if we have some other areas where we need to translate enums. But if I'm right the good thing is that if we add an enum the translation shows as label (helmaction) as fallback. In our case we need to add all three labels also if they doesn't existing 1:1 in sourcecode. (I mean, there is no reverse lookup like t(devconsole~Install
))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same in HelmReleaseRollbackForm.tsx
frontend/packages/dev-console/src/components/helm/helm-utils.ts
Outdated
Show resolved
Hide resolved
Test fails because of ✖ Update Annotation from empty value to value (1 failure) /retest |
c1e7743
to
fb21aaf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this locally and looks good. @debsmita1 are you also fine with your requested changes?
/lgtm
/retest
/approve Verified the changes |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/lgtm |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
8 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/retest
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: invincibleJai, jerolimov, vikram-raj The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fixes: https://issues.redhat.com/browse/ODC-5084