From mboxrd@z Thu Jan 1 00:00:00 1970 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> In-Reply-To: <20180114194159.2004-1-matthias.fischer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9140020720951354465==" List-Id: --===============9140020720951354465== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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'}." ".$Lan= g::tr{$period."-graph"}, "-v ".$Lang::tr{'processes'}, "--color=3DSHADEA".$color{"color19"}, "--color=3DSHADEB".$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'} =3D { 'caption' =3D> "$Lang::tr{'vpn statistic n2n'}", 'uri' =3D> '/cgi-bin/netovpnsrv.cgi', - 'title' =3D> "$Lang::tr{'vpn statistics n2n'}", + 'title' =3D> "$Lang::tr{'vpn statistic n2n'}", 'enabled' =3D> 1, }; $substatus->{'60.hardwaregraphs'} =3D { 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' =3D> "Quality of Service", 'enabled' =3D> 1, }; - $subservices->{'60.ids'} =3D {'caption' =3D> $Lang::tr{'intrusion detect= ion'}, + $subservices->{'60.ids'} =3D {'caption' =3D> $Lang::tr{'intrusion detect= ion system'}, 'enabled' =3D> 1, 'uri' =3D> '/cgi-bin/ids.cgi', 'title' =3D> "$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() { =20 if ($settings{'TITLE'}) { $f_headline->text_center(decode("utf8", $settings{'TITLE'})); - $f_subheadline->text_center(decode("utf8", $Lang::tr{'Captive WiFi coupo= n'})); + $f_subheadline->text_center(decode("utf8", $Lang::tr{'Captive wifi coupo= n'})); } else { - $f_headline->text_center(decode("utf8", $Lang::tr{'Captive WiFi coupon'}= )); + $f_headline->text_center(decode("utf8", $Lang::tr{'Captive wifi coupon'}= )); } =20 # 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 =3D> $errormessage); $tmpl->param(TERMS =3D> &getterms()); =20 # Some translated strings -$tmpl->param(L_ACTIVATE =3D> $Lang::tr{'Captive ACTIVATE'}); -$tmpl->param(L_GAIN_ACCESS =3D> $Lang::tr{'Captive GAIN ACCESS'}); +$tmpl->param(L_ACTIVATE =3D> $Lang::tr{'Captive activate'}); +$tmpl->param(L_GAIN_ACCESS =3D> $Lang::tr{'Captive gain access'}); $tmpl->param(L_AGREE_TERMS =3D> $Lang::tr{'Captive agree tac'}); =20 # 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 " "; }=09 - print "
"; + print "
"; &Header::closebox(); } sub addgrp @@ -1577,7 +1577,7 @@ END print"

"; } print""; - print"
"; + print"
"; &Header::closebox(); } sub addgeoipgrp @@ -1679,7 +1679,7 @@ END =20
=20 - + =20
@@ -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(); } =20 -&Header::openbox('100%', 'left', $Lang::tr{'intrusion detection system'}); +&Header::openbox('100%', 'left', $Lang::tr{'intrusion detection system setti= ngs'}); print < + + + @@ -1782,7 +1785,7 @@ print "\n"; $buttontext =3D $Lang::tr{'urlfilter add rule'}; if ($tcsettings{'ACTION'} eq $Lang::tr{'edit'}) { &Header::openbox('100%', 'left', $Lang::tr{'urlfilter edit time constraint r= ule'}.':'); -$buttontext =3D $Lang::tr{'urlfilter update rule'}; +$buttontext =3D $Lang::tr{'update'}; } else { &Header::openbox('100%', 'left', $Lang::tr{'urlfilter add new time constrain= t rule'}.':'); } @@ -2153,7 +2156,7 @@ print "\n"; $buttontext =3D $Lang::tr{'urlfilter add rule'}; if ($uqsettings{'ACTION'} eq $Lang::tr{'edit'}) { &Header::openbox('100%', 'left', $Lang::tr{'urlfilter edit user quota rule'}= .':'); -$buttontext =3D $Lang::tr{'urlfilter update rule'}; +$buttontext =3D $Lang::tr{'update'}; } else { &Header::openbox('100%', 'left', $Lang::tr{'urlfilter add new user quota rul= e'}.':'); } --=20 2.15.1 --===============9140020720951354465==--
GREEN Snort @@ -597,7 +597,7 @@ if ( -e "${General::swroot}/snort/enable" || -e "${Genera= l::swroot}/snort/enable =20 # Check for empty 'Description' if ($snortrules{$rulefile}{'Description'} eq '') { - print ""; + print "
No description avail= able
"; } 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 =3D ( my %trsections =3D ( 'auth' =3D> "$Lang::tr{'loginlogout'}", 'wio' =3D> 'Who Is Online?', - 'captive' =3D> $Lang::tr{'captive'}, + 'captive' =3D> $Lang::tr{'Captive'}, 'clamav' =3D> 'ClamAV', 'collectd' =3D> 'Collectd', 'cron' =3D> 'Cron', @@ -93,7 +93,7 @@ my %trsections =3D ( 'openvpn' =3D> 'OpenVPN', 'pakfire' =3D> 'Pakfire', 'red' =3D> 'RED', - 'snort' =3D> "$Lang::tr{'intrusion detection'}", + 'snort' =3D> "$Lang::tr{'intrusion detection system'}", 'squid' =3D> "$Lang::tr{'web proxy'}", 'ssh' =3D> 'SSH', 'unbound' =3D> '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 =3D qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \= $1}'); my @iostat2 =3D qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \= $5}'); my @iostat3 =3D qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \= $6}'); - print ""; + print ""; my $i=3D0; =20 for(my $i =3D 1; $i <=3D $#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
- + =20 - + END ; if ($pppsettings{'TYPE'} =3D~ /^(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{$rulefil= e}{'Description'}
 \n

transfers

 \n

Transfers

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

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

+

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

- +
END ; @@ -838,10 +838,10 @@ END } =20 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 "
3D'$Lang::tr{'back'}'
"; } else { print < @@ -932,10 +932,10 @@ END print <
  -
$Lang::tr{'guaranteed bandwith'}: +
$Lang::tr{'guaranteed bandwidth'}:   -
$Lang::tr{'max bandwith'} 3D'*': +
$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'} $La= ng::tr{'priority'} - $La= ng::tr{'guaranteed bandwith'} - $La= ng::tr{'max bandwith'} + $La= ng::tr{'guaranteed bandwidth'} + $La= ng::tr{'max bandwidth'} Bur= st Cei= l Burst TOS @@ -1439,7 +1439,7 @@ sub validminbwdth { } unless ( ( $qossettings{'MINBWDTH'} >=3D 1 ) && ( $qossettings{'MINBWDTH'}= <=3D $qossettings{'SPD'} ) ) { $qossettings{'VALID'} =3D 'no'; - $message =3D "$Lang::tr{'false min bandwith'}"; + $message =3D "$Lang::tr{'false min bandwidth'}"; } $qossettings{'SPD'} =3D ''; } @@ -1454,7 +1454,7 @@ sub validmaxbwdth { } unless ( ( $qossettings{'MAXBDWTH'} >=3D 0 ) && ($qossettings{'MAXBDWTH'} = >=3D $qossettings{'MINBDWTH'}) &&( $qossettings{'MAXBDWTH'} <=3D $qossettings= {'SPD'} ) ) { $qossettings{'VALID'} =3D 'no'; - $message =3D "$Lang::tr{'false max bandwith'}"; + $message =3D "$Lang::tr{'false max bandwidth'}"; } $qossettings{'SPD'} =3D ''; } 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'} =3D ''; $settings{'GATEWAY'} =3D ''; $settings{'REMARK'} =3D ''; my @nosaved=3D('EN','IP','GATEWAY','REMARK'); # List here ALL setting2 field= s. Mandatory - =20 + $settings{'ACTION'} =3D ''; # add/edit/remove $settings{'KEY1'} =3D ''; # point record for ACTION =20 @@ -105,14 +105,14 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable dis= able'}) { $temp[0] =3D $temp[0] ne '' ? '' : 'on'; # Toggle the field @current[$settings{'KEY1'}] =3D join (',',@temp)."\n"; $settings{'KEY1'} =3D ''; # End edit mode - =20 + &General::log($Lang::tr{'routing config changed'}); =20 #Save current open(FILE, ">$datafile") or die 'routing datafile error'; print FILE @current; close(FILE); -=09 + # Rebuild configuration file &BuildConfiguration; } @@ -194,7 +194,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'remove'}) { print FILE @current; close(FILE); $settings{'KEY1'} =3D ''; # End remove mode - &General::log($Lang::tr{'route config changed'}); + &General::log($Lang::tr{'routing config changed'}); =20 &BuildConfiguration; # then re-build conf which use new data } @@ -402,7 +402,7 @@ if ( $output !=3D "" ) { sub SortDataFile { our %entries =3D (); - =20 + # 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} =3D @record; # populate that hash with @record $entries{$record->{KEY}} =3D $record; # add this to a hash of hashes } - =20 + open(FILE, ">$datafile") or die 'routing datafile error'; =20 # Each field value is printed , with the newline ! Don't forget separato= r 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'}: