-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Fix umlaute in translate.lang.js #2883
Conversation
Signed-off-by: Boris Bopp <[email protected]>
WalkthroughThe changes introduce new translations for the Tailscale VPN feature in the German language file of the RaspberryMatic WebUI. New entries provide labels and help text related to the VPN functionality and authentication process. Additionally, modifications were made to the configuration management code to incorporate the VPN status, including updates to several method signatures and the addition of new variables for handling VPN settings. Minor adjustments were also made to existing strings for proper display. Changes
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (4)
buildroot-external/patches/occu/0136-WebUI-Add-Tailscale-VPN.patch (4)
Line range hint
335-377
: Consider disabling the 'Authentifizierung' button when VPN is inactive to prevent unintended clicks.Currently, when VPN is inactive (
$vpn != "1"
), the 'Authentifizierung' button is styled withstyle="color:grey"
, but it remains clickable, which could confuse users. To improve user experience, you can disable the button or remove theonClick
handler when VPN is inactive.Apply this diff to remove the
onClick
handler when VPN is inactive:if {$vpn == "1"} { division {class="CLASS21117"} {onClick="window.open('/tailscale/', '_blank').focus();"} { puts "\${dialogSettingsNetworkVPNLblAuth}" } } else { - division {class="CLASS21117"} {style="color:grey"} { + division {class="CLASS21117"} {style="color:grey"} { puts "\${dialogSettingsNetworkVPNLblAuth}" } + # Removed onClick handler to disable the button }Alternatively, you can add
pointer-events: none;
to the style to make the button unclickable:division {class="CLASS21117"} {style="color:grey; pointer-events: none;"} { puts "\${dialogSettingsNetworkVPNLblAuth}" }
Line range hint
723-734
: Add error handling for VPN service start/stop commands.The
exec
commands used to start and stop the Tailscale VPN service do not include error handling. If these commands fail, the user may not be informed, and the VPN status may not reflect the actual state.Consider wrapping the
exec
commands incatch
blocks to handle potential errors and provide feedback to the user.Example:
# set vpn status set cur_vpn [file exists "/etc/config/tailscaleEnabled"] if { $vpn != $cur_vpn } { if { $vpn == 1 } { exec touch /etc/config/tailscaleEnabled if { [catch {exec /etc/init.d/S46tailscaled restart >/dev/null 2>/dev/null} err] } { # Handle error, e.g., log or notify user } } else { if { [catch {exec /etc/init.d/S46tailscaled stop >/dev/null 2>/dev/null} err] } { # Handle error } exec rm -f /etc/config/tailscaleEnabled } }
Line range hint
695-698
: Correct spelling of 'Authentication' in English translations.The translation key
"dialogSettingsNetworkVPNLblAuth"
is set to"Authentification"
. The correct spelling in English is"Authentication"
.Apply this diff to fix the spelling:
"dialogSettingsNetworkVPNLblActivate" : "Tailscale VPN functionality", - "dialogSettingsNetworkVPNLblAuth" : "Authentification", + "dialogSettingsNetworkVPNLblAuth" : "Authentication", "dialogSettingsNetworkVPNHelpP1" : "The " + HMIdentifier.en.CCUFullNameText + " comes with internal VPN functionality...",
Line range hint
695-698
: Improve wording and fix typos in English VPN help texts.The help texts for the VPN functionality contain minor typos and awkward phrasing. Consider revising for clarity and correctness.
Suggested changes for
"dialogSettingsNetworkVPNHelpP1"
and"dialogSettingsNetworkVPNHelpP2"
:
- Capitalize "WireGuard".
- Change "security proof" to "security audited".
- Correct "over centralized server" to "over centralized servers".
- Improve sentence structure for clarity.
Apply this diff:
"dialogSettingsNetworkVPNHelpP1" : "The " + HMIdentifier.en.CCUFullNameText + " comes with internal VPN functionality which allows it to be accessible from the Internet (e.g., via smartphone) using a secure VPN solution fully under your control. For this functionality, the secure <a href='https://tailscale.com/'>Tailscale</a> VPN solution is used, providing a zero-configuration method to easily integrate your devices into a WireGuard-based, decentralized, and cost-free user VPN. It is fully based on open-source software, security audited, and initiates point-to-point connections between your devices, ensuring that no user traffic is routed over centralized servers.", "dialogSettingsNetworkVPNHelpP2" : "To make your device available, you need to enable the Tailscale VPN functionality and use the 'Authentication' button to access the local authentication page. From there, you can log in with your existing Tailscale credentials and add this central unit to your private Tailscale VPN network, allowing all devices within that network to access it directly.",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- buildroot-external/patches/occu/0136-WebUI-Add-Tailscale-VPN.patch (2 hunks)
🔇 Additional comments (2)
buildroot-external/patches/occu/0136-WebUI-Add-Tailscale-VPN.patch (2)
Line range hint
205-209
: Initialization ofvpn
variable and update ofread_config
function call.The code correctly initializes the
vpn
variable and updates theread_config
call to include it.
140-140
: Ensure consistent percent-encoding of umlauts intranslate.lang.js
.The change replaces "benötigt Neustart" with "ben%F6tigt Neustart", percent-encoding the 'ö' character. To ensure consistency and prevent display issues, verify that all umlauts in the file are percent-encoded similarly.
Run the following script to find instances of umlauts that are not percent-encoded:
Description
Related Issue
None
Types of changes
Alternate Designs
Change the charset of the complete file
Possible Drawbacks
None
Verification Process
None
Release Notes
Not applicable
Contributing checklist
Summary by CodeRabbit