Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0194-WebUI-Add-MissingChannelDescriptions #2922

Conversation

jp112sdl
Copy link
Contributor

@jp112sdl jp112sdl commented Nov 17, 2024

Description

Ergänzt die Übersetzungstabelle der Kanalbeschreibungen (Einstellungen->Geräte)

Related Issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Alternate Designs

Possible Drawbacks

Verification Process

Release Notes

Contributing checklist

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING and LICENSE document.
  • I fully agree to distribute my changes under Apache 2.0 license.

Summary by CodeRabbit

  • New Features

    • Added comprehensive channel descriptions in both German and English for improved localization of the web user interface.
    • Enhanced user understanding of various device functionalities through clear and descriptive labels for channel types.
  • Bug Fixes

    • Resolved issues related to missing translations, ensuring all relevant channel types are now properly described.

Copy link

coderabbitai bot commented Nov 17, 2024

Walkthrough

This pull request introduces new localization entries for channel descriptions in both German and English within the web user interface. Two JavaScript files are updated: translate.lang.channelDescription.js for German and English, each receiving 56 new key-value pairs that describe various channel types. The changes enhance the localization of device functionalities without altering existing control flows or logic.

Changes

File Change Summary
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js Added 56 new German channel descriptions, enhancing localization for various device types.
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js Added 56 new English channel descriptions, improving clarity on device functionalities in the web interface.

Possibly related PRs


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Outside diff range and nitpick comments (8)
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch (2)

100-101: Ensure consistency between related translations

The translations for shutter contact types have slight variations that might confuse users:

-    "chType_SHUTTER_CONTACT" : "Door/Window Contact",
-    "chType_SHUTTER_CONTACT_TRANSCEIVER" : "Door/Shutter Contact",
+    "chType_SHUTTER_CONTACT" : "Door/Window Contact",
+    "chType_SHUTTER_CONTACT_TRANSCEIVER" : "Door/Window Contact",

Both types refer to the same kind of sensor, so they should use consistent terminology.


1-118: Overall assessment: Approved with minor improvements needed

The patch significantly improves the WebUI by adding comprehensive channel descriptions in both German and English. The translations are generally good and will enhance user experience. Please address the following minor issues:

  1. Standardize German character encoding (replace URL-encoded umlauts)
  2. Fix typos and HTML break tag inconsistencies in English translations
  3. Ensure consistent terminology across related channel types

Consider implementing a validation system for translations to automatically check for:

  • Consistent HTML tag usage
  • Character encoding standardization
  • Terminology consistency across related channel types
    This would help maintain translation quality as more channel types are added in the future.
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js (3)

3-50: Standardize HTML break tag usage

Some inconsistencies found in HTML break tag usage:

  1. Line 10: </br> (incorrect) vs <br/> (correct)
  2. Line 12: Inconsistent spacing around <br/>
  3. Line 44: Missing capitalization in "detector" compared to other entries

Apply these changes for consistency:

-    "chType_CLIMATECONTROL_REGULATOR" : "Climate Control</br>Regulator",
+    "chType_CLIMATECONTROL_REGULATOR" : "Climate Control<br/>Regulator",
-    "chType_CLIMATE_TRANSCEIVER" :"Temperature and<br/>Humidity sensor",
+    "chType_CLIMATE_TRANSCEIVER" : "Temperature and<br/>Humidity Sensor",
-    "chType_SMOKE_DETECTOR" : "Smoke detector",
+    "chType_SMOKE_DETECTOR" : "Smoke Detector",

220-227: Improve HmIP-Groups section documentation

  1. The comment line is in English while being a crucial section separator
  2. Group entries use a different naming convention from channel types

Consider these documentation improvements:

-    "comment" : "the following is for HmIP-Groups",
+    "comment" : "The following entries are for Homematic IP Groups",

228-230: Consider removing unnecessary terminator entry

The empty "theEnd" entry serves no functional purpose and could be removed.

-    "theEnd" : ""
-  }
-});
+  }
+});
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js (3)

208-210: Standardize HTML entity usage

The file uses HTML entities (&nbsp;) in some places but not others. This inconsistency could lead to formatting issues.

Consider using consistent spacing method throughout:

-    "chType_UNIVERSAL_ACTOR_TRANSMITTER_010V" : "Statusmitteilung Universalaktor 0-10&nbsp;V",
+    "chType_UNIVERSAL_ACTOR_TRANSMITTER_010V" : "Statusmitteilung Universalaktor 0-10 V",

223-230: Group related translations using comments

The HmIP-Groups section is properly marked with a comment. Consider applying similar grouping comments throughout the file for better organization.

Add section comments to improve maintainability:

+    "comment" : "Standard channel descriptions",
     "chType_ACOUSTIC_DISPLAY_RECEIVER" : "Display und<br/>Tonsignalgeber",
     // ... other standard channels ...

+    "comment" : "Advanced channel descriptions",
     "chType_ACCELERATION_TRANSCEIVER" : "Lage-/Beschleunigungssensor",
     // ... other advanced channels ...

231-231: Remove unnecessary empty string entry

The theEnd key with an empty string value serves no purpose and should be removed.

-    "theEnd" : ""
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 67828ca and 05271a2.

⛔ Files ignored due to path filters (2)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js.orig is excluded by !**/*.orig
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js.orig is excluded by !**/*.orig
📒 Files selected for processing (3)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch (1 hunks)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js (1 hunks)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js (1 hunks)
🔇 Additional comments (4)
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch (1)

4-57: Verify completeness of channel type translations

The changes look comprehensive, adding 56 new channel type descriptions in both languages. However, we should verify that all channel types are covered.

Also applies to: 63-116

buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js (2)

1-2: LGTM: Proper initialization using jQuery.extend

The file correctly uses jQuery.extend with deep copy to merge translations into the existing langJSON object.


1-230: Verify UI rendering for all new translations

Please ensure that all new translations:

  1. Render correctly in the WebUI
  2. Maintain proper alignment and spacing
  3. Don't cause text overflow in the UI components
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js (1)

1-2: Verify the existence of the langJSON object

The code extends an existing langJSON object, but its initialization is not visible in this file.

✅ Verification successful

The langJSON object is properly initialized

The verification shows that langJSON is correctly initialized in loadTextResource.js which is included in various HTML files. The object is initialized as an empty object (langJSON = {};) and then populated with language keys. The translate.lang.channelDescription.js file is loaded through the loadTextResource() function in the correct order after the initialization.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if langJSON is properly initialized before this file is loaded
# Expected: Find the initialization of langJSON object

# Search for langJSON initialization
rg -l "langJSON\s*=\s*\{" --type js

# Search for script loading order
rg -l "translate\.lang\.channelDescription\.js" --type html

Length of output: 208


Script:

#!/bin/bash
# Let's check the content of loadTextResource.js to understand the langJSON initialization
cat "buildroot-external/patches/occu/0026-WebUI-Fix-CacheControl/occu/WebUI/www/webui/js/lang/loadTextResource.js"

# Also search for any script includes in index or main HTML files that might show the loading order
fd -e html -e htm . -x rg -l "loadTextResource\.js|translate\.lang\.channelDescription\.js" {}

Length of output: 6670

Comment on lines +23 to +24
+ "chType_DOOR_LOCK_STATE_TRANSCEIVER" : "T%FCrschlosssensor",
+ "chType_DOOR_RECEIVER" : "Tor%F6ffner",
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Standardize character encoding for German umlauts

Some German characters are URL-encoded (%FC for ü, %F6 for ö) while others are not. This inconsistency should be fixed for better maintainability.

Replace URL-encoded characters with their direct UTF-8 equivalents:

-    "chType_DOOR_LOCK_STATE_TRANSCEIVER" : "T%FCrschlosssensor",
-    "chType_DOOR_RECEIVER" : "Tor%F6ffner",
+    "chType_DOOR_LOCK_STATE_TRANSCEIVER" : "Türschlosssensor",
+    "chType_DOOR_RECEIVER" : "Toröffner",

Similarly for other instances:

-    "chType_SHUTTER_CONTACT" : "T%FCr-/Fensterkontakt",
-    "chType_SHUTTER_CONTACT_TRANSCEIVER" : "T%FCr-/Fensterkontakt",
+    "chType_SHUTTER_CONTACT" : "Tür-/Fensterkontakt",
+    "chType_SHUTTER_CONTACT_TRANSCEIVER" : "Tür-/Fensterkontakt",

Also applies to: 41-42

Comment on lines 72 to 73
+ "chType_CLIMATECONTROL_REGULATOR" : "Climate Control</br>Regulator",
+ "chType_CLIMATECONTROL_VENT_DRIVE" : "Climate Control</br>Vent Drive",
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix typos and standardize HTML break tags

There are some inconsistencies and typos in the English translations:

  1. Fix the typo in "Partical Matter":
-    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER" : "Decision Value<br/>Partical Matter",
+    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER" : "Decision Value<br/>Particle Matter",
  1. Standardize HTML break tag usage:
-    "chType_CLIMATECONTROL_REGULATOR" : "Climate Control</br>Regulator",
-    "chType_CLIMATECONTROL_VENT_DRIVE" : "Climate Control</br>Vent Drive",
+    "chType_CLIMATECONTROL_REGULATOR" : "Climate Control<br/>Regulator",
+    "chType_CLIMATECONTROL_VENT_DRIVE" : "Climate Control<br/>Vent Drive",

Also applies to: 76-76

Comment on lines +99 to +101
"chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER10" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM1",
"chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER25" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM2.5",
"chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER100" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM10",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix encoding issues in Particulate Matter descriptions

The text contains non-ASCII characters (%FC) which should be properly encoded.

Apply these changes:

-    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER10" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM1",
-    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER25" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM2.5",
-    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER100" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM10",
+    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER10" : "Connection partner<br/>Mass concentration<br/>PM1",
+    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER25" : "Connection partner<br/>Mass concentration<br/>PM2.5",
+    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER100" : "Connection partner<br/>Mass concentration<br/>PM10",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER10" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM1",
"chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER25" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM2.5",
"chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER100" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM10",
"chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER10" : "Connection partner<br/>Mass concentration<br/>PM1",
"chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER25" : "Connection partner<br/>Mass concentration<br/>PM2.5",
"chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER100" : "Connection partner<br/>Mass concentration<br/>PM10",

"chType_JALOUSIE" : "Jalousieaktor",
"chType_KEY" : "Taster",
"chType_KEY_TRANSCEIVER" : "Taster",
"chType_KWL_CONTROLLER_TRANSMITTER" : "",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add missing translation

The translation for chType_KWL_CONTROLLER_TRANSMITTER is empty.

Add an appropriate German translation for this channel type:

-    "chType_KWL_CONTROLLER_TRANSMITTER" : "",
+    "chType_KWL_CONTROLLER_TRANSMITTER" : "KWL Controller Sender",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"chType_KWL_CONTROLLER_TRANSMITTER" : "",
"chType_KWL_CONTROLLER_TRANSMITTER" : "KWL Controller Sender",

Comment on lines 1 to 233
"chType_HEATING_ROOM_TH_RECEIVER" : "Verkn%FCpfungspartner Wandthermostat (manuelle Bedienung, Empf%E4nger)",
"chType_HEATING_ROOM_TH_TRANSCEIVER" : "Verkn%FCpfungspartner Wandthermostat (manuelle Bedienung, Sender)",
"chType_HEATING_SHUTTER_CONTACT_RECEIVER" : "Verkn%FCpfungspartner T%FCr-/Fensterkontakt",
"chType_JALOUSIE" : "Jalousieaktor",
"chType_KEY" : "Taster",
"chType_KEY_TRANSCEIVER" : "Taster",
"chType_KWL_CONTROLLER_TRANSMITTER" : "",
"chType_LEVEL_COMMAND_TRANSMITTER_CO2" : "Entscheidungswert CO2",
"chType_LEVEL_COMMAND_TRANSMITTER_HUMIDITY" : "Entscheidungswert Feuchtigkeit",
"chType_LEVEL_COMMAND_TRANSMITTER_TEMPERATURE" : "Entscheidungswert Temperatur",
"chType_LUXMETER" : "Helligkeitssensor",
"chType_MOD_EM8BIT_TRANSMITTER" : "Sender f%FCr<br/>8-Bit Entscheidungswert",
"chType_MOD_RC8" : "Taster/Schalter<br/>T%FCr-/Fensterkontakt",
"chType_MOTION_DETECTOR" : "Bewegungsmelder",
"chType_MOTIONDETECTOR_TRANSCEIVER" : "Bewegungsmelder",
"chType_MOTIONDETECTOR_TRANSCEIVER_LEFT" : "Bewegungsmelder<br/> Zone 1 / links",
"chType_MOTIONDETECTOR_TRANSCEIVER_RIGHT" : "Bewegungsmelder<br/>Zone 2 / rechts",
"chType_MOTIONDETECTOR_TRANSCEIVER_BOTTOM" : "Bewegungsmelder<br/>Zone 3 / unten",
"chType_MOTIONDETECTOR_VIRTUAL_TRANSCEIVER" : "Bewegungsmelder",
"chType_MOTIONDETECTOR_VIRTUAL_TRANSCEIVER_VIRTUEL" : "Bewegungsmelder<br/>Zone virtuell",
"chType_MULTI_MODE_INPUT_TRANSMITTER" : "Eingangsmodul",
"chType_MULTI_MODE_INPUT_TRANSMITTER_0" : "Kanal deaktiviert",
"chType_MULTI_MODE_INPUT_TRANSMITTER_1" : "Taster",
"chType_MULTI_MODE_INPUT_TRANSMITTER_2" : "Schalter",
"chType_MULTI_MODE_INPUT_TRANSMITTER_3" : "Kontakt",
"chType_MULTI_MODE_INPUT_TRANSMITTER_4" : "Level",
"chType_MULTI_MODE_INPUT_TRANSMITTER_5" : "Bedingung",
"chType_OPTICAL_SIGNAL_RECEIVER" : "Farbsignal",
"chType_OPTICAL_SIGNAL_RECEIVERA" : "Farbsignal</br>alle Tasten",
"chType_OPTICAL_SIGNAL_RECEIVERB" : "Statusmitteilung Farbsignal",
"chType_PASSAGE_DETECTOR_COUNTER_TRANSMITTER" : "Durchgangsz%E4hler",
"chType_PASSAGE_DETECTOR_DIRECTION_TRANSMITTER_LR" : "Durchgangserkennung<br/>Links nach Rechts",
"chType_PASSAGE_DETECTOR_DIRECTION_TRANSMITTER_RL" : "Durchgangserkennung<br/>Rechts nach Links",
"chType_PERMISSION_TRANSCEIVER" : "Berechtigung",
"chType_POWERMETER" : "Messwert-Kanal",
"chType_PRESENCEDETECTOR_TRANSCEIVER" : "Pr%E4senzmelder",
"chType_RAINDETECTOR" : "Regensensor",
"chType_RAINDETECTOR_HEAT" : "Regensensor<br/>Heizung",
"chType_REMOTECONTROL_RECEIVER" : "Verkn%FCpfungspartner<br/>Taste",
"chType_RGBW_AUTOMATIC" : "Programm",
"chType_RGBW_COLOR" : "Farbe",
"chType_ROTARY_CONTROL_TRANSCEIVER_TL" : "Drehrichtungsgeber<br/>Links",
"chType_ROTARY_CONTROL_TRANSCEIVER_TR" : "Drehrichtungsgeber<br/>Rechts",
"chType_ROTARY_HANDLE_TRANSCEIVER" : "Fenster-/ Drehgriffkontakt",
"chType_SABOTAGECONTACT" : "Verkn%FCpfungspartner<br/>Sabotagekontakt",
"chType_SENSOR_FOR_CARBON_DIOXIDE" : "Luftg%FCte-/CO2-Sensor",
"chType_SENSOR_WINDOW" : "Sensor-Kanal",
"chType_SERVO_TRANSMITTER" : "Statusmitteilung Servosteuerung",
"chType_SERVO_VIRTUAL_RECEIVER" : "Servosteuerung",
"chType_SHUTTER_TRANSMITTER" : "Statusmitteilung Rollladenaktor",
"chType_SHUTTER_VIRTUAL_RECEIVER" : "Rollladenaktor",
"chType_SIMPLE_SWITCH_RECEIVER_MOD_HO" : "Beleuchtung",
"chType_SIMPLE_SWITCH_RECEIVER_MOD_TM" : "Beleuchtung",
"chType_STATE_RESET_RECEIVER" : "Unterdr%FCckung der<br/>Bewegungserkennung",
"chType_STATE_RESET_RECEIVER_ZONE1" : "Unterdr%FCckung der<br/>Bewegungserkennung Zone 1",
"chType_STATE_RESET_RECEIVER_ZONE2" : "Unterdr%FCckung der<br/>Bewegungserkennung Zone 2",
"chType_STATE_RESET_RECEIVER_ZONE3" : "Unterdr%FCckung der<br/>Bewegungserkennung Zone 3",
"chType_STATE_RESET_VIRTUAL_RECEIVER" : "Unterdr%FCckung der<br/>Bewegungserkennung",
"chType_STATE_RESET_VIRTUAL_RECEIVER_VIRTUEL" : "Unterdr%FCckung der<br/>Bewegungserkennung Zone virtuell",
"chType_SWITCH" : "Schaltaktor",
"chType_SWITCH_PANIC" : "Panik Alarm",
"chType_SWITCH_SENSOR_Ext" : "Externer Alarm",
"chType_SWITCH_SENSOR_Int" : "Interner Alarm",
"chType_SWITCH_TRANSCEIVER" : "Schaltaktor",
"chType_SWITCH_TRANSMIT" : "Verkn%FCpfungspartner<br/>Schaltaktor",
"chType_SWITCH_TRANSMITTER" : "Statusmitteilung Schaltausgang",
"chType_SWITCH_TRANSMITTER_LED" : "Statusmitteilung LED",
"chType_SWITCH_TRANSMITTER_OC" : "Statusmitteilung OC-Ausgang",
"chType_SWITCH_VIRTUAL_RECEIVER" : "Schaltaktor",
"chType_SWITCH_VIRTUAL_RECEIVER_LED" : "LED-Aktor",
"chType_SWITCH_WEEK_PROFILE" : "Wochenprogramm",
"chType_COND_SWITCH_TRANSMITTER_TEMPERATURE_DIFF" : "Verkn%FCpfungspartner<br/>Differenztemperatur",
"chType_THERMALCONTROL_TRANSMIT" : "Verkn%FCpfungspartner<br/>Heizungsthermostat",

"chType_UNIVERSAL_ACTOR_TRANSMITTER_010V" : "Statusmitteilung Universalaktor 0-10&nbsp;V",
"chType_UNIVERSAL_ACTOR_VIRTUAL_RECEIVER_010V" : "Universalaktor 0-10&nbsp;V",

"chType_DALI_UNIVERSAL_LIGHT_RECEIVER" : "DALI Gateway",
"chType_UNIVERSAL_LIGHT_RECEIVER" : "LED Controller",
"chType_UNIVERSAL_LIGHT_WEEK_PROFILE" : "Wochenprogramm",

"chType_VIRTUAL_DIMMER" : "Dimmaktor",
"chType_VIRTUAL_DUAL_WHITE_BRIGHTNESS" : "Helligkeitskanal",
"chType_VIRTUAL_DUAL_WHITE_COLOR" : "Farbkanal",
"chType_WEATHER_RECEIVER" : "Verkn%FCpfungspartner<br/>Temperatursensor",
"chType_WEATHER_TRANSMIT" : "Statusmitteilung<br/>Wetterdaten",
"chType_WEEK_PROGRAM" : "Verkn%FCpfungspartner Wochenprogramm",
"chType_WINDOW_SWITCH_RECEIVER" : "Verkn%FCpfungspartner<br/>Fensterkontakt",

"comment" : "the following is for HmIP-Groups",
"REMOTE_CONTROL" : "Homematic IP Tasterkanal",
"RADIATOR_THERMOSTAT" : "Homematic IP Heizk%F6rperthermostat",
"SENSOR_WINDOW" : "Homematic IP Fenster Zustandserkennung",
"SWITCH_ACTUATOR" : "Homematic IP Schaltaktor",
"WALLMOUNTED_THERMOSTAT" : "Homematic IP Wandthermostat",
"FLOOR_HEATING" : "Homematic IP Fußbodenheizungsaktor",

"theEnd" : ""
}
});
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Standardize character encoding across translations

The file uses inconsistent methods for encoding German umlauts and special characters:

  1. URL encoding (e.g., %FC for 'ü', %F6 for 'ö')
  2. HTML entities (e.g., &nbsp;)

This inconsistency makes maintenance harder and could lead to display issues.

Consider standardizing to UTF-8 encoding throughout the file. For example:

-    "chType_DOOR_LOCK_STATE_TRANSCEIVER" : "T%FCrschlosssensor",
+    "chType_DOOR_LOCK_STATE_TRANSCEIVER" : "Türschlosssensor",

Apply similar changes to all occurrences of URL-encoded characters.

Committable suggestion skipped: line range outside the PR's diff.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Outside diff range and nitpick comments (7)
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch (4)

28-28: Improve technical terminology

The description "Central-Device 63" in German translation appears to be a technical term that should be translated or clarified for end users.

Consider using a more descriptive German term that explains the purpose of this channel type to end users.

-    "chType_LISTENER" : "Central-Device 63",
+    "chType_LISTENER" : "Zentrale Empfangseinheit",

75-75: Standardize technical terminology

Some technical terms could be improved for better clarity and industry standard alignment:

Consider these improvements:

-    "chType_AKKU" : "Accu",
+    "chType_AKKU" : "Battery",
-    "chType_ENERGY_MANAGMENT" : "Energy Management",
+    "chType_ENERGY_MANAGMENT" : "Energy Management System",

Also applies to: 93-93


109-110: Ensure consistency in related translations

The translations for shutter contact types have slight variations that might confuse users:

Consider standardizing the terminology:

-    "chType_SHUTTER_CONTACT" : "Door/Window Contact",
-    "chType_SHUTTER_CONTACT_TRANSCEIVER" : "Door/Shutter Contact",
+    "chType_SHUTTER_CONTACT" : "Door/Window Contact",
+    "chType_SHUTTER_CONTACT_TRANSCEIVER" : "Door/Window Contact (Transceiver)",

114-115: Standardize capitalization

Inconsistent capitalization in related terms:

Consider standardizing the capitalization:

-    "chType_SMOKE_DETECTOR" : "Smoke detector",
+    "chType_SMOKE_DETECTOR" : "Smoke Detector",
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js (1)

220-227: Consider adding descriptions for HmIP-Groups

The comment indicates these are HmIP-Group translations, but the entries lack detailed descriptions compared to the channel type entries above them.

Consider enhancing these entries with more descriptive text, for example:

-    "REMOTE_CONTROL" : "Homematic IP Push button channel",
+    "REMOTE_CONTROL" : "Homematic IP Push button channel<br/>Group control for multiple devices",
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js (2)

208-210: Standardize HTML formatting

The file uses inconsistent HTML formatting:

  • Some entries use &nbsp; for spaces
  • Some entries use <br/> with different spacing patterns

Standardize the HTML formatting throughout the file. For example:

-    "chType_UNIVERSAL_ACTOR_TRANSMITTER_010V" : "Statusmitteilung Universalaktor 0-10&nbsp;V",
+    "chType_UNIVERSAL_ACTOR_TRANSMITTER_010V" : "Statusmitteilung Universalaktor 0-10 V",

Also applies to: 211-214


223-230: Add documentation for HmIP-Groups section

The comment "the following is for HmIP-Groups" could be more descriptive to help future maintainers understand the purpose and usage of these translations.

Consider expanding the comment:

-    "comment" : "the following is for HmIP-Groups",
+    "comment" : "The following translations are specifically for Homematic IP Group devices and their channels",
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 05271a2 and e3cb43f.

📒 Files selected for processing (3)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch (1 hunks)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js (1 hunks)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js (1 hunks)
🔇 Additional comments (6)
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch (1)

1-136: Overall assessment: The changes look good!

The patch successfully adds comprehensive channel descriptions for both German and English languages, significantly improving the WebUI's usability. While there are some minor suggestions for improvement in terminology and consistency, the core functionality and translations are correct and valuable.

buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js (3)

1-2: LGTM: Proper jQuery extension pattern

The file correctly uses jQuery's extend method with deep copy enabled, which is the recommended approach for extending the language object.

Also applies to: 229-230


3-98: LGTM: Well-structured channel descriptions

The channel descriptions are:

  • Consistently formatted with proper HTML breaks
  • Use clear and descriptive English text
  • Follow a logical grouping pattern

Also applies to: 102-136, 138-203, 208-218


99-101: ⚠️ Potential issue

Fix German text in English translation file

These entries contain German text (Verkn%FCpfungspartner) instead of English translations for particulate matter descriptions.

Apply this fix:

-    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER10" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM1",
-    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER25" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM2.5",
-    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER100" : "Verkn%FCpfungspartner<br/>Mengenkonzentration<br/>PM10",
+    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER10" : "Connection partner<br/>Mass concentration<br/>PM1",
+    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER25" : "Connection partner<br/>Mass concentration<br/>PM2.5",
+    "chType_COND_SWITCH_TRANSMITTER_PARTICULATE_MATTER100" : "Connection partner<br/>Mass concentration<br/>PM10",

Likely invalid or redundant comment.

buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js (2)

1-2: LGTM: File structure is correct

The file correctly extends the langJSON object with German translations.

Also applies to: 231-233


140-140: Add missing translation for KWL Controller

The translation for chType_KWL_CONTROLLER_TRANSMITTER is empty and needs to be added.

"chType_WEATHER_TRANSMIT" : "Status report<br/>Weather data",
"chType_WEEK_PROGRAM" : "Connection partner week program",
"chType_WINDOW_SWITCH_RECEIVER" : "Connection partner<br/>shutter contact",

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix inconsistent newline formatting

Similar to the previous issue, there are unnecessary blank lines in this section.

Apply this fix:

     "chType_DALI_UNIVERSAL_LIGHT_RECEIVER" : "DALI Gateway",
     "chType_UNIVERSAL_LIGHT_RECEIVER" : "LED Controller",
     "chType_UNIVERSAL_LIGHT_WEEK_PROFILE" : "Weekly program",
-

Also applies to: 208-211

Comment on lines +204 to +207

"chType_UNIVERSAL_ACTOR_TRANSMITTER_010V" : "Status report<br/>Universal Actuator 0-10 V",
"chType_UNIVERSAL_ACTOR_VIRTUAL_RECEIVER_010V" : "Universal Actuator 0-10 V",

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix inconsistent newline formatting

There are unnecessary blank lines between these entries that should be removed for consistency with the rest of the file.

Apply this fix:

     "chType_THERMALCONTROL_TRANSMIT" : "Connection partner<br/>radiator thermostat",
-
     "chType_UNIVERSAL_ACTOR_TRANSMITTER_010V" : "Status report<br/>Universal Actuator 0-10 V",
     "chType_UNIVERSAL_ACTOR_VIRTUAL_RECEIVER_010V" : "Universal Actuator 0-10 V",
-
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"chType_UNIVERSAL_ACTOR_TRANSMITTER_010V" : "Status report<br/>Universal Actuator 0-10 V",
"chType_UNIVERSAL_ACTOR_VIRTUAL_RECEIVER_010V" : "Universal Actuator 0-10 V",
"chType_UNIVERSAL_ACTOR_TRANSMITTER_010V" : "Status report<br/>Universal Actuator 0-10 V",
"chType_UNIVERSAL_ACTOR_VIRTUAL_RECEIVER_010V" : "Universal Actuator 0-10 V",

"chType_JALOUSIE" : "Jalousie actuator",
"chType_KEY" : "Push button",
"chType_KEY_TRANSCEIVER" : "Push button",
"chType_KWL_CONTROLLER_TRANSMITTER" : "",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add missing translation for KWL Controller

The entry for KWL_CONTROLLER_TRANSMITTER is empty and needs a proper description.

Apply this fix:

-    "chType_KWL_CONTROLLER_TRANSMITTER" : "",
+    "chType_KWL_CONTROLLER_TRANSMITTER" : "Controlled Ventilation System Controller",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"chType_KWL_CONTROLLER_TRANSMITTER" : "",
"chType_KWL_CONTROLLER_TRANSMITTER" : "Controlled Ventilation System Controller",

Comment on lines +20 to +21
"chType_DOOR_LOCK_STATE_TRANSCEIVER" : "T%FCrschlosssensor",
"chType_DOOR_RECEIVER" : "Tor%F6ffner",
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Standardize character encoding for German special characters

The file uses inconsistent methods for encoding German special characters (URL encoding vs. direct UTF-8). This makes maintenance harder and could lead to display issues.

Apply this pattern consistently throughout the file. For example:

-    "chType_DOOR_LOCK_STATE_TRANSCEIVER" : "T%FCrschlosssensor",
+    "chType_DOOR_LOCK_STATE_TRANSCEIVER" : "Türschlosssensor",
-    "chType_DOOR_RECEIVER" : "Tor%F6ffner",
+    "chType_DOOR_RECEIVER" : "Toröffner",

Also applies to: 38-39, 62-62, 81-84

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (6)
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch (2)

141-142: Improve clarity of technical term

The English translation "Controlled Ventilation System Controller" for chType_KWL_CONTROLLER_TRANSMITTER is redundant with "Controller" appearing twice. Consider simplifying it.

-    "chType_KWL_CONTROLLER_TRANSMITTER" : "Controlled Ventilation System Controller",
+    "chType_KWL_CONTROLLER_TRANSMITTER" : "Controlled Ventilation System Transmitter",

124-124: Fix capitalization inconsistency

The term "Smoke detector" should be capitalized consistently with other entries.

-    "chType_SMOKE_DETECTOR" : "Smoke detector",
+    "chType_SMOKE_DETECTOR" : "Smoke Detector",
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js (4)

12-12: Standardize temperature/humidity sensor descriptions

There's an inconsistency in the descriptions:

  • chType_CLIMATE_TRANSCEIVER uses "Temperature and Humidity sensor"
  • chType_CLIMATE_TRANSCEIVER_TEMP uses "Temperature sensor"

Consider standardizing these descriptions for better clarity.

-    "chType_CLIMATE_TRANSCEIVER" :"Temperature and<br/>Humidity sensor",
+    "chType_CLIMATE_TRANSCEIVER" :"Temperature/Humidity<br/>Sensor",
-    "chType_CLIMATE_TRANSCEIVER_TEMP" :"Temperature sensor",
+    "chType_CLIMATE_TRANSCEIVER_TEMP" :"Temperature<br/>Sensor",

Also applies to: 88-88


220-227: Standardize HmIP group descriptions

The HmIP group descriptions should follow the same format as the channel descriptions above, using <br/> for line breaks where needed.

-    "REMOTE_CONTROL" : "Homematic IP Push button channel",
+    "REMOTE_CONTROL" : "Homematic IP<br/>Push button channel",
-    "RADIATOR_THERMOSTAT" : "Homematic IP Radiator thermostat",
+    "RADIATOR_THERMOSTAT" : "Homematic IP<br/>Radiator thermostat",
-    "SENSOR_WINDOW" : "Homematic IP Window state detection",
+    "SENSOR_WINDOW" : "Homematic IP<br/>Window state detection",
-    "SWITCH_ACTUATOR" : "Homematic IP Switch actuator",
+    "SWITCH_ACTUATOR" : "Homematic IP<br/>Switch actuator",
-    "WALLMOUNTED_THERMOSTAT" : "Homematic IP Wall thermostat",
+    "WALLMOUNTED_THERMOSTAT" : "Homematic IP<br/>Wall thermostat",
-    "FLOOR_HEATING" : "Homematic IP Floor Heating Actuator",
+    "FLOOR_HEATING" : "Homematic IP<br/>Floor Heating Actuator",

77-78: Remove redundant line breaks

These entries have three consecutive <br/> tags which create excessive spacing.

-    "chType_CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER" :  "Floor heating/Pump control<br/><br/>connection partner<br/>room thermostat",
+    "chType_CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER" :  "Floor heating/Pump control<br/>connection partner<br/>room thermostat",
-    "chType_CLIMATECONTROL_FLOOR_TRANSCEIVER" : "Floor heating<br/><br/>connection partner<br/>room thermostat",
+    "chType_CLIMATECONTROL_FLOOR_TRANSCEIVER" : "Floor heating<br/>connection partner<br/>room thermostat",

114-117: Remove leading line breaks

These entries start with <br/> which creates unnecessary spacing at the beginning.

-    "chType_DISPLAY_KEY" : "<br/>Key",
+    "chType_DISPLAY_KEY" : "Key",
-    "chType_DISPLAY_LEVEL" : "<br/>Level",
+    "chType_DISPLAY_LEVEL" : "Level",
-    "chType_DISPLAY_CLIMATE" : "<br/>Room climate",
+    "chType_DISPLAY_CLIMATE" : "Room climate",
-    "chType_DISPLAY_UNKNOWN" : "<br/>Quick Motion",
+    "chType_DISPLAY_UNKNOWN" : "Quick Motion",
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between e3cb43f and 8810fc9.

📒 Files selected for processing (3)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch (1 hunks)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js (1 hunks)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js
🔇 Additional comments (6)
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch (2)

64-65: Verify technical terminology: KWL Controller

The German translation "KWL Controller Sender" for chType_KWL_CONTROLLER_TRANSMITTER should be verified. KWL typically stands for "Kontrollierte Wohnraumlüftung" in German HVAC systems.


6-56: Verify translation completeness

Please verify that all channel types have corresponding translations in both German and English files. Also ensure that technical terms are consistently translated across the entire codebase.

Also applies to: 83-133

buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js (4)

1-2: LGTM: File structure initialization

The jQuery.extend usage with deep copy (true parameter) is correct for safely merging translations.


99-101: Fix German text in English translation file

These entries contain German text with encoding issues (%FC) in an English translation file.


204-211: Remove unnecessary blank lines

There are multiple consecutive blank lines between entries that should be removed for consistency.


228-230: LGTM: File closure

The file closure with an empty "theEnd" entry and proper closing brackets is correct.

+ "chType_SENSOR" : "Sensor",
+ "chType_SERVO_WEEK_PROFILE" : "Week Profile",
+ "chType_SHUTTER_CONTACT" : "Door/Window Contact",
+ "chType_SHUTTER_CONTACT_TRANSCEIVER" : "Door/Shutter Contact",
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Inconsistent terminology in translations

The English translations for these entries are inconsistent:

  • chType_SHUTTER_CONTACT uses "Door/Window Contact"
  • chType_SHUTTER_CONTACT_TRANSCEIVER uses "Door/Shutter Contact"

They should use the same terminology as they refer to the same type of sensor.

-    "chType_SHUTTER_CONTACT_TRANSCEIVER" : "Door/Shutter Contact",
+    "chType_SHUTTER_CONTACT_TRANSCEIVER" : "Door/Window Contact",

Also applies to: 120-120

+ "chType_DISPLAY_THERMOSTAT_INPUT_TRANSMITTER" : "Display Input Thermostat",
+ "chType_DOOR_LOCK_STATE_TRANSCEIVER" : "Door Lock State",
+ "chType_DOOR_RECEIVER" : "Door Opener",
+ "chType_ENERGY_MANAGMENT" : "Energy Management",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo in key name

The key chType_ENERGY_MANAGMENT contains a typo (missing 'E' in MANAGEMENT).

-    "chType_ENERGY_MANAGMENT" : "Energy Management",
+    "chType_ENERGY_MANAGEMENT" : "Energy Management",

This change needs to be applied to both German and English translation files.

Committable suggestion skipped: line range outside the PR's diff.

@jens-maus jens-maus added 🏷️ WebUI This refs the WebUI component 💡 enhancement-ideas New feature or change request labels Nov 17, 2024
@jens-maus jens-maus added this to the next release milestone Nov 17, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js (1)

208-210: Group related channel types together.

The channel types are organized in logical groups with empty lines as separators, which is good. However, consider adding comments to clearly identify these groups for better maintainability.

Add group comments like this:

+    // Universal Actor Channel Types
     "chType_UNIVERSAL_ACTOR_TRANSMITTER_010V" : "Statusmitteilung Universalaktor 0-10&nbsp;V",
     "chType_UNIVERSAL_ACTOR_VIRTUAL_RECEIVER_010V" : "Universalaktor 0-10&nbsp;V",

+    // Light Controller Channel Types
     "chType_DALI_UNIVERSAL_LIGHT_RECEIVER" : "DALI Gateway",
     "chType_UNIVERSAL_LIGHT_RECEIVER" : "LED Controller",
     "chType_UNIVERSAL_LIGHT_WEEK_PROFILE" : "Wochenprogramm",

Also applies to: 211-214, 215-222

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 8810fc9 and 222ff9b.

📒 Files selected for processing (2)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch (1 hunks)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions.patch
🔇 Additional comments (3)
buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js (3)

1-3: LGTM! File structure is well-organized.

The file properly extends the existing langJSON object and maintains a clean hierarchical structure.

Also applies to: 231-233


223-230: LGTM! Clear section for HmIP-Groups.

The HmIP-Groups section is well-documented with a clear comment and consistent translations.


3-54: Verify translation completeness and consistency.

The translations appear comprehensive, but we should verify that all channel types have corresponding translations in both German and English files.

Also applies to: 55-207

✅ Verification successful

All channel type translations are present and consistent between German and English files.

After comparing both files, I can confirm that:

  1. All channel type keys (chType_*) are present in both German and English translations
  2. The structure and organization of both files match
  3. Special characters are properly encoded (e.g., German umlauts using %FC, %F6)
  4. Both files include the same HmIP-Groups section at the end
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Compare channel type keys between German and English translation files
# Expected results: All keys should match between files

# Find the English translation file
ENGLISH_FILE=$(fd --type f "translate.lang.channelDescription.js" | grep "/en/")

if [ -n "$ENGLISH_FILE" ]; then
  echo "Comparing translation keys between German and English files..."
  
  # Extract keys from both files and compare
  DE_KEYS=$(cat buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js | grep -o '"chType_[^"]*"' | sort)
  EN_KEYS=$(cat "$ENGLISH_FILE" | grep -o '"chType_[^"]*"' | sort)
  
  # Compare keys
  diff <(echo "$DE_KEYS") <(echo "$EN_KEYS")
fi

Length of output: 15895


Script:

#!/bin/bash
# Let's try a different approach to compare the files

# First, let's verify the English file exists and get its content
echo "=== English file content ==="
cat buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/en/translate.lang.channelDescription.js

echo -e "\n=== German file content ==="
cat buildroot-external/patches/occu/0194-WebUI-Add-MissingChannelDescriptions/occu/WebUI/www/webui/js/lang/de/translate.lang.channelDescription.js

Length of output: 30117

"chType_AKKU" : "Akku",
"chType_ALARMACTUATOR" : "Alarmgeber",
"chType_BRIGHTNESS_TRANSMITTER" : "Helligkeitsensor",
"chType_CAPACITIVE_FILLING_LEVEL_SENSOR" : "F%FCllstandssensor",
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Standardize character encoding for German special characters.

The file uses inconsistent methods for encoding German special characters:

  1. URL encoding (e.g., %FC for 'ü', %F6 for 'ö')
  2. Direct UTF-8 characters

This inconsistency makes maintenance harder and could lead to display issues.

Apply this pattern consistently throughout the file. For example:

-    "chType_CAPACITIVE_FILLING_LEVEL_SENSOR" : "F%FCllstandssensor",
+    "chType_CAPACITIVE_FILLING_LEVEL_SENSOR" : "Füllstandssensor",
-    "chType_DOOR_LOCK_STATE_TRANSCEIVER" : "T%FCrschlosssensor",
+    "chType_DOOR_LOCK_STATE_TRANSCEIVER" : "Türschlosssensor",

Also applies to: 20-20, 24-24, 28-29, 38-39, 62-62, 81-84

@jens-maus jens-maus merged commit 0bb52cf into jens-maus:master Nov 17, 2024
6 checks passed
@eli4711
Copy link

eli4711 commented Nov 18, 2024

Bis jetzt, alles Fehlerfrei. 👍😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 enhancement-ideas New feature or change request 🏷️ WebUI This refs the WebUI component
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants