public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] proxy.cgi: Some cosmetics for the absolutely lazy ones... ; -)
Date: Wed, 20 Sep 2017 22:22:34 +0100	[thread overview]
Message-ID: <1505942554.4381.20.camel@ipfire.org> (raw)
In-Reply-To: <20170917131812.2865-1-matthias.fischer@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 4340 bytes --]

Hi,

it would be way better to have the link in the CGI and not in the
translation file. That way translators wouldn't have to deal with any
of the markup and what is even worse: being able to inject any kind of
HTML into the generated output. But that is a different issue.

Would you be up for sending a corrected patch?

I like the idea to get a reference so people find the correct
configuration page easily.

Best,
-Michael

On Sun, 2017-09-17 at 15:18 +0200, Matthias Fischer wrote:
> Added clickable links for 'URL filter' and 'Update accelerator' for faster access.
> 
> Best,
> Matthias
> 
> Signed-off-by: Matthias Fischer <matthias.fischer(a)ipfire.org>
> ---
>  html/cgi-bin/proxy.cgi | 4 ++--
>  langs/de/cgi-bin/de.pl | 2 ++
>  langs/en/cgi-bin/en.pl | 2 ++
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi
> index 0b7d36c3c..1a5985d17 100644
> --- a/html/cgi-bin/proxy.cgi
> +++ b/html/cgi-bin/proxy.cgi
> @@ -1054,11 +1054,11 @@ if ( -e "/usr/bin/squidclamav" ) {
>  } else {
>  	print "<td></td>";
>  }
> -print "<td class='base'><b>".$Lang::tr{'advproxy url filter'}."</b><br />";
> +print "<td class='base'><b>".$Lang::tr{'advproxy url filter link'}."</b><br />";
>  print $Lang::tr{'advproxy enabled'}."<input type='checkbox' name='ENABLE_FILTER' ".$checked{'ENABLE_FILTER'}{'on'}." /><br />";
>  print "+ ".int(($count**(1/3)) * 6);
>  print "</td>";
> -print "<td class='base'><b>".$Lang::tr{'advproxy update accelerator'}."</b><br />";
> +print "<td class='base'><b>".$Lang::tr{'advproxy update accelerator link'}."</b><br />";
>  print $Lang::tr{'advproxy enabled'}."<input type='checkbox' name='ENABLE_UPDXLRATOR' ".$checked{'ENABLE_UPDXLRATOR'}{'on'}." /><br />";
>  print "+ ".int(($count**(1/3)) * 5);
>  print "</td></tr>";
> diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
> index 7bc1c495d..45e45aa2e 100644
> --- a/langs/de/cgi-bin/de.pl
> +++ b/langs/de/cgi-bin/de.pl
> @@ -327,12 +327,14 @@
>  'advproxy unrestricted ip clients' => 'Uneingeschränkte IP-Adressen (eine pro Zeile)',
>  'advproxy unrestricted mac clients' => 'Uneingeschränkte MAC-Adressen (eine pro Zeile)',
>  'advproxy update accelerator' => 'Update-Accelerator',
> +'advproxy update accelerator link' => '<a href="/cgi-bin/updatexlrator.cgi">Update-Accelerator</a>',
>  'advproxy update notification' => 'Update-Benachrichtigung!',
>  'advproxy upstream password' => 'Proxy-Passwort',
>  'advproxy upstream proxy' => 'Vorgelagerter Proxy',
>  'advproxy upstream proxy host:port' => 'Vorgelagerter Proxy (Host:Port)',
>  'advproxy upstream username' => 'Proxy-Benutzername',
>  'advproxy url filter' => 'URL-Filter',
> +'advproxy url filter link' => '<a href="/cgi-bin/urlfilter.cgi">URL-Filter</a>',
>  'advproxy username forwarding' => ' Benutzernamen weiterleiten',
>  'advproxy via forwarding' => 'Proxy-Adresse weiterleiten',
>  'advproxy visible hostname' => 'Sichtbarer Hostname',
> diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
> index 9732a6e9d..adebbf4b4 100644
> --- a/langs/en/cgi-bin/en.pl
> +++ b/langs/en/cgi-bin/en.pl
> @@ -327,6 +327,7 @@
>  'advproxy unrestricted ip clients' => 'Unrestricted IP addresses (one per line)',
>  'advproxy unrestricted mac clients' => 'Unrestricted MAC addresses (one per line)',
>  'advproxy update accelerator' => 'Update accelerator',
> +'advproxy update accelerator link' => '<a href="/cgi-bin/updatexlrator.cgi">Update accelerator</a>',
>  'advproxy update information' => 'There is an updated version available for download. Visit <a href="http://www.advproxy.net" target="_blank">http://www.advproxy.net</a>; for more information.',
>  'advproxy update notification' => 'Update notification!',
>  'advproxy upstream password' => 'Upstream password',
> @@ -334,6 +335,7 @@
>  'advproxy upstream proxy host:port' => 'Upstream proxy (host:port)',
>  'advproxy upstream username' => 'Upstream username',
>  'advproxy url filter' => 'URL filter',
> +'advproxy url filter link' => '<a href="/cgi-bin/urlfilter.cgi">URL filter</a>',
>  'advproxy username forwarding' => 'Username forwarding',
>  'advproxy via forwarding' => 'Proxy address forwarding',
>  'advproxy visible hostname' => 'Visible hostname',

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-09-20 21:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17 13:18 Matthias Fischer
2017-09-20 21:22 ` Michael Tremer [this message]
2017-09-20 22:40   ` Matthias Fischer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1505942554.4381.20.camel@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox