From patchwork Mon Jan 15 06:41:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 1604 Return-Path: Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.ipfire.org (Postfix) with ESMTP id 4FD5660606 for ; Sun, 14 Jan 2018 20:42:34 +0100 (CET) Received: from mail01.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 48679448C; Sun, 14 Jan 2018 20:42:32 +0100 (CET) Received: from Devel.localdomain (p4FDF0C34.dip0.t-ipconnect.de [79.223.12.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 49DCA2853 for ; Sun, 14 Jan 2018 20:42:23 +0100 (CET) From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH 2/4] Cleaning the lang files: customized GUI files Date: Sun, 14 Jan 2018 20:41:57 +0100 Message-Id: <20180114194159.2004-2-matthias.fischer@ipfire.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180114194159.2004-1-matthias.fischer@ipfire.org> References: <20180114194159.2004-1-matthias.fischer@ipfire.org> X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Patch 2: The required changes for several GUI files. Signed-off-by: Matthias Fischer --- config/cfgroot/graphs.pl | 2 +- config/menu/20-status.menu | 2 +- config/menu/40-services.menu | 2 +- html/cgi-bin/captive.cgi | 4 ++-- html/cgi-bin/captive/index.cgi | 4 ++-- html/cgi-bin/firewall.cgi | 12 ++++++------ html/cgi-bin/fwhosts.cgi | 12 ++++++------ html/cgi-bin/ids.cgi | 4 ++-- html/cgi-bin/logs.cgi/log.dat | 4 ++-- html/cgi-bin/media.cgi | 2 +- html/cgi-bin/pakfire.cgi | 6 +++--- html/cgi-bin/pppsetup.cgi | 6 +++--- html/cgi-bin/qos.cgi | 24 ++++++++++++------------ html/cgi-bin/routing.cgi | 12 ++++++------ html/cgi-bin/urlfilter.cgi | 7 +++++-- 15 files changed, 53 insertions(+), 50 deletions(-) diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index 1bed49fa3..928a74cfb 100644 --- a/config/cfgroot/graphs.pl +++ b/config/cfgroot/graphs.pl @@ -256,7 +256,7 @@ sub updateloadgraph { "-1".$period, "-l 0", "-r", - "-t Load Average ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"}, + "-t ".$Lang::tr{'uptime load average'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"}, "-v ".$Lang::tr{'processes'}, "--color=SHADEA".$color{"color19"}, "--color=SHADEB".$color{"color19"}, diff --git a/config/menu/20-status.menu b/config/menu/20-status.menu index 2bcf0d5e8..0ba4e392b 100644 --- a/config/menu/20-status.menu +++ b/config/menu/20-status.menu @@ -49,7 +49,7 @@ $substatus->{'54.networkovpnsrv'} = { 'caption' => "$Lang::tr{'vpn statistic n2n'}", 'uri' => '/cgi-bin/netovpnsrv.cgi', - 'title' => "$Lang::tr{'vpn statistics n2n'}", + 'title' => "$Lang::tr{'vpn statistic n2n'}", 'enabled' => 1, }; $substatus->{'60.hardwaregraphs'} = { diff --git a/config/menu/40-services.menu b/config/menu/40-services.menu index 2f4d96e73..2c1c8984f 100644 --- a/config/menu/40-services.menu +++ b/config/menu/40-services.menu @@ -25,7 +25,7 @@ 'title' => "Quality of Service", 'enabled' => 1, }; - $subservices->{'60.ids'} = {'caption' => $Lang::tr{'intrusion detection'}, + $subservices->{'60.ids'} = {'caption' => $Lang::tr{'intrusion detection system'}, 'enabled' => 1, 'uri' => '/cgi-bin/ids.cgi', 'title' => "$Lang::tr{'intrusion detection system'}", diff --git a/html/cgi-bin/captive.cgi b/html/cgi-bin/captive.cgi index 65cc349ba..0114c4c72 100755 --- a/html/cgi-bin/captive.cgi +++ b/html/cgi-bin/captive.cgi @@ -758,9 +758,9 @@ sub generate_pdf() { if ($settings{'TITLE'}) { $f_headline->text_center(decode("utf8", $settings{'TITLE'})); - $f_subheadline->text_center(decode("utf8", $Lang::tr{'Captive WiFi coupon'})); + $f_subheadline->text_center(decode("utf8", $Lang::tr{'Captive wifi coupon'})); } else { - $f_headline->text_center(decode("utf8", $Lang::tr{'Captive WiFi coupon'})); + $f_headline->text_center(decode("utf8", $Lang::tr{'Captive wifi coupon'})); } # Coupon diff --git a/html/cgi-bin/captive/index.cgi b/html/cgi-bin/captive/index.cgi index e9606b1bf..e90ee50c5 100755 --- a/html/cgi-bin/captive/index.cgi +++ b/html/cgi-bin/captive/index.cgi @@ -174,8 +174,8 @@ $tmpl->param(ERROR => $errormessage); $tmpl->param(TERMS => &getterms()); # Some translated strings -$tmpl->param(L_ACTIVATE => $Lang::tr{'Captive ACTIVATE'}); -$tmpl->param(L_GAIN_ACCESS => $Lang::tr{'Captive GAIN ACCESS'}); +$tmpl->param(L_ACTIVATE => $Lang::tr{'Captive activate'}); +$tmpl->param(L_GAIN_ACCESS => $Lang::tr{'Captive gain access'}); $tmpl->param(L_AGREE_TERMS => $Lang::tr{'Captive agree tac'}); # Print header diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index face0f460..67b4fcea4 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -1083,8 +1083,8 @@ END print " / @@ -2094,14 +2094,14 @@ END -
+

END }else{ print< - + @@ -2116,7 +2116,7 @@ END -
+
END } diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index a2ade8a20..c7f9beff8 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1324,7 +1324,7 @@ END }else{ print ""; } - print "
"; + print "
"; &Header::closebox(); } sub addhost @@ -1349,7 +1349,7 @@ END }else{ print " "; } - print "
"; + print "
"; &Header::closebox(); } sub addgrp @@ -1577,7 +1577,7 @@ END print"

"; } print""; - print"
"; + print"
"; &Header::closebox(); } sub addgeoipgrp @@ -1679,7 +1679,7 @@ END
- +
@@ -1747,7 +1747,7 @@ END print""; } print< +
END &Header::closebox(); @@ -1827,7 +1827,7 @@ END } print< -
+
END &Header::closebox(); diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 17cb23292..144244a91 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -446,7 +446,7 @@ END refreshpage(); } -&Header::openbox('100%', 'left', $Lang::tr{'intrusion detection system'}); +&Header::openbox('100%', 'left', $Lang::tr{'intrusion detection system settings'}); print < + + + @@ -1782,7 +1785,7 @@ print "\n"; $buttontext = $Lang::tr{'urlfilter add rule'}; if ($tcsettings{'ACTION'} eq $Lang::tr{'edit'}) { &Header::openbox('100%', 'left', $Lang::tr{'urlfilter edit time constraint rule'}.':'); -$buttontext = $Lang::tr{'urlfilter update rule'}; +$buttontext = $Lang::tr{'update'}; } else { &Header::openbox('100%', 'left', $Lang::tr{'urlfilter add new time constraint rule'}.':'); } @@ -2153,7 +2156,7 @@ print "\n"; $buttontext = $Lang::tr{'urlfilter add rule'}; if ($uqsettings{'ACTION'} eq $Lang::tr{'edit'}) { &Header::openbox('100%', 'left', $Lang::tr{'urlfilter edit user quota rule'}.':'); -$buttontext = $Lang::tr{'urlfilter update rule'}; +$buttontext = $Lang::tr{'update'}; } else { &Header::openbox('100%', 'left', $Lang::tr{'urlfilter add new user quota rule'}.':'); }
GREEN Snort @@ -597,7 +597,7 @@ if ( -e "${General::swroot}/snort/enable" || -e "${General::swroot}/snort/enable # Check for empty 'Description' if ($snortrules{$rulefile}{'Description'} eq '') { - print ""; + print "
No description available
"; } else { # Output rule file 'Description' print "
$Lang::tr{'ids rules no description available'}
"; diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index f241365a1..7f117ccb9 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -78,7 +78,7 @@ my %sections = ( my %trsections = ( 'auth' => "$Lang::tr{'loginlogout'}", 'wio' => 'Who Is Online?', - 'captive' => $Lang::tr{'captive'}, + 'captive' => $Lang::tr{'Captive'}, 'clamav' => 'ClamAV', 'collectd' => 'Collectd', 'cron' => 'Cron', @@ -93,7 +93,7 @@ my %trsections = ( 'openvpn' => 'OpenVPN', 'pakfire' => 'Pakfire', 'red' => 'RED', - 'snort' => "$Lang::tr{'intrusion detection'}", + 'snort' => "$Lang::tr{'intrusion detection system'}", 'squid' => "$Lang::tr{'web proxy'}", 'ssh' => 'SSH', 'unbound' => 'DNS: Unbound', diff --git a/html/cgi-bin/media.cgi b/html/cgi-bin/media.cgi index 4c94d1c8d..32eadd6d9 100644 --- a/html/cgi-bin/media.cgi +++ b/html/cgi-bin/media.cgi @@ -147,7 +147,7 @@ END my @iostat1 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$1}'); my @iostat2 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$5}'); my @iostat3 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$6}'); - print ""; + print ""; my $i=0; for(my $i = 1; $i <= $#iostat1; $i++){ diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 143f123b7..857003715 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -245,13 +245,13 @@ END
- + - + END ; if ($pppsettings{'TYPE'} =~ /^(modem)$/) { diff --git a/html/cgi-bin/qos.cgi b/html/cgi-bin/qos.cgi index 071b93f5d..519b29c78 100644 --- a/html/cgi-bin/qos.cgi +++ b/html/cgi-bin/qos.cgi @@ -628,7 +628,7 @@ elsif ($qossettings{'ACTION'} eq $Lang::tr{'Add Rule'})
$snortrules{$rulefile}{'Description'}
 \n

transfers

 \n

Transfers

 
$Lang::tr{'pakfire available addons'} $Lang::tr{'pakfire installed addons'} -
+

$Lang::tr{'pakfire install description'}

+

$Lang::tr{'pakfire uninstall description'}

- +
END ; @@ -838,10 +838,10 @@ END } sub changebandwidth { - &Header::openbox('100%', 'center', $Lang::tr{'bandwithsettings'}); + &Header::openbox('100%', 'center', $Lang::tr{'bandwidthsettings'}); if ($qossettings{'ENABLED'} eq 'on') { - print "$Lang::tr{'bandwitherror'}"; - print "$Lang::tr{'back'}"; + print "$Lang::tr{'bandwidtherror'}"; + print "
$Lang::tr{
"; } else { print < @@ -932,10 +932,10 @@ END print <
  -
$Lang::tr{'guaranteed bandwith'}: +
$Lang::tr{'guaranteed bandwidth'}:   -
$Lang::tr{'max bandwith'} *: +
$Lang::tr{'max bandwidth'} *:  
Burst: @@ -1014,10 +1014,10 @@ END } print <  -
$Lang::tr{'guaranteed bandwith'}: +
$Lang::tr{'guaranteed bandwidth'}:   -
$Lang::tr{'max bandwith'}: +
$Lang::tr{'max bandwidth'}:  
Burst: @@ -1187,8 +1187,8 @@ sub showclasses {
$Lang::tr{'interface'} $Lang::tr{'Class'} $Lang::tr{'priority'} - $Lang::tr{'guaranteed bandwith'} - $Lang::tr{'max bandwith'} + $Lang::tr{'guaranteed bandwidth'} + $Lang::tr{'max bandwidth'} Burst Ceil Burst TOS @@ -1439,7 +1439,7 @@ sub validminbwdth { } unless ( ( $qossettings{'MINBWDTH'} >= 1 ) && ( $qossettings{'MINBWDTH'} <= $qossettings{'SPD'} ) ) { $qossettings{'VALID'} = 'no'; - $message = "$Lang::tr{'false min bandwith'}"; + $message = "$Lang::tr{'false min bandwidth'}"; } $qossettings{'SPD'} = ''; } @@ -1454,7 +1454,7 @@ sub validmaxbwdth { } unless ( ( $qossettings{'MAXBDWTH'} >= 0 ) && ($qossettings{'MAXBDWTH'} >= $qossettings{'MINBDWTH'}) &&( $qossettings{'MAXBDWTH'} <= $qossettings{'SPD'} ) ) { $qossettings{'VALID'} = 'no'; - $message = "$Lang::tr{'false max bandwith'}"; + $message = "$Lang::tr{'false max bandwidth'}"; } $qossettings{'SPD'} = ''; } diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi index f2014e2e1..dc77f7f03 100644 --- a/html/cgi-bin/routing.cgi +++ b/html/cgi-bin/routing.cgi @@ -49,7 +49,7 @@ $settings{'IP'} = ''; $settings{'GATEWAY'} = ''; $settings{'REMARK'} = ''; my @nosaved=('EN','IP','GATEWAY','REMARK'); # List here ALL setting2 fields. Mandatory - + $settings{'ACTION'} = ''; # add/edit/remove $settings{'KEY1'} = ''; # point record for ACTION @@ -105,14 +105,14 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) { $temp[0] = $temp[0] ne '' ? '' : 'on'; # Toggle the field @current[$settings{'KEY1'}] = join (',',@temp)."\n"; $settings{'KEY1'} = ''; # End edit mode - + &General::log($Lang::tr{'routing config changed'}); #Save current open(FILE, ">$datafile") or die 'routing datafile error'; print FILE @current; close(FILE); - + # Rebuild configuration file &BuildConfiguration; } @@ -194,7 +194,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'remove'}) { print FILE @current; close(FILE); $settings{'KEY1'} = ''; # End remove mode - &General::log($Lang::tr{'route config changed'}); + &General::log($Lang::tr{'routing config changed'}); &BuildConfiguration; # then re-build conf which use new data } @@ -402,7 +402,7 @@ if ( $output != "" ) { sub SortDataFile { our %entries = (); - + # Sort pair of record received in $a $b special vars. # When IP is specified use numeric sort else alpha. # If sortname ends with 'Rev', do reverse sort. @@ -452,7 +452,7 @@ sub SortDataFile %{$record} = @record; # populate that hash with @record $entries{$record->{KEY}} = $record; # add this to a hash of hashes } - + open(FILE, ">$datafile") or die 'routing datafile error'; # Each field value is printed , with the newline ! Don't forget separator and order of them. diff --git a/html/cgi-bin/urlfilter.cgi b/html/cgi-bin/urlfilter.cgi index c3c327eec..0eb015a9e 100644 --- a/html/cgi-bin/urlfilter.cgi +++ b/html/cgi-bin/urlfilter.cgi @@ -1479,16 +1479,19 @@ print <$Lang::tr{'urlfilter username log'}:
$Lang::tr{'urlfilter empty ads'}: $Lang::tr{'urlfilter category log'}:
$Lang::tr{'urlfilter block ip'}:
$Lang::tr{'urlfilter block all'}: