Repository navigation
webui: fix translations and translate the wind direction abbreviations - #197
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
This removes OpenCCU rootfs patch 0143-WebUI-Fix-Translation.patch, now that OpenCCU/OpenCCU-Base#197 is merged.
Original OpenCCU rootfs patch: 0143
Original filename:
0143-WebUI-Fix-Translation.patchOriginal 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 anif/elseifchain. The value column writes${key}only forWIND_DIRECTIONdatapoints, other values are written unchanged. The value<span>gets thej_translateclass, like the title<span>above it, so it is shown aftertranslatePage()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 aj_translatespan).src/webui/www/webui/js/lang/{de,en}/translate.lang.extension.js: the newwindDirectionNoValueandwindDirectionAbbrev*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 ofreplaceDeviceDlgConfirmContentRow2b(</b>) and of the firewall hint (</ul>), and replaces the double-encoded UTF-8 umlauts inhintDeviceDoesNotSupportActionwith%E4/%FC. In English, it fixes theerrorWrongPasswordandinvalidIPtypos.src/webui/www/webui/js/lang/{de,en}/translate.lang.label.js: closes the<sup>oflblGeneralSettingsHeatingValue, fixeslblCyanLong("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.fnand the encodings of all files are preserved. The rootwww/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
node --checkpasses for the four language files, and the new keys are not defined anywhere else.scripts/base-patch-migration.py validatewith the canonical Buildroot 2026.08git4archive of this branch (a5e1e50f, sha25687d09921aa4b2a48bc5519f6ca97827020a132cef53a33dae11c999a26a9d24b) and--skip-patch 0143, on OpenCCUmaster0ace65578(current pinb77da714): PASS (the other 55 rootfs patches apply with zero fuzz).compareagainst a validation of the current pinb77da714with 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
Generated by Claude Code