Skip to content

webui: fix translations and translate the wind direction abbreviations - #197

Merged
jens-maus merged 1 commit into
mainfrom
jens-maus/migrate-0143-webui-fix-translation
Oct 15, 2026
Merged

jens-maus merged 1 commit into
mainfrom
jens-maus/migrate-0143-webui-fix-translation

Conversation

@jens-maus

@jens-maus jens-maus commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Original OpenCCU rootfs patch: 0143
Original filename: 0143-WebUI-Fix-Translation.patch
Original patch: ``''https://github.com/OpenCCU/OpenCCU/blob/0ace65578e1262ddab5dcc14ff87ad35a23a63fc/buildroot-external/package/openccu-base/rootfs-patches/0143-WebUI-Fix-Translation.patch''''
Original changes: OpenCCU/OpenCCU@6264dd723 and OpenCCU/OpenCCU@ea9efde50 (wind direction abbreviations, OpenCCU/OpenCCU#3009), OpenCCU/OpenCCU@0342e4e5f (OpenCCU/OpenCCU#3072), OpenCCU/OpenCCU@514a51a54 (energy counter labels), OpenCCU/OpenCCU#3478 and earlier typo fixes (eq-3/occu#121)

This applies the patch 1:1:

  • src/webui/rega/www/esp/datapointconfigurator.fn: ConvWindDir() now returns translation keys (windDirectionAbbrevNorth … windDirectionAbbrevNorthWest) instead of the fixed German abbreviations, as an if/elseif chain. The value column writes ${key} only for WIND_DIRECTION datapoints, other values are written unchanged. The value <span> gets the j_translate class, like the title <span> above it, so it is shown after translatePage() has replaced the key.
  • src/webui/rega/www/esp/controls/weather_sensor.fn: the wind direction of the weather sensor control uses the same translated abbreviation (${key} in a j_translate span).
  • src/webui/www/webui/js/lang/{de,en}/translate.lang.extension.js: the new windDirectionNoValue and windDirectionAbbrev* keys (German N/NO/O/SO/S/SW/W/NW, English N/NE/E/SE/S/SW/W/NW). In German, it fixes the HTML of replaceDeviceDlgConfirmContentRow2b (</b>) and of the firewall hint (</ul>), and replaces the double-encoded UTF-8 umlauts in hintDeviceDoesNotSupportAction with %E4/%FC. In English, it fixes the errorWrongPassword and invalidIP typos.
  • src/webui/www/webui/js/lang/{de,en}/translate.lang.label.js: closes the <sup> of lblGeneralSettingsHeatingValue, fixes lblCyanLong ("Cyan long") and labels the energy counters as "Energie-Zähler - Gerät"/"Energie-Zähler - Zentrale" ("Energy counter - Device"/"Energy counter - Central"). Both files now end with a newline.

The CRLF line endings of datapointconfigurator.fn and the encodings of all files are preserved. The root www/ copies are unused legacy files and are left unchanged.

Other OpenCCU rootfs patches also modify these files (0001, 0007, 0039, 0044, 0099, 0131, 0132, 0144, 0155, 0156, 0164, 0165, 0183 and 0205). They still apply with zero fuzz.

Validation

  • The patch applies to this repository's sources with zero fuzz. node --check passes for the four language files, and the new keys are not defined anywhere else.
  • OpenCCU scripts/base-patch-migration.py validate with the canonical Buildroot 2026.08 git4 archive of this branch (a5e1e50f, sha256 87d09921aa4b2a48bc5519f6ca97827020a132cef53a33dae11c999a26a9d24b) and --skip-patch 0143, on OpenCCU master 0ace65578 (current pin b77da714): PASS (the other 55 rootfs patches apply with zero fuzz).
  • compare against a validation of the current pin b77da714 with all 56 patches: IDENTICAL (4666 entries).

OpenCCU cleanup PR (removing patch 0143 and updating the pin): OpenCCU/OpenCCU#4437


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Wind-direction readings now display localized compass labels, including a label for missing values.
    • Corrected spelling, markup, and character-encoding issues in English and German text, including password and IP-address messages.
    • Fixed German firewall tooltip formatting.
  • Localization
    • Updated energy-counter labels in English and German and corrected the English “Cyan long” label.

Generated by Claude Code

This applies OpenCCU rootfs patch 0143-WebUI-Fix-Translation.patch:

- The wind direction abbreviations of the weather sensor control and the
  datapoint configurator use translation keys, so that e.g. the English
  WebUI shows "SE" instead of "SO".
- Fix broken HTML in some German texts, double-encoded umlauts in
  hintDeviceDoesNotSupportAction and typos in the English texts.
- Use clearer labels for the energy counter of the device and the central.
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3863ce9c-39c9-4518-b749-ddf78de802ae
📥 Commits

Reviewing files that changed from the base of the PR and between b77da71 and a5e1e50.

📒 Files selected for processing: 6
  • src/webui/rega/www/esp/controls/weather_sensor.fn
  • src/webui/rega/www/esp/datapointconfigurator.fn
  • src/webui/www/webui/js/lang/de/translate.lang.extension.js
  • src/webui/www/webui/js/lang/de/translate.lang.label.js
  • src/webui/www/webui/js/lang/en/translate.lang.extension.js
  • src/webui/www/webui/js/lang/en/translate.lang.label.js

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The web UI now routes wind-direction values through translation keys, with English and German labels for compass directions and missing values. The change also corrects several translation strings, labels, and HTML markup in both language files.

Changes: Web UI Localization

Layer / File(s) Summary
Wind-direction localization
src/webui/rega/www/esp/controls/weather_sensor.fn, src/webui/rega/www/esp/datapointconfigurator.fn, src/webui/www/webui/js/lang/{de,en}/translate.lang.extension.js
ConvWindDir maps the existing degree ranges to translation keys and assigns a missing-value key to unmatched values. Read-only wind-direction values use a translation token, and the weather-sensor value span gains j_translate. English and German direction labels are added.
Translation text and markup corrections
src/webui/www/webui/js/lang/de/translate.lang.extension.js, src/webui/www/webui/js/lang/de/translate.lang.label.js, src/webui/www/webui/js/lang/en/translate.lang.extension.js, src/webui/www/webui/js/lang/en/translate.lang.label.js
English and German messages, labels, and HTML markup are corrected. Central energy-counter labels use fixed text instead of a runtime suffix.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to a5e1e

No actionable issue remains identified; the translation changes are ready to merge after normal checks.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main changes: WebUI translation fixes and localized wind-direction abbreviations. It is concise and relevant to the changeset.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jens-maus
jens-maus merged commit a55e7d9 into main Oct 15, 2026
5 checks passed
@jens-maus
jens-maus deleted the jens-maus/migrate-0143-webui-fix-translation branch October 15, 2026 06:19
jens-maus added a commit to OpenCCU/OpenCCU that referenced this pull request Oct 15, 2026
This removes OpenCCU rootfs patch 0143-WebUI-Fix-Translation.patch, now that OpenCCU/OpenCCU-Base#197 is merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant