Skip to content

chore: Remove Unused Lang Translations - Recreate PR (#21893)#22587

Merged
Vad1mo merged 2 commits intogoharbor:mainfrom
bupd:remove-unusedtrans
Dec 1, 2025
Merged

chore: Remove Unused Lang Translations - Recreate PR (#21893)#22587
Vad1mo merged 2 commits intogoharbor:mainfrom
bupd:remove-unusedtrans

Conversation

@bupd
Copy link
Copy Markdown
Contributor

@bupd bupd commented Nov 24, 2025

Description from PR #21893

Removed unused lang translation identified in #21725.

Created a script to remove the identified keys, and ran it in the i18n/lang directory: https://pastebin.com/em9MVQXR

Fixes #21725

This is just a cleanup/chore .
This PR does not create any new features nor delete one.
Only Removes unused lang translations.

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

Signed-off-by: carsontham <carsontham@outlook.com>
@bupd bupd requested a review from a team as a code owner November 24, 2025 09:24
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.85%. Comparing base (c8c11b4) to head (f75d900).
⚠️ Report is 598 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #22587       +/-   ##
===========================================
+ Coverage   45.36%   65.85%   +20.48%     
===========================================
  Files         244     1073      +829     
  Lines       13333   116095   +102762     
  Branches     2719     2931      +212     
===========================================
+ Hits         6049    76456    +70407     
- Misses       6983    35400    +28417     
- Partials      301     4239     +3938     
Flag Coverage Δ
unittests 65.85% <ø> (+20.48%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 987 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Vad1mo Vad1mo enabled auto-merge (squash) November 25, 2025 09:16
Copy link
Copy Markdown
Contributor

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

@wy65701436 wy65701436 added the release-note/update Update or Fix label Dec 1, 2025
@Vad1mo Vad1mo merged commit eb82f6c into goharbor:main Dec 1, 2025
13 checks passed
vg006 pushed a commit to vg006/harbor that referenced this pull request Dec 4, 2025
…goharbor#22587)

removed unused lang translation

Signed-off-by: carsontham <carsontham@outlook.com>
Co-authored-by: carsontham <carsontham@outlook.com>
bupd added a commit to bupd/harbor that referenced this pull request Jan 9, 2026
Translates the wrongly removed i18n keys that were restored in the
previous commit from English placeholders to their native languages:
- de-de: German translations
- es-es: Spanish translations
- fr-fr: French translations
- ko-kr: Korean translations
- pt-br: Brazilian Portuguese translations
- ru-ru: Russian translations
- tr-tr: Turkish translations
- zh-cn: Simplified Chinese translations
- zh-tw: Traditional Chinese translations

Ref: goharbor#22587
Signed-off-by: bupd <bupdprasanth@gmail.com>
intojhanurag pushed a commit to intojhanurag/harbor that referenced this pull request Jan 22, 2026
…goharbor#22587)

removed unused lang translation

Signed-off-by: carsontham <carsontham@outlook.com>
Co-authored-by: carsontham <carsontham@outlook.com>
wy65701436 pushed a commit that referenced this pull request Jan 22, 2026
* feat(portal): add i18n missing keys detection script

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix(portal): restore wrongly removed i18n translation keys

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix(portal): translate restored i18n keys to native languages

Translates the wrongly removed i18n keys that were restored in the
previous commit from English placeholders to their native languages:
- de-de: German translations
- es-es: Spanish translations
- fr-fr: French translations
- ko-kr: Korean translations
- pt-br: Brazilian Portuguese translations
- ru-ru: Russian translations
- tr-tr: Turkish translations
- zh-cn: Simplified Chinese translations
- zh-tw: Traditional Chinese translations

Ref: #22587
Signed-off-by: bupd <bupdprasanth@gmail.com>

* ci(portal): add i18n missing keys check to UI unit tests

Adds the i18n missing keys detection script to the UI_UT CI workflow.
This ensures that PRs introducing translation key usage will fail CI
if the corresponding keys are not defined in the language files.

The check runs early in the pipeline to fail fast before lint and tests.

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix(portal): enhance i18n check to verify all language files

The script now checks two things:
1. Keys used in code exist in en-us-lang.json
2. All language files have the same keys as en-us

This catches missing translations across all supported languages,
not just the English source file.

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix(portal): add missing i18n translation keys to all language files

Synced missing translation keys across de-de, es-es, fr-fr, ko-kr, pt-br,
tr-tr, zh-cn, and zh-tw language files to match en-us-lang.json. All
translations are in their native languages.

ru-ru is excluded as it requires a separate effort (see issue #22721).

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix(portal): detect single-word i18n keys in missing keys script

Updated find-missing-i18n.js to also detect single-word translation
keys like {{ 'CANCEL' | translate }} in addition to dotted keys like
{{ 'BUTTON.CANCEL' | translate }}.

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix: invalid zh-cn-lang.json

- missing comma,
- unescaped " "

Signed-off-by: bupd <bupdprasanth@gmail.com>

* make ci pass

Signed-off-by: bupd <bupdprasanth@gmail.com>

---------

Signed-off-by: bupd <bupdprasanth@gmail.com>
Co-authored-by: Daniel Jiang <daniel.jiang@broadcom.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/update Update or Fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unused Lang Translations

5 participants