Browse Source

Clean prerequisites and fix css outline for tabs

Julien Vaubourg 9 years ago
parent
commit
6fd4b34055
6 changed files with 38 additions and 33 deletions
  1. 2 2
      manifest.json
  2. 2 15
      scripts/install
  3. 16 0
      scripts/prerequisites
  4. 2 0
      scripts/upgrade
  5. 15 15
      sources/i18n/localization.pot
  6. 1 1
      sources/public/css/style.css

+ 2 - 2
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"

+ 2 - 15
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

+ 16 - 0
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

+ 2 - 0
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

+ 15 - 15
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 <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,40 +17,40 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: sources/controller.php:199
+#: sources/controller.php:188
+msgid "You have to choose a wifi antenna interface"
+msgstr ""
+
+#: 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:205
+#: sources/controller.php:213
 msgid "All IPv4 NAT prefixes must be unique"
 msgstr ""
 
-#: sources/controller.php:211
+#: sources/controller.php:219
 msgid "All IPv6 delegated prefixes must be unique"
 msgstr ""
 
-#: sources/controller.php:217
+#: sources/controller.php:225
 msgid "Your Wifi Hotspot needs a name and a password"
 msgstr ""
 
-#: sources/controller.php:221
+#: sources/controller.php:229
 msgid "Your password must from 8 to 63 characters (WPA2 passphrase)"
 msgstr ""
 
-#: sources/controller.php:225
+#: sources/controller.php:233
 msgid ""
 "Only <LINK:ASCII>printable ASCII characters</LINK:ASCII> are permitted in "
 "your password"
 msgstr ""
 
-#: sources/controller.php:234
-msgid "You have to choose a wifi antenna interface"
-msgstr ""
-
-#: sources/controller.php:237
-msgid "The wifi antenna interface seems not exist on the system"
-msgstr ""
-
 #: sources/controller.php:244
 msgid "The IPv6 Delegated Prefix format looks bad"
 msgstr ""

+ 1 - 1
sources/public/css/style.css

@@ -150,7 +150,7 @@ div.tabs {
   padding: 14px 14px 0 10px;
 }
 
-div.tabs a {
+ul.nav a {
   outline: none;
 }