]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
extrahd.cgi: Add missing translation strings
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 1 Aug 2023 15:48:35 +0000 (17:48 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 Aug 2023 09:11:57 +0000 (09:11 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/extrahd.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index de5f26d0e19c9c3bf01b43c15b6580253312d091..0b59a02f7ed8be521a68cb5c693281541bb15ea9 100644 (file)
@@ -98,14 +98,17 @@ $extrahdsettings{'UUID'} = '';
 ## Add a new device.
 #
 if ($extrahdsettings{'ACTION'} eq $Lang::tr{'add'}) {
+       # Check if a mount path has been given.
+       if (not $extrahdsettings{'PATH'}) {
+               $errormessage = "$Lang::tr{'extrahd no mount point given'}.";
+       
        # Check if a valid mount path has been choosen.
-       unless(&is_valid_dir("$extrahdsettings{'PATH'}")) {
-               $errormessage = "$Lang::tr{'extrahd you cant mount'} $extrahdsettings{'DEVICE'} $Lang::tr{'extrahd to root'}.";
-       }
+       } elsif(not &is_valid_dir("$extrahdsettings{'PATH'}")) {
+               $errormessage = "$Lang::tr{'extrahd you cant mount'} $extrahdsettings{'DEVICE'} $Lang::tr{'extrahd to'} $extrahdsettings{'PATH'} $Lang::tr{'extrahd because it is outside the allowed mount path'}.";
 
        # Check if the given path allready is mounted somewhere.
-       if(&is_mounted("$extrahdsettings{'PATH'}")) {
-               $errormessage = "$Lang::tr{'extrahd you cant mount'} $extrahdsettings{'DEVICE'} $Lang::tr{'extrahd to'} $extrahdsettings{'PATH'}$Lang::tr{'extrahd because there is already a device mounted'}.";
+       } elsif(&is_mounted("$extrahdsettings{'PATH'}")) {
+               $errormessage = "$Lang::tr{'extrahd you cant mount'} $extrahdsettings{'DEVICE'} $Lang::tr{'extrahd to'} $extrahdsettings{'PATH'} $Lang::tr{'extrahd because there is already a device mounted'}.";
        }
 
        # Check against may previously configured drives.
@@ -122,7 +125,7 @@ if ($extrahdsettings{'ACTION'} eq $Lang::tr{'add'}) {
 
                        # Check if the path is allready used.
                        if ( "$extrahdsettings{'PATH'}" eq "$path" ) {
-                               $errormessage = "$Lang::tr{'extrahd you cant mount'} $extrahdsettings{'DEVICE'} $Lang::tr{'extrahd to'} $extrahdsettings{'PATH'}$Lang::tr{'extrahd because there is already a device mounted'}.";
+                               $errormessage = "$Lang::tr{'extrahd you cant mount'} $extrahdsettings{'DEVICE'} $Lang::tr{'extrahd to'} $extrahdsettings{'PATH'} $Lang::tr{'extrahd because there is already a device mounted'}.";
                        }
 
                        # Check if the uuid is allready used.
@@ -318,16 +321,16 @@ END
 
                                                # Check if the device is mounted properly.
                                                if(&is_mounted($mountpoint)) {
-                                                       print "<img src='/images/updbooster/updxl-led-green.gif' alt='MOUNTED' title='MOUNTED'>&nbsp;\n";
+                                                       print "<img src='/images/updbooster/updxl-led-green.gif' alt='$Lang::tr{'extrahd mounted'}' title='$Lang::tr{'extrahd mounted'}'>&nbsp;\n";
                                                } else {
-                                                       print "<img src='/images/updbooster/updxl-led-red.gif' alt='NOT MOUNTED' title='NOT MOUNTED'>&nbsp;\n";
+                                                       print "<img src='/images/updbooster/updxl-led-red.gif' alt='$Lang::tr{'extrahd not mounted'}' title='$Lang::tr{'extrahd not mounted'}'>&nbsp;\n";
                                                }
 
                                                print "<input type='image' alt='$Lang::tr{'delete'}' title='$Lang::tr{'delete'}' src='/images/delete.gif'>\n";
                                        } else {
                                                unless($disabled) {
                                                        print "<input type='hidden' name='ACTION' value='$Lang::tr{'add'}'>\n";
-                                                       print "<img src='/images/updbooster/updxl-led-gray.gif' alt='UNCONFIGURED' title='UNCONFIGURED'>&nbsp;\n";
+                                                       print "<img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'extrahd not configured'}' title='$Lang::tr{'extrahd not configured'}'>&nbsp;\n";
                                                        print "<input type='image' alt='$Lang::tr{'add'}' title='$Lang::tr{'add'}' src='/images/add.gif'>\n";
                                                }
                                        }
index 33730f0c319d8f3ae1b6cffc88db42d0d558cf46..37b17b43128fc2f1f4c934c882c8774273e4e13f 100644 (file)
 'external access rule removed' => ' Regel für externen Zugang entfernt; starte Zugangskontroller neu',
 'external aliases configuration' => 'Externe Alias-Konfiguration',
 'extrahd' => 'ExtraHD',
+'extrahd because it is outside the allowed mount path' => 'mounten, da sich das Ziel außerhalb der erlaubten Pfade befindet',
 'extrahd because there is already a device mounted' => ' mounten, weil bereits ein Gerät gemountet ist',
 'extrahd cant umount' => 'Konnte',
 'extrahd detected drives' => 'Gefundene Laufwerke',
 'extrahd install or load driver' => 'Wenn Ihre Festplatte nicht angezeigt wird, müssen Sie zuerst den Treiber laden oder ggf. auch nachinstallieren. Wenn diese jedoch angezeigt wird, aber keine Partitionen zu sehen sind, müssen diese erst angelegt werden.',
 'extrahd maybe the device is in use' => 'nicht mounten. Vielleicht wird das Gerät bereits verwendet',
+'extrahd no mount point given' => 'Kein Pfad zum mounten angegeben',
+'extrahd mounted' => 'Gemounted',
+'extrahd not mounted' => 'Nicht gemounted',
+'extrahd not configured' => 'Nicht konfiguriert',
 'extrahd to' => 'nicht nach',
 'extrahd to root' => 'nicht nach root mounten',
 'extrahd unable to read' => 'Lesefehler von',
index 729516538bcf40fc40007f92d4a2d0779fe2807f..b00ecc5ebf8ebbf6c6ed3ee15ef2201f4c555794 100644 (file)
 'external access rule removed' => ' External access rule removed; restarting access controller',
 'external aliases configuration' => 'External aliases configuration',
 'extrahd' => 'ExtraHD',
+'extrahd because it it outside the allowed mount path' => ', because it is outside the allowed mount path',
 'extrahd because there is already a device mounted' => ', because there is already a device mounted',
 'extrahd cant umount' => 'Can\'t umount',
 'extrahd detected drives' => 'detected drives',
 'extrahd install or load driver' => 'If your device isn\'t listed here, you need to install or load the driver.<br />If you can see your device but no partitions you have to create them first.',
+'extrahd no mount point given', => 'No mount point given',
 'extrahd maybe the device is in use' => '. Maybe the device is in use',
+'extrahd mounted' => 'Mounted',
+'extrahd not mounted' => 'Not mounted',
+'extrahd not configured' => 'Not configured',
 'extrahd to' => 'to',
 'extrahd to root' => 'to root',
 'extrahd unable to read' => 'Unable to read',