From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: bug#35786: Some manual @ref @xref @pxref fail when untranslated Date: Sat, 18 May 2019 00:48:26 +0200 Message-ID: <20190517224826.4cy2aymsxaa5sehz@pelzflorian.localdomain> References: <87sgu8hmmr.fsf@gnu.org> <20190423155219.03d067f5@sybil.lepiller.eu> <87zhof3mod.fsf@riseup.net> <9D0C4E9F-D30E-426B-A079-C71F233F77F3@lepiller.eu> <878sv922gg.fsf@riseup.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="lzkudoawj7lecl6f" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:44164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRlfw-0005X3-2x for bug-guix@gnu.org; Fri, 17 May 2019 18:50:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRlfu-0003OK-HJ for bug-guix@gnu.org; Fri, 17 May 2019 18:50:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRlfu-0003NX-CS for bug-guix@gnu.org; Fri, 17 May 2019 18:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hRlfu-0001Gc-9U for bug-guix@gnu.org; Fri, 17 May 2019 18:50:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:43976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRlf8-0004se-Bh for bug-guix@gnu.org; Fri, 17 May 2019 18:49:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRlf6-0000IH-QC for bug-guix@gnu.org; Fri, 17 May 2019 18:49:14 -0400 Content-Disposition: inline In-Reply-To: <878sv922gg.fsf@riseup.net> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Meiyo Peng Cc: guix-devel@gnu.org, 35786@debbugs.gnu.org --lzkudoawj7lecl6f Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Meiyo Peng reports at On Tue, May 14, 2019 at 10:29:35AM +0800, Meiyo Peng wrote: > I just find out that the @pxref{Packages with Multiple Outputs} in > doc/contributing.texi has to be translated. Or I will get an error > while running make: >=20 > #+begin_example > doc/contributing.zh_CN.texi:567: @pxref reference to nonexistent node= `Packages with Multiple Outputs' > #+end_example >=20 > I guess it's because the node name is in doc/guix.texi (another file > than doc/contributing.texi). Any idea? >=20 The reason appears to be that when not translating (using the first attached patch that reverts back to @pxref{Packages with Multiple Outputs}), po4a-translate transforms @item Take a look at the profile reported by @command{guix size} (@pxref{Invoking guix size}). This will allow you to notice references to other packages unwillingly retained. It may also help determine whether to split the package (@pxref{Packages with Multiple Outputs}), and which optional dependencies should be used. In particular, avoid add= ing @code{texlive} as a dependency: because of its extreme size, use @code{texlive-tiny} or @code{texlive-union} instead. to @item =E7=9C=8B=E4=B8=80=E4=B8=8B@command{guix size}=EF=BC=88@pxref{Invoking gu= ix size}=EF=BC=89=E7=9A=84=E5=88=86=E6=9E=90=E6=8A=A5=E5=91=8A=E3=80=82=E8=BF= =99=E4=BC=9A=E8=AE=A9=E4=BD=A0=E6=B3=A8=E6=84=8F=E5=88=B0=E5=AF=B9=E5=85=B6= =E5=AE=83=E8=BD=AF=E4=BB=B6=E5=8C=85=E6=97=A0=E6=84=8F=E4=B8=AD=E7=9A=84=E5= =BC=95=E7=94=A8=E3=80=82=E5=AE=83=E4=B9=9F=E5=8F=AF=E4=BB=A5=E5=B8=AE=E5=8A= =A9=E5=86=B3=E5=AE=9A=E6=98=AF=E5=90=A6=E8=A6=81=E6=8A=8A=E4=B8=80=E4=B8=AA= =E8=BD=AF=E4=BB=B6=E5=8C=85=E5=88=86=E5=89=B2=E6=88=90=E5=87=A0=E4=B8=AA=E8= =BE=93=E5=87=BA=EF=BC=88@pxref{Packages with Multiple Outputs}=EF=BC=89=EF=BC=8C=E4=BB=A5=E5=8F=8A=E9=9C=80=E8=A6=81=E4=BD=BF=E7= =94=A8=E5=93=AA=E4=BA=9B=E5=8F=AF=E9=80=89=E7=9A=84=E4=BE=9D=E8=B5=96=E3=80= =82=E7=89=B9=E5=88=AB=E5=9C=B0=EF=BC=8C=E9=81=BF=E5=85=8D=E6=8A=8A@code{t= exlive}=E6=B7=BB=E5=8A=A0=E4=B8=BA=E4=BE=9D=E8=B5=96=EF=BC=9A=E5=9B=A0=E4= =B8=BA=E5=AE=83=E5=A4=AA=E5=A4=A7=E4=BA=86=EF=BC=8C=E8=AF=B7=E4=BD=BF=E7=94= =A8@code{texlive-tiny}=E6=88=96@code{texlive-union}=E4=BB=A3=E6=9B=BF=E5=AE= =83=E3=80=82 with the pxref split over three lines because the surrounding context has no space characters. doc/local.mk=E2=80=99s xref_command can only de= al with two lines however. The second attached patch makes xref_command grep three-line references too, so it finds the translation, *however* I cannot get this multiline sed to actually insert the translation into three line references. Perhaps it would be better to just replace this complex xref_command with Guile code? I will not do it however. I am Cc=E2=80=99ing the bug-guix@gnu.org; I hope this is OK. Regards, Florian --lzkudoawj7lecl6f Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-THIS-IS-A-TEST-Revert-to-not-translating-pxref-refer.patch" Content-Transfer-Encoding: quoted-printable >From 267cc4c506d03ad35bfeead0f45d77bc7d242181 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Sat, 18 May 2019 00:29:21 +0200 Subject: [PATCH 1/2] THIS IS A TEST: Revert to not translating pxref reference. --- po/doc/guix-manual.zh_CN.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/doc/guix-manual.zh_CN.po b/po/doc/guix-manual.zh_CN.po index c24900da31..d1351ef557 100644 --- a/po/doc/guix-manual.zh_CN.po +++ b/po/doc/guix-manual.zh_CN.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: guix-manual 1.0.1-pre1\n" "Report-Msgid-Bugs-To: ludo@gnu.org\n" "POT-Creation-Date: 2019-05-10 20:53+0200\n" -"PO-Revision-Date: 2019-05-14 14:31+0800\n" +"PO-Revision-Date: 2019-05-17 17:21+0200\n" "Last-Translator: Meiyo Peng \n" "Language-Team: Chinese (simplified) \n" "Language: zh_CN\n" @@ -1237,7 +1237,7 @@ msgstr "=E6=9C=89=E6=97=B6=EF=BC=8C=E8=BD=AF=E4=BB=B6= =E5=8C=85=E4=B8=BA=E4=BA=86=E6=96=B9=E4=BE=BF=E7=94=A8=E6=88=B7=EF=BC=8C=E6= =8D=86=E7=BB=91=E4=BA=86=E4=BE=9D=E8=B5=96=E5=BA=93=E7=9A=84=E6=BA=90=E4=BB= =A3=E7=A0=81=E3=80=82 #. type: enumerate #: doc/contributing.texi:868 msgid "Take a look at the profile reported by @command{guix size} (@pxre= f{Invoking guix size}). This will allow you to notice references to othe= r packages unwillingly retained. It may also help determine whether to s= plit the package (@pxref{Packages with Multiple Outputs}), and which opti= onal dependencies should be used. In particular, avoid adding @code{texl= ive} as a dependency: because of its extreme size, use @code{texlive-tiny= } or @code{texlive-union} instead." -msgstr "=E7=9C=8B=E4=B8=80=E4=B8=8B@command{guix size}=EF=BC=88@pxref{In= voking guix size}=EF=BC=89=E7=9A=84=E5=88=86=E6=9E=90=E6=8A=A5=E5=91=8A=E3= =80=82=E8=BF=99=E4=BC=9A=E8=AE=A9=E4=BD=A0=E6=B3=A8=E6=84=8F=E5=88=B0=E5=AF= =B9=E5=85=B6=E5=AE=83=E8=BD=AF=E4=BB=B6=E5=8C=85=E6=97=A0=E6=84=8F=E4=B8=AD= =E7=9A=84=E5=BC=95=E7=94=A8=E3=80=82=E5=AE=83=E4=B9=9F=E5=8F=AF=E4=BB=A5=E5= =B8=AE=E5=8A=A9=E5=86=B3=E5=AE=9A=E6=98=AF=E5=90=A6=E8=A6=81=E6=8A=8A=E4=B8= =80=E4=B8=AA=E8=BD=AF=E4=BB=B6=E5=8C=85=E5=88=86=E5=89=B2=E6=88=90=E5=87=A0= =E4=B8=AA=E8=BE=93=E5=87=BA=EF=BC=88@pxref{=E6=9C=89=E5=A4=9A=E4=B8=AA=E8= =BE=93=E5=87=BA=E7=9A=84=E8=BD=AF=E4=BB=B6=E5=8C=85}=EF=BC=89=EF=BC=8C=E4= =BB=A5=E5=8F=8A=E9=9C=80=E8=A6=81=E4=BD=BF=E7=94=A8=E5=93=AA=E4=BA=9B=E5=8F= =AF=E9=80=89=E7=9A=84=E4=BE=9D=E8=B5=96=E3=80=82=E7=89=B9=E5=88=AB=E5=9C=B0= =EF=BC=8C=E9=81=BF=E5=85=8D=E6=8A=8A@code{texlive}=E6=B7=BB=E5=8A=A0=E4=B8= =BA=E4=BE=9D=E8=B5=96=EF=BC=9A=E5=9B=A0=E4=B8=BA=E5=AE=83=E5=A4=AA=E5=A4=A7= =E4=BA=86=EF=BC=8C=E8=AF=B7=E4=BD=BF=E7=94=A8@code{texlive-tiny}=E6=88=96= @code{texlive-union}=E4=BB=A3=E6=9B=BF=E5=AE=83=E3=80=82" +msgstr "=E7=9C=8B=E4=B8=80=E4=B8=8B@command{guix size}=EF=BC=88@pxref{In= voking guix size}=EF=BC=89=E7=9A=84=E5=88=86=E6=9E=90=E6=8A=A5=E5=91=8A=E3= =80=82=E8=BF=99=E4=BC=9A=E8=AE=A9=E4=BD=A0=E6=B3=A8=E6=84=8F=E5=88=B0=E5=AF= =B9=E5=85=B6=E5=AE=83=E8=BD=AF=E4=BB=B6=E5=8C=85=E6=97=A0=E6=84=8F=E4=B8=AD= =E7=9A=84=E5=BC=95=E7=94=A8=E3=80=82=E5=AE=83=E4=B9=9F=E5=8F=AF=E4=BB=A5=E5= =B8=AE=E5=8A=A9=E5=86=B3=E5=AE=9A=E6=98=AF=E5=90=A6=E8=A6=81=E6=8A=8A=E4=B8= =80=E4=B8=AA=E8=BD=AF=E4=BB=B6=E5=8C=85=E5=88=86=E5=89=B2=E6=88=90=E5=87=A0= =E4=B8=AA=E8=BE=93=E5=87=BA=EF=BC=88@pxref{Packages with Multiple Outputs= }=EF=BC=89=EF=BC=8C=E4=BB=A5=E5=8F=8A=E9=9C=80=E8=A6=81=E4=BD=BF=E7=94=A8= =E5=93=AA=E4=BA=9B=E5=8F=AF=E9=80=89=E7=9A=84=E4=BE=9D=E8=B5=96=E3=80=82=E7= =89=B9=E5=88=AB=E5=9C=B0=EF=BC=8C=E9=81=BF=E5=85=8D=E6=8A=8A@code{texlive= }=E6=B7=BB=E5=8A=A0=E4=B8=BA=E4=BE=9D=E8=B5=96=EF=BC=9A=E5=9B=A0=E4=B8=BA= =E5=AE=83=E5=A4=AA=E5=A4=A7=E4=BA=86=EF=BC=8C=E8=AF=B7=E4=BD=BF=E7=94=A8@= code{texlive-tiny}=E6=88=96@code{texlive-union}=E4=BB=A3=E6=9B=BF=E5=AE=83= =E3=80=82" =20 #. type: enumerate #: doc/contributing.texi:873 --=20 2.21.0 --lzkudoawj7lecl6f Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0002-doc-Insufficient-attempt-to-fix-translation-of-three.patch" >From f9c3aae82c940238e6162e16cef0431ce782f5f3 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Sat, 18 May 2019 00:31:06 +0200 Subject: [PATCH 2/2] doc: Insufficient attempt to fix translation of three-line references. * doc/local.mk (xref_command): Catch three-line translations as well, but the multiline sed still covers only two lines. --- doc/local.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/local.mk b/doc/local.mk index 336e961c4f..645e571817 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -88,7 +88,7 @@ PO4A_PARAMS += -f texinfo # texinfo format # reference name, even in untranslated strings. # The last sed is a multiline sed because some references span multiple lines. define xref_command -cat "$@.tmp" | egrep '@p?x?ref' -A1 | sed 'N;s|--\n||g;P;D' | sed 's|^| |g' | \ +cat "$@.tmp" | egrep '@p?x?ref' -A2 | sed 'N;s|--\n||g;P;D' | sed 's|^| |g' | \ tr -d '\012' | sed 's|\(@p\?x\?ref\)|\n\1|g' | egrep '@p?x?ref' | \ sed 's|^.*@p\?x\?ref{\([^,}]*\).*$$|\1|g' | sort | uniq | while read e; do \ line=$$(grep -n "^msgid \"$$e\"" "$<" | cut -f1 --delimiter=":") ;\ -- 2.21.0 --lzkudoawj7lecl6f--