Message ID | ce11e44c-23bf-6bfb-1cc3-5ecd5f4d0dfa@ipfire.org |
---|---|
State | Accepted |
Commit | a0774e3cc870700e62da49ec590cafea2006a454 |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 499pnW45lqz3xR5 for <patchwork@web04.haj.ipfire.org>; Mon, 27 Apr 2020 15:37:51 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 499pnV3dk1z23J; Mon, 27 Apr 2020 15:37:50 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 499pnS4Z72z2y3Z; Mon, 27 Apr 2020 15:37:48 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 499pnQ2ddJz2y3Z for <development@lists.ipfire.org>; Mon, 27 Apr 2020 15:37:46 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 499pnP0LSDz1G4 for <development@lists.ipfire.org>; Mon, 27 Apr 2020 15:37:44 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1588001865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKVUyn2YP7DTjn7eMi3uxjEBZil9d/DXnFd3g2o/Uo0=; b=kHM6SeXpeP5UEHC07tvLM3PbH8A17GyPDtGWm64ggoRkboS5vB7X1qGvYI+hsIqIxyGiwC 0LTKUvRS87PNj+Cw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1588001865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKVUyn2YP7DTjn7eMi3uxjEBZil9d/DXnFd3g2o/Uo0=; b=tOgkG+ef7skV0FIaVw/2+eo7HcAnqy4JjhUoVdresIXY+9Hf9fsali8rAJHcQkKncVNCyf Jjj3wTckVOH8V6UT2w9q2zhim0PV6rztbrL+P5KrSPZsUt2sdp9vAbeOWMiO+hLobEdRst qbTy+MaH7KAmIQq0KuK1bFFfZtTyD5o+4PlVZZe9qufz0fPwgjV7JERsA71ErmPFAgh2M/ yePE3oSYQlJHMYY26WMRS6gc7QFDxpTjGeyN/hqcbhZM2vNunCmLlLB9gmOMzGRObyjdHZ BIkNJJ9KyLl+mAec0L8c8jCFtZkij8mUzUB4IJ/diQRLPAOqxQV61RuueHcnhQ== To: "IPFire: Development-List" <development@lists.ipfire.org> From: =?utf-8?q?Peter_M=C3=BCller?= <peter.mueller@ipfire.org> Subject: [PATCH] system.cgi: properly translate load average graph Message-ID: <ce11e44c-23bf-6bfb-1cc3-5ecd5f4d0dfa@ipfire.org> Date: Mon, 27 Apr 2020 17:37:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=peter.mueller@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
system.cgi: properly translate load average graph
|
|
Commit Message
Peter Müller
April 27, 2020, 3:37 p.m. UTC
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
config/cfgroot/graphs.pl | 2 +-
html/cgi-bin/system.cgi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Comments
Hi, > On 27 Apr 2020, at 16:37, Peter Müller <peter.mueller@ipfire.org> wrote: > > Signed-off-by: Peter Müller <peter.mueller@ipfire.org> > --- > config/cfgroot/graphs.pl | 2 +- > html/cgi-bin/system.cgi | 2 +- > 2 files changed, 2 insertions(+), 2 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/html/cgi-bin/system.cgi b/html/cgi-bin/system.cgi > index 487ba996c..2c83f1e81 100644 > --- a/html/cgi-bin/system.cgi > +++ b/html/cgi-bin/system.cgi > @@ -66,7 +66,7 @@ if ( $querry[0] =~ "cpufreq"){ > &Header::closebox(); > } > > - &Header::openbox('100%', 'center', "Load $Lang::tr{'graph'}"); > + &Header::openbox('100%', 'center', "$Lang::tr{'uptime load average'} $Lang::tr{'graph'}"); You are concatenating two strings here. This might work in English, but not in other languages. So the correct way would be to have “uptime load average graph” as one string. Best, -Michael > &Graphs::makegraphbox("system.cgi","load","day"); > &Header::closebox(); > > -- > 2.16.4
Hello Michael, > Hi, > >> On 27 Apr 2020, at 16:37, Peter Müller <peter.mueller@ipfire.org> wrote: >> >> Signed-off-by: Peter Müller <peter.mueller@ipfire.org> >> --- >> config/cfgroot/graphs.pl | 2 +- >> html/cgi-bin/system.cgi | 2 +- >> 2 files changed, 2 insertions(+), 2 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/html/cgi-bin/system.cgi b/html/cgi-bin/system.cgi >> index 487ba996c..2c83f1e81 100644 >> --- a/html/cgi-bin/system.cgi >> +++ b/html/cgi-bin/system.cgi >> @@ -66,7 +66,7 @@ if ( $querry[0] =~ "cpufreq"){ >> &Header::closebox(); >> } >> >> - &Header::openbox('100%', 'center', "Load $Lang::tr{'graph'}"); >> + &Header::openbox('100%', 'center', "$Lang::tr{'uptime load average'} $Lang::tr{'graph'}"); > > You are concatenating two strings here. This might work in English, but not in other languages. > > So the correct way would be to have “uptime load average graph” as one string. I agree. Unfortunately, we did the same thing in other places so this probably requires some clean up effort > 5 minutes. :-/ In the meantime, this can be merged or dropped. Thanks, and best regards, Peter Müller > > Best, > -Michael > >> &Graphs::makegraphbox("system.cgi","load","day"); >> &Header::closebox(); >> >> -- >> 2.16.4 >
Hi, > On 27 Apr 2020, at 17:11, Peter Müller <peter.mueller@ipfire.org> wrote: > > Hello Michael, > >> Hi, >> >>> On 27 Apr 2020, at 16:37, Peter Müller <peter.mueller@ipfire.org> wrote: >>> >>> Signed-off-by: Peter Müller <peter.mueller@ipfire.org> >>> --- >>> config/cfgroot/graphs.pl | 2 +- >>> html/cgi-bin/system.cgi | 2 +- >>> 2 files changed, 2 insertions(+), 2 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/html/cgi-bin/system.cgi b/html/cgi-bin/system.cgi >>> index 487ba996c..2c83f1e81 100644 >>> --- a/html/cgi-bin/system.cgi >>> +++ b/html/cgi-bin/system.cgi >>> @@ -66,7 +66,7 @@ if ( $querry[0] =~ "cpufreq"){ >>> &Header::closebox(); >>> } >>> >>> - &Header::openbox('100%', 'center', "Load $Lang::tr{'graph'}"); >>> + &Header::openbox('100%', 'center', "$Lang::tr{'uptime load average'} $Lang::tr{'graph'}"); >> >> You are concatenating two strings here. This might work in English, but not in other languages. >> >> So the correct way would be to have “uptime load average graph” as one string. > > I agree. Unfortunately, we did the same thing in other places so this probably requires some > clean up effort > 5 minutes. :-/ In the meantime, this can be merged or dropped. I would recommend to merge this patch, but only together with one that cleans up this and other split strings. We will otherwise forget about this very quickly. Best, -Michael > Thanks, and best regards, > Peter Müller > >> >> Best, >> -Michael >> >>> &Graphs::makegraphbox("system.cgi","load","day"); >>> &Header::closebox(); >>> >>> -- >>> 2.16.4
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/html/cgi-bin/system.cgi b/html/cgi-bin/system.cgi index 487ba996c..2c83f1e81 100644 --- a/html/cgi-bin/system.cgi +++ b/html/cgi-bin/system.cgi @@ -66,7 +66,7 @@ if ( $querry[0] =~ "cpufreq"){ &Header::closebox(); } - &Header::openbox('100%', 'center', "Load $Lang::tr{'graph'}"); + &Header::openbox('100%', 'center', "$Lang::tr{'uptime load average'} $Lang::tr{'graph'}"); &Graphs::makegraphbox("system.cgi","load","day"); &Header::closebox();