From e95f12e91e5f6cf119a6aecde9b88f8c8018bb81 Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 20 Mar 2023 19:14:24 +0100 Subject: [PATCH] Add 802.11ac tooltip help text, update messages + compile .mo --- ajax/networking/get_frequencies.php | 11 ++++++----- app/js/custom.js | 10 +++++++--- includes/functions.php | 7 ++++--- locale/en_US/LC_MESSAGES/messages.mo | Bin 31793 -> 32033 bytes locale/en_US/LC_MESSAGES/messages.po | 19 +++++++++++-------- templates/hostapd/basic.php | 4 ++-- 6 files changed, 30 insertions(+), 21 deletions(-) diff --git a/ajax/networking/get_frequencies.php b/ajax/networking/get_frequencies.php index bc21e4cc..7fb29990 100644 --- a/ajax/networking/get_frequencies.php +++ b/ajax/networking/get_frequencies.php @@ -2,6 +2,7 @@ require '../../includes/csrf.php'; require_once '../../includes/config.php'; +require_once '../../includes/locale.php'; if (isset($_POST['interface'])) { @@ -25,16 +26,16 @@ if (isset($_POST['interface'])) { switch ($flags) { case NL80211_BAND_24GHZ: - $msg = _("The selected interface has support for the 2.4 GHz wireless band only."); - break; + $msg = sprintf(_("The selected interface (%s) has support for the 2.4 GHz wireless band only."), $iface); + break; case NL80211_BAND_5GHZ: - $msg = _("The selected interface has support for the 5 GHz wireless band only."); + $msg = sprintf(_("The selected interface (%s) has support for the 5 GHz wireless band only."), $iface); break; case NL80211_BAND_24GHZ | NL80211_BAND_5GHZ: - $msg = _("The selected interface has support for both the 2.4 and 5 GHz wireless bands."); + $msg = sprintf(_("The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands."), $iface); break; default: - $msg = _("The selected interface does not support wireless mode operation."); + $msg = sprintf(_("The selected interface (%s) does not support wireless mode operation."), $iface); } echo json_encode($msg); } diff --git a/app/js/custom.js b/app/js/custom.js index 4615ebb9..1412b44f 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -389,13 +389,17 @@ function loadChannelSelect(selected) { } /* Sets hardware mode tooltip text for selected interface. - * Messages are sent from ajax request for gettext locale support. */ function setHardwareModeTooltip() { var iface = $('#cbxinterface').val(); + var hwmodeText = ''; + // Explanatory text if 802.11ac is disabled + if ($('#cbxhwmode').find('option[value="ac"]').prop('disabled') == true ) { + var hwmodeText = $('#hwmode').attr('data-tooltip'); + } $.post('ajax/networking/get_frequencies.php?',{'interface': iface},function(data){ - responseText = JSON.parse(data); - $('#tiphwmode').attr('data-original-title', responseText); + var responseText = JSON.parse(data); + $('#tiphwmode').attr('data-original-title', responseText + '\n' + hwmodeText ); }); } diff --git a/includes/functions.php b/includes/functions.php index 6ab8a40a..df437037 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -796,10 +796,11 @@ function get_public_ip() * * @return string $tooltip */ -function getTooltip($msg, $id, $visible = true) +function getTooltip($msg, $id, $visible = true, $data_html = false) { - ($visible) ? $opt = 'visible' : $opt = 'invisible'; - $tooltip = ''; + ($visible) ? $opt1 = 'visible' : $opt1 = 'invisible'; + ($data_html) ? $opt2 = 'data-html="true"' : $opt2 = 'data-html="false"'; + $tooltip = ''; return $tooltip; } diff --git a/locale/en_US/LC_MESSAGES/messages.mo b/locale/en_US/LC_MESSAGES/messages.mo index 906fb5e8ff8c7ed21ee3954750b8e46ee4615269..c1a7c5c714ab4d28411fff52fcf1861ade31a281 100644 GIT binary patch delta 7471 zcmd7Wi+4^}8prYTCK0(1Nr=ep%^M*IL6W*t_iJ3!k`Po#kRp*=HPpPc#I4%unYs)^ zExjnFVKQ_&ZmSq=(GJ?tx>j4QOVPzbrLA_pznnd5&7Uw?bNbnPpY!hhJkQ?eP0X%` zuFXHYyqCiLUbFal)n!?+xTBtB#rarP_b828*3JaWYKgnB5YJ%<4sL2$9?V8QVpU)y zR$>5dH2t@6DE)&t0_!DORydBwV9WAaMKod?$b40Ky>3kY>8<&8x_zN^y-0X8bP=p=io=E682)__25v{ zgyWHIv`R4tSEDk$YkY{>+uu;74{POAAPJRd2h@7IQCoMg6~oHl6a!l564u4rsPPBb z27QyAy={+rZX^<;H3>s;DGtDOsI9t;O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iBsn|0d&Pc z`k5GjqcIpKoACw4l~|AQGE@aOp`L%ub~O(5YQ{5+Xyr?&P;R0k_{EIZo$K5WN2S;t z^dK*KqZJ}c?45dFD6+j;Hxv~~xFg}5**mI~aknLU?&1t-k zn&=v;RKK7~?6cVUN()52n24INJ?gpss4W|eDrpXC;(T*|HMXN)h6(sr499O#0eO9j zoIPrY`g}y87K%k>l8pN1>5lr+AA^JOVbec~DfDj`W0pA24@5064RuNjQD@;%bN>l! zqrVHc)7Z_8GpGQ{`MObr6~-N?@k6LHQH|a31gb)z%bba0j0vc(&eqH9u8}eJTkiUH zS!8W{dSnAvxm^^Q>dLdXM<#k#yZD2KOFw=_Px5<=7XN?L#^~(m1vLG+=5vK{eZ-Bnco@go0WrNoCeRzirJqSS*&Y|uiA}OA zVmgMEFz`J$((pJ&;3)e-OsMNA`*uunU=IB%#;4*4yH#wWYneSfwo}h6`ubUlKj3Fv zy|@;e@nl>>KZ5HZmwrYv){U!z_A2{G>`2#WJKhuLnrRR4q=u~E&VPQ&X$-Vid(vF9 z?GHS$J`cF;%bq0HB0HpM_{1U}oX6FbYq@!8C@$d|!*!aM^}Q2mX1k(3<8!!9(GJB7 zu8Caj%`-!2H{j~SHNI+f)6bjQA@jen@6GRNcQ44Y*B12SYFu@zpjANC(X1=Y{_ov? E1E2GPlmGw# diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index 02a8ce22..fd1ff0c1 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -585,17 +585,20 @@ msgstr "Sets the txpower option for the AP interface and the config msgid "dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW." msgstr "dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW." -msgid "The selected interface has support for the 2.4 GHz wireless band only." -msgstr "The selected interface has support for the 2.4 GHz wireless band only." +msgid "The selected interface (%s) has support for the 2.4 GHz wireless band only." +msgstr "The selected interface (%s) has support for the 2.4 GHz wireless band only." -msgid "The selected interface has support for the 2.5 GHz wireless band only." -msgstr "The selected interface has support for the 2.5 GHz wireless band only." +msgid "The selected interface (%s) has support for the 2.5 GHz wireless band only." +msgstr "The selected interface (%s) has support for the 2.5 GHz wireless band only." -msgid "The selected interface has support for both the 2.4 and 5 GHz wireless bands." -msgstr "The selected interface has support for both the 2.4 and 5 GHz wireless bands." +msgid "The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands." +msgstr "The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands." -msgid "The selected interface does not support wireless mode operation." -msgstr "The selected interface does not support wireless mode operation." +msgid "The selected interface (%s) does not support wireless mode operation." +msgstr "The selected interface (%s) does not support wireless mode operation." + +msgid "The 802.11ac 5 GHz option is disabled until a compatible wireless regulatory domain is set." +msgstr "The 802.11ac 5 GHz option is disabled until a compatible wireless regulatory domain is set." #: includes/networking.php msgid "Summary" diff --git a/templates/hostapd/basic.php b/templates/hostapd/basic.php index 77475b27..ddc019ad 100644 --- a/templates/hostapd/basic.php +++ b/templates/hostapd/basic.php @@ -17,7 +17,7 @@
- + +
">