From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] system.cgi: properly translate load average graph Date: Mon, 27 Apr 2020 21:57:25 +0100 Message-ID: <53DF50C1-F10A-4B80-83ED-1CBB6E18876B@ipfire.org> In-Reply-To: <951a1b0f-4bbf-1279-848d-05d7f03a908f@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6755923755893666669==" List-Id: --===============6755923755893666669== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, > On 27 Apr 2020, at 17:11, Peter M=C3=BCller wr= ote: >=20 > Hello Michael, >=20 >> Hi, >>=20 >>> On 27 Apr 2020, at 16:37, Peter M=C3=BCller = wrote: >>>=20 >>> Signed-off-by: Peter M=C3=BCller >>> --- >>> config/cfgroot/graphs.pl | 2 +- >>> html/cgi-bin/system.cgi | 2 +- >>> 2 files changed, 2 insertions(+), 2 deletions(-) >>>=20 >>> 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."-grap= h"}, >>> + "-t ".$Lang::tr{'uptime load average'}." ".$Lang::tr{'graph per'}." ".= $Lang::tr{$period."-graph"}, >>> "-v ".$Lang::tr{'processes'}, >>> "--color=3DSHADEA".$color{"color19"}, >>> "--color=3DSHADEB".$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] =3D~ "cpufreq"){ >>> &Header::closebox(); >>> } >>>=20 >>> - &Header::openbox('100%', 'center', "Load $Lang::tr{'graph'}"); >>> + &Header::openbox('100%', 'center', "$Lang::tr{'uptime load average'} $L= ang::tr{'graph'}"); >>=20 >> You are concatenating two strings here. This might work in English, but no= t in other languages. >>=20 >> So the correct way would be to have =E2=80=9Cuptime load average graph=E2= =80=9D as one string. >=20 > I agree. Unfortunately, we did the same thing in other places so this proba= bly requires some > clean up effort > 5 minutes. :-/ In the meantime, this can be merged or dro= pped. 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=C3=BCller >=20 >>=20 >> Best, >> -Michael >>=20 >>> &Graphs::makegraphbox("system.cgi","load","day"); >>> &Header::closebox(); >>>=20 >>> --=20 >>> 2.16.4 --===============6755923755893666669==--