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 906fb5e8..c1a7c5c7 100644 Binary files a/locale/en_US/LC_MESSAGES/messages.mo and b/locale/en_US/LC_MESSAGES/messages.mo differ 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 @@
- + +
">