Skip to content

fix(i18n): fix translation override issue - #4165

Merged
openshift-merge-bot[bot] merged 8 commits into
redhat-developer:mainfrom
ciiay:rhdhbugs-2564-fix-locale-override-issue
Feb 4, 2026
Merged

fix(i18n): fix translation override issue#4165
openshift-merge-bot[bot] merged 8 commits into
redhat-developer:mainfrom
ciiay:rhdhbugs-2564-fix-locale-override-issue

Conversation

@ciiay

@ciiay ciiay commented Feb 3, 2026

Copy link
Copy Markdown
Member

Description

  • Document translation priority (app-config → JSON → TS → ref) and that rhdh JSON overrides backstage.
  • Fix Administration menu: translate sidebar section label and config-driven admin item by mapping app-config textKey to titleKey.
  • Add textKey to MenuItemConfig and set titleKey from it when building menu items.
  • Remove hardcoded Scaffolder page title and dead app.scaffolder.title from rhdh ref/locales.
  • Add rhdh-fr.json, rhdh-it.json, rhdh-ja.json under translations/.
  • Trim scaffolder locale files (e.g. French overrides only) for consistency.

Which issue(s) does this PR fix

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

Before:
image

After:
image

Verified on a cluster:
image

image image

@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

@karthikjeeyar karthikjeeyar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the PR image

image

/approve
/lgtm

@karthikjeeyar

Copy link
Copy Markdown
Member

/retest

@rohitkrai03 rohitkrai03 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approved

@christoph-jerolimov

Copy link
Copy Markdown
Member

/cherry-pick release-1.9

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@christoph-jerolimov: once the present PR merges, I will cherry-pick it on top of release-1.9 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-1.9

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.

@christoph-jerolimov

Copy link
Copy Markdown
Member

/retest

3 similar comments
@invincibleJai

Copy link
Copy Markdown
Member

/retest

@karthikjeeyar

Copy link
Copy Markdown
Member

/retest

@ciiay

ciiay commented Feb 3, 2026

Copy link
Copy Markdown
Member Author

/retest

@openshift-ci openshift-ci Bot removed the lgtm label Feb 3, 2026
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

ciiay added 2 commits February 3, 2026 10:47
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
@ciiay
ciiay force-pushed the rhdhbugs-2564-fix-locale-override-issue branch from 7a24830 to fa038a0 Compare February 3, 2026 15:47
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

This reverts commit fa038a0.
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Signed-off-by: Yi Cai <yicai@redhat.com>
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

@christoph-jerolimov

Copy link
Copy Markdown
Member

Addressed two issues in main, let see

/retest

Signed-off-by: Yi Cai <yicai@redhat.com>
@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@ciiay

ciiay commented Feb 4, 2026

Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@karthikjeeyar

Copy link
Copy Markdown
Member

/retest

<Route
path="/create"
element={
<ScaffolderPage headerOptions={{ title: 'Self-service' }} />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ciiay, I believe that your failing test has to do with the removal of the Self-service header. The test is expecting it on this page only to find that it has been replaced with Create a new component.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds 'templateListPage.title' translation string, and it needs to be updated in the all-v1.8_s3281-en.json test file as well.

Update Create a new component to Self-service in the /test directory here -

https://github.com/redhat-developer/rhdh/blob/main/translations/test/all-v1.8_s3281-en.json#L969

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @karthikjeeyar for the help 🥇

@christoph-jerolimov

Copy link
Copy Markdown
Member

/retest

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Comment thread translations/rhdh-fr.json Outdated
Comment on lines +2 to +21
"catalog": {
"fr": {
"indexPage.createButtonTitle": "Self-service"
}
},
"catalog-import": {
"fr": {
"defaultImportPage.headerTitle": "Importer un dépôt Git existant",
"importInfoCard.title": "Importer un dépôt Git existant"
}
},
"scaffolder": {
"fr": {
"templateListPage.title": "Self-service",
"templateListPage.pageTitle": "Self-service",
"templateWizardPage.title": "Self-service",
"templateWizardPage.pageTitle": "Self-service",
"templateListPage.contentHeader.registerExistingButtonTitle": "Importer un dépôt Git existant"
}
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move these to backstage-fr.json? The keys are already there and can be updated. Same with the other 2 files.

Comment thread translations/rhdh-it.json Outdated
Comment on lines +2 to +21
"catalog": {
"it": {
"indexPage.createButtonTitle": "Self-service"
}
},
"catalog-import": {
"it": {
"defaultImportPage.headerTitle": "Importa un repository Git esistente",
"importInfoCard.title": "Importa un repository Git esistente"
}
},
"scaffolder": {
"it": {
"templateListPage.title": "Self-service",
"templateListPage.pageTitle": "Self-service",
"templateWizardPage.title": "Self-service",
"templateWizardPage.pageTitle": "Self-service",
"templateListPage.contentHeader.registerExistingButtonTitle": "Importa un repository Git esistente"
}
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move these to backstage-it.json?

Comment thread translations/rhdh-ja.json Outdated
Comment on lines +2 to +21
"catalog": {
"ja": {
"indexPage.createButtonTitle": "セルフサービス"
}
},
"catalog-import": {
"ja": {
"defaultImportPage.headerTitle": "既存の Git リポジトリーのインポート",
"importInfoCard.title": "既存の Git リポジトリーのインポート"
}
},
"scaffolder": {
"ja": {
"templateListPage.title": "セルフサービス",
"templateListPage.pageTitle": "セルフサービス",
"templateWizardPage.title": "セルフサービス",
"templateWizardPage.pageTitle": "セルフサービス",
"templateListPage.contentHeader.registerExistingButtonTitle": "既存の Git リポジトリーのインポート"
}
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move these to backstage-ja.json?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @teknaS47 @karthikjeeyar , thanks for taking care of this PR. The reason they are in rhdh-<locale>.json is they are override values specific from RHDH. The values in backstage-<locale>.json are translations for references collected from backstage repo. Why we have to move these values into backstage-<locale>.json files?

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@sonarqubecloud

sonarqubecloud Bot commented Feb 4, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@karthikjeeyar

Copy link
Copy Markdown
Member

/retest

@christoph-jerolimov christoph-jerolimov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on a cluster.

Before next:

Image

With this PR:

Image

/lgtm
/approve

@openshift-ci

openshift-ci Bot commented Feb 4, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christoph-jerolimov, karthikjeeyar, rohitkrai03

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [christoph-jerolimov]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit a46d1e5 into redhat-developer:main Feb 4, 2026
15 checks passed
@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@christoph-jerolimov: #4165 failed to apply on top of branch "release-1.9":

Applying: fix(i18n): fix translation override issue
Applying: follow up changes
Applying: Revert "follow up changes"
Applying: resolved review comments
Applying: take default const titleKey
Applying: update saffolder page title and fix the test values
Applying: add missing templateWizardPage title and pageTitle values
Applying: apply backstage overrides to backstage.<locale>.json
Using index info to reconstruct a base tree...
A	translations/backstage-fr.json
A	translations/backstage-it.json
A	translations/backstage-ja.json
Falling back to patching base and 3-way merge...
Auto-merging translations/core-plugins_v1.8_s3281-fr-C.json
CONFLICT (content): Merge conflict in translations/core-plugins_v1.8_s3281-fr-C.json
CONFLICT (modify/delete): translations/backstage-ja.json deleted in HEAD and modified in apply backstage overrides to backstage.<locale>.json. Version apply backstage overrides to backstage.<locale>.json of translations/backstage-ja.json left in tree.
CONFLICT (modify/delete): translations/backstage-it.json deleted in HEAD and modified in apply backstage overrides to backstage.<locale>.json. Version apply backstage overrides to backstage.<locale>.json of translations/backstage-it.json left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0008 apply backstage overrides to backstage.<locale>.json

Details

In response to this:

/cherry-pick release-1.9

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.

@rhdh-qodo-merge rhdh-qodo-merge Bot mentioned this pull request Apr 22, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants