openems icon indicating copy to clipboard operation
openems copied to clipboard

fix: remove original translation file and migrate it to exsiting one

Open miettal opened this issue 6 months ago • 1 comments

This pull request refactors the translation handling in the OverviewComponent and consolidates translation strings into centralized files. The most important changes include removing the component-specific translation file and logic, and adding the necessary translations to the global translation files.

Refactoring translation handling:

  • ui/src/app/edge/history/Controller/Io/heatpump/overview/overview.ts: Removed the import of the component-specific translation.json file and the logic for setting additional translations in the OverviewComponent constructor. [1] [2]
  • ui/src/app/edge/history/Controller/Io/heatpump/overview/translation.json: Deleted the component-specific translation file entirely.

Consolidating translations into global files:

  • ui/src/assets/i18n/de.json: Added the "LEGEND_DESCRIPTION" key with the German translation "Legende Betriebszustand".
  • ui/src/assets/i18n/en.json: Added the "LEGEND_DESCRIPTION" key with the English translation "Legend operating status".
  • ui/src/assets/i18n/ja.json: Added the "LEGEND_DESCRIPTION" key with the Japanese translation "運転状態の凡例".

co-author: @Jasonlee6789 , codex, copilot

miettal avatar Jun 17 '25 00:06 miettal

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3190      +/-   ##
=============================================
- Coverage      58.87%   58.87%   -0.00%     
  Complexity       173      173              
=============================================
  Files           2619     2619              
  Lines         113027   113027              
  Branches        8318     8318              
=============================================
- Hits           66536    66533       -3     
- Misses         44000    44001       +1     
- Partials        2491     2493       +2     
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 17 '25 00:06 codecov[bot]

rebased

miettal avatar Aug 04 '25 04:08 miettal

@miettal: We try to move translations "closer to where they are used" to having multiple translation files was done by purpose.

sfeilmeier avatar Aug 24 '25 15:08 sfeilmeier

I see. I well understood background. I close this PR.

miettal avatar Aug 26 '25 02:08 miettal