From 1a217dac87a0630cfa11ddd35986c11697b92021 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 29 Mar 2025 01:32:21 +0100 Subject: [PATCH] wifi networks: allow localization --- .config/ags/i18n/locales/Default.json | 5 +++++ .../modules/sideright/centermodules/wifinetworks.js | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.config/ags/i18n/locales/Default.json b/.config/ags/i18n/locales/Default.json index 25a5b4306..ff17c989e 100644 --- a/.config/ags/i18n/locales/Default.json +++ b/.config/ags/i18n/locales/Default.json @@ -92,8 +92,13 @@ "Paired": "Paired", "More": "More", "Selected": "Selected", + "Connecting to": "Connecting to", "Current network": "Current network", "Authentication": "Authentication", + "Authentication failed": "Authentication failed", + "Enter network password": "Enter network password", + "Properties": "Properties", + "Forget": "Forget", "Effects": "Effects", "Transparency": "Transparency", "[AGS]\nMake shell elements transparent\nBlur is also recommended if you enable this": "[AGS]\nMake shell elements transparent\nBlur is also recommended if you enable this", diff --git a/.config/ags/modules/sideright/centermodules/wifinetworks.js b/.config/ags/modules/sideright/centermodules/wifinetworks.js index 85b922013..5932ce4f7 100644 --- a/.config/ags/modules/sideright/centermodules/wifinetworks.js +++ b/.config/ags/modules/sideright/centermodules/wifinetworks.js @@ -39,7 +39,7 @@ const WifiNetwork = (accessPoint) => { return Button({ onClicked: accessPoint.active ? () => { } : () => { connectAttempt = accessPoint.ssid; - networkAuthSSID.label = `Connecting to: ${connectAttempt}`; + networkAuthSSID.label = `${getString('Connecting to')}: ${connectAttempt}`; // Check if the SSID is stored execAsync(['nmcli', '-g', 'NAME', 'connection', 'show']) @@ -151,7 +151,7 @@ const CurrentNetwork = () => { }); const cancelAuthButton = Button({ className: 'txt sidebar-wifinetworks-network-button', - label: 'Cancel', + label: getString('Cancel'), hpack: 'end', onClicked: () => { networkAuth.revealChild = false; @@ -175,7 +175,7 @@ const CurrentNetwork = () => { revealChild: false, child: Label({ className: 'txt txt-italic txt-subtext', - label: 'Authentication failed', + label: getString('Authentication failed'), }), }) const authEntry = Entry({ @@ -200,10 +200,10 @@ const CurrentNetwork = () => { authFailed.revealChild = true; }); }, - placeholderText: 'Enter network password', + placeholderText: getString('Enter network password'), }); const forgetButton = Button({ - label: 'Forget', + label: getString('Forget'), hexpand: true, className: 'txt sidebar-wifinetworks-network-button', onClicked: () => { @@ -228,7 +228,7 @@ const CurrentNetwork = () => { setup: setupCursorHover, }); const propertiesButton = Button({ - label: 'Properties', + label: getString('Properties'), className: 'txt sidebar-wifinetworks-network-button', hexpand: true, onClicked: () => {