From 6fd4b340550ca69de591a84387ac41b7045937c3 Mon Sep 17 00:00:00 2001 From: Julien Vaubourg Date: Tue, 29 Sep 2015 18:01:10 +0200 Subject: [PATCH] Clean prerequisites and fix css outline for tabs --- manifest.json | 4 +-- scripts/install | 17 ++-------- scripts/prerequisites | 16 ++++++++++ scripts/upgrade | 2 ++ sources/i18n/localization.pot | 58 +++++++++++++++++------------------ sources/public/css/style.css | 2 +- 6 files changed, 52 insertions(+), 47 deletions(-) create mode 100644 scripts/prerequisites diff --git a/manifest.json b/manifest.json index 1ce9263..c549280 100644 --- a/manifest.json +++ b/manifest.json @@ -51,8 +51,8 @@ { "name": "firmware_nonfree", "ask": { - "en": "Install non-free firmwares for the wifi dongle (yes/no)", - "fr": "Installer des firmwares non-libres pour la clé USB wifi (yes/no)" + "en": "Install non-free firmwares - in addition to the free ones - for the wifi dongle (yes/no)", + "fr": "Installer des firmwares non-libres (en plus des libres) pour la clé USB wifi (yes/no)" }, "example": "yes", "default": "yes" diff --git a/scripts/install b/scripts/install index 06fba07..5de2e25 100644 --- a/scripts/install +++ b/scripts/install @@ -29,21 +29,8 @@ firmware_nonfree=${5} if ! $upgrade; then - # Check YunoHost version - ynh_version=$(sudo dpkg -l yunohost | grep ii | awk '{ print $3 }' | sed 's/\.//g') - - if [ "${ynh_version}" -lt 220 ]; then - echo "ERROR: You need a YunoHost version equals or greater than 2.2.0" >&2 - exit 1 - fi - - sudo systemctl is-active dnsmasq &> /dev/null - - if [ $? -ne 0 ]; then - echo "ERROR: You need to enable dnsmasq instead of bind9 (apt-get remove bind9 && systemctl start dnsmasq)" >&2 - exit 1 - fi - + source ./prerequisites + # Check arguments if [ -z "${wifi_ssid}" -o -z "${wifi_passphrase}" ]; then echo "ERROR: Your Wifi Hotspot needs a name and a password" >&2 diff --git a/scripts/prerequisites b/scripts/prerequisites new file mode 100644 index 0000000..5a22763 --- /dev/null +++ b/scripts/prerequisites @@ -0,0 +1,16 @@ +# Source me + +# Check YunoHost version (dnsmasq) +ynh_version=$(sudo dpkg -l yunohost | grep ii | awk '{ print $3 }' | sed 's/\.//g') + +if [ "${ynh_version}" -lt 220 ]; then + echo "ERROR: You need a YunoHost version equals or greater than 2.2.0" >&2 + exit 1 +fi + +sudo systemctl is-active dnsmasq &> /dev/null + +if [ $? -ne 0 ]; then + echo "ERROR: You need to enable dnsmasq instead of bind9 (apt-get remove bind9 && systemctl start dnsmasq)" >&2 + exit 1 +fi diff --git a/scripts/upgrade b/scripts/upgrade index cd0a54e..f54d738 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,6 +12,8 @@ path=$(ynh_setting hotspot path) wifi_ssid=$(ynh_setting hotspot wifi_ssid) wifi_passphrase=$(ynh_setting hotspot wifi_passphrase) +source ./prerequisites + if dpkg -l firmware-linux-nonfree &> /dev/null; then firmware_nonfree=yes else diff --git a/sources/i18n/localization.pot b/sources/i18n/localization.pot index 081c0f8..99d136f 100644 --- a/sources/i18n/localization.pot +++ b/sources/i18n/localization.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-15 21:41+0200\n" +"POT-Creation-Date: 2015-09-29 16:56+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,40 +17,40 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: sources/controller.php:199 -msgid "All Wifi names must be unique" -msgstr "" - -#: sources/controller.php:205 -msgid "All IPv4 NAT prefixes must be unique" -msgstr "" - -#: sources/controller.php:211 -msgid "All IPv6 delegated prefixes must be unique" -msgstr "" - -#: sources/controller.php:217 -msgid "Your Wifi Hotspot needs a name and a password" -msgstr "" - -#: sources/controller.php:221 -msgid "Your password must from 8 to 63 characters (WPA2 passphrase)" -msgstr "" - -#: sources/controller.php:225 -msgid "" -"Only printable ASCII characters are permitted in " -"your password" -msgstr "" - -#: sources/controller.php:234 +#: sources/controller.php:188 msgid "You have to choose a wifi antenna interface" msgstr "" -#: sources/controller.php:237 +#: sources/controller.php:191 msgid "The wifi antenna interface seems not exist on the system" msgstr "" +#: sources/controller.php:207 +msgid "All Wifi names must be unique" +msgstr "" + +#: sources/controller.php:213 +msgid "All IPv4 NAT prefixes must be unique" +msgstr "" + +#: sources/controller.php:219 +msgid "All IPv6 delegated prefixes must be unique" +msgstr "" + +#: sources/controller.php:225 +msgid "Your Wifi Hotspot needs a name and a password" +msgstr "" + +#: sources/controller.php:229 +msgid "Your password must from 8 to 63 characters (WPA2 passphrase)" +msgstr "" + +#: sources/controller.php:233 +msgid "" +"Only printable ASCII characters are permitted in " +"your password" +msgstr "" + #: sources/controller.php:244 msgid "The IPv6 Delegated Prefix format looks bad" msgstr "" diff --git a/sources/public/css/style.css b/sources/public/css/style.css index aeec92a..0d1616e 100644 --- a/sources/public/css/style.css +++ b/sources/public/css/style.css @@ -150,7 +150,7 @@ div.tabs { padding: 14px 14px 0 10px; } -div.tabs a { +ul.nav a { outline: none; }