diff options
author | Evan Benn <evan.benn@morsemicro.com> | 2023-12-08 12:02:33 +1100 |
---|---|---|
committer | Evan Benn <evan.benn@morsemicro.com> | 2023-12-15 09:11:10 +1100 |
commit | 22101eb50af976f5f026b76079d37cb756c7425a (patch) | |
tree | 041243fb7e5874fd01fb9fb956779566d4b6b7db /modules/luci-base/htdocs/luci-static/resources/network.js | |
parent | ab95f8a61835376e670a04d8995212959540d0ad (diff) |
luci-base: Make uci mode strings match iwinfo mode strings
uci mesh was being displayed as 'Mesh', while iwinfo mesh was being
reported as 'Mesh Point'. Unify those. Update getActiveModeI18n to deal
with all the values iwinfo returns. Fix the incorrect 'Mash'
translation.
Signed-off-by: Evan Benn <evan.benn@morsemicro.com>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/network.js')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/network.js | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index fc58c3d758..10695cf967 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -3823,8 +3823,8 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */ * Query the current operation mode from runtime information. * * @returns {string} - * Returns the human readable mode name as reported by `ubus` runtime - * state. Possible returned values are: + * Returns the human readable mode name as reported by iwinfo or uci mode. + * Possible returned values are: * - `Master` * - `Ad-Hoc` * - `Client` @@ -3843,7 +3843,7 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */ case 'ap': return 'Master'; case 'sta': return 'Client'; case 'adhoc': return 'Ad-Hoc'; - case 'mesh': return 'Mesh'; + case 'mesh': return 'Mesh Point'; case 'monitor': return 'Monitor'; default: return mode; } @@ -3861,12 +3861,17 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */ var mode = this.getActiveMode(); switch (mode) { - case 'Master': return _('Master'); - case 'Client': return _('Client'); - case 'Ad-Hoc': return _('Ad-Hoc'); - case 'Mash': return _('Mesh'); - case 'Monitor': return _('Monitor'); - default: return mode; + case 'Master': return _('Master'); + case 'Ad-Hoc': return _('Ad-Hoc'); + case 'Client': return _('Client'); + case 'Monitor': return _('Monitor'); + case 'Master(VLAN)': return _('Master (VLAN)'); + case 'WDS': return _('WDS'); + case 'Mesh Point': return _('Mesh Point'); + case 'P2P Client': return _('P2P Client'); + case 'P2P Go': return _('P2P Go'); + case 'Unknown': return _('Unknown'); + default: return mode; } }, |