unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#35786: Some manual @ref @xref @pxref fail when untranslated
       [not found]       ` <878sv922gg.fsf@riseup.net>
@ 2019-05-17 22:48         ` pelzflorian (Florian Pelz)
  2019-05-18  7:40           ` Julien Lepiller
                             ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pelzflorian (Florian Pelz) @ 2019-05-17 22:48 UTC (permalink / raw)
  To: Meiyo Peng; +Cc: guix-devel, 35786

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

Meiyo Peng reports at <https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00275.html>

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:
> 
> #+begin_example
>   doc/contributing.zh_CN.texi:567: @pxref reference to nonexistent node `Packages with Multiple Outputs'
> #+end_example
> 
> I guess it's because the node name is in doc/guix.texi (another file
> than doc/contributing.texi).  Any idea?
> 

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 adding
@code{texlive} as a dependency: because of its extreme size, use
@code{texlive-tiny} or @code{texlive-union} instead.

to

@item
看一下@command{guix size}(@pxref{Invoking guix
size})的分析报告。这会让你注意到对其它软件包无意中的引用。它也可以帮助决定是否要把一个软件包分割成几个输出(@pxref{Packages
with Multiple
Outputs}),以及需要使用哪些可选的依赖。特别地,避免把@code{texlive}添加为依赖:因为它太大了,请使用@code{texlive-tiny}或@code{texlive-union}代替它。

with the pxref split over three lines because the surrounding context
has no space characters.  doc/local.mk’s xref_command can only deal
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’ing the bug-guix@gnu.org; I hope this is OK.

Regards,
Florian

[-- Attachment #2: 0001-THIS-IS-A-TEST-Revert-to-not-translating-pxref-refer.patch --]
[-- Type: text/plain, Size: 2514 bytes --]

From 267cc4c506d03ad35bfeead0f45d77bc7d242181 Mon Sep 17 00:00:00 2001
From: Florian Pelz <pelzflorian@pelzflorian.de>
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 <meiyo@riseup.net>\n"
 "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
 "Language: zh_CN\n"
@@ -1237,7 +1237,7 @@ msgstr "有时,软件包为了方便用户,捆绑了依赖库的源代码。
 #. type: enumerate
 #: doc/contributing.texi:868
 msgid "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 adding @code{texlive} as a dependency: because of its extreme size, use @code{texlive-tiny} or @code{texlive-union} instead."
-msgstr "看一下@command{guix size}(@pxref{Invoking guix size})的分析报告。这会让你注意到对其它软件包无意中的引用。它也可以帮助决定是否要把一个软件包分割成几个输出(@pxref{有多个输出的软件包}),以及需要使用哪些可选的依赖。特别地,避免把@code{texlive}添加为依赖:因为它太大了,请使用@code{texlive-tiny}或@code{texlive-union}代替它。"
+msgstr "看一下@command{guix size}(@pxref{Invoking guix size})的分析报告。这会让你注意到对其它软件包无意中的引用。它也可以帮助决定是否要把一个软件包分割成几个输出(@pxref{Packages with Multiple Outputs}),以及需要使用哪些可选的依赖。特别地,避免把@code{texlive}添加为依赖:因为它太大了,请使用@code{texlive-tiny}或@code{texlive-union}代替它。"
 
 #. type: enumerate
 #: doc/contributing.texi:873
-- 
2.21.0


[-- Attachment #3: 0002-doc-Insufficient-attempt-to-fix-translation-of-three.patch --]
[-- Type: text/plain, Size: 1179 bytes --]

From f9c3aae82c940238e6162e16cef0431ce782f5f3 Mon Sep 17 00:00:00 2001
From: Florian Pelz <pelzflorian@pelzflorian.de>
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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Some manual @ref @xref @pxref fail when untranslated
  2019-05-17 22:48         ` bug#35786: Some manual @ref @xref @pxref fail when untranslated pelzflorian (Florian Pelz)
@ 2019-05-18  7:40           ` Julien Lepiller
  2019-05-23  4:05           ` bug#35786: " Meiyo Peng
  2022-06-11 11:24           ` bug#35786: " pelzflorian (Florian Pelz)
  2 siblings, 0 replies; 4+ messages in thread
From: Julien Lepiller @ 2019-05-18  7:40 UTC (permalink / raw)
  To: pelzflorian (Florian Pelz), Meiyo Peng; +Cc: Guix-devel, bug-guix

Le 18 mai 2019 00:48:26 GMT+02:00, "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> a écrit :
>Meiyo Peng reports at
><https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00275.html>
>
>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:
>> 
>> #+begin_example
>>   doc/contributing.zh_CN.texi:567: @pxref reference to nonexistent
>node `Packages with Multiple Outputs'
>> #+end_example
>> 
>> I guess it's because the node name is in doc/guix.texi (another file
>> than doc/contributing.texi).  Any idea?
>> 
>
>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
>adding
>@code{texlive} as a dependency: because of its extreme size, use
>@code{texlive-tiny} or @code{texlive-union} instead.
>
>to
>
>@item
>看一下@command{guix size}(@pxref{Invoking guix
>size})的分析报告。这会让你注意到对其它软件包无意中的引用。它也可以帮助决定是否要把一个软件包分割成几个输出(@pxref{Packages
>with Multiple
>Outputs}),以及需要使用哪些可选的依赖。特别地,避免把@code{texlive}添加为依赖:因为它太大了,请使用@code{texlive-tiny}或@code{texlive-union}代替它。
>
>with the pxref split over three lines because the surrounding context
>has no space characters.  doc/local.mk’s xref_command can only deal
>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’ing the bug-guix@gnu.org; I hope this is OK.
>
>Regards,
>Florian

We have some guile code for doing exactly that in guix pull, so we could reuse it here.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#35786: Some manual @ref @xref @pxref fail when untranslated
  2019-05-17 22:48         ` bug#35786: Some manual @ref @xref @pxref fail when untranslated pelzflorian (Florian Pelz)
  2019-05-18  7:40           ` Julien Lepiller
@ 2019-05-23  4:05           ` Meiyo Peng
  2022-06-11 11:24           ` bug#35786: " pelzflorian (Florian Pelz)
  2 siblings, 0 replies; 4+ messages in thread
From: Meiyo Peng @ 2019-05-23  4:05 UTC (permalink / raw)
  To: pelzflorian (Florian Pelz); +Cc: guix-devel, 35786

Hi Florian,

pelzflorian (Florian Pelz) writes:

> Meiyo Peng reports at <https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00275.html>
>
> 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:
>>
>> #+begin_example
>>   doc/contributing.zh_CN.texi:567: @pxref reference to nonexistent node `Packages with Multiple Outputs'
>> #+end_example
>>
>> I guess it's because the node name is in doc/guix.texi (another file
>> than doc/contributing.texi).  Any idea?
>>
>
> 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 adding
> @code{texlive} as a dependency: because of its extreme size, use
> @code{texlive-tiny} or @code{texlive-union} instead.
>
> to
>
> @item
> 看一下@command{guix size}(@pxref{Invoking guix
> size})的分析报告。这会让你注意到对其它软件包无意中的引用。它也可以帮助决定是否要把一个软件包分割成几个输出(@pxref{Packages
> with Multiple
> Outputs}),以及需要使用哪些可选的依赖。特别地,避免把@code{texlive}添加为依赖:因为它太大了,请使用@code{texlive-tiny}或@code{texlive-union}代替它。
>
> with the pxref split over three lines because the surrounding context
> has no space characters.  doc/local.mk’s xref_command can only deal
> with two lines however.

There is no space separator for Chinese words.  Typesetting of CJK
languages is always a headache for FLOSS developers.

> 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.

Thank you for the work.  I have found only one such case in the Guix
manual, so that's fine.  I can manually translate this @pxref.


--
Meiyo Peng
https://www.pengmeiyu.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#35786: Re: Some manual @ref @xref @pxref fail when untranslated
  2019-05-17 22:48         ` bug#35786: Some manual @ref @xref @pxref fail when untranslated pelzflorian (Florian Pelz)
  2019-05-18  7:40           ` Julien Lepiller
  2019-05-23  4:05           ` bug#35786: " Meiyo Peng
@ 2022-06-11 11:24           ` pelzflorian (Florian Pelz)
  2 siblings, 0 replies; 4+ messages in thread
From: pelzflorian (Florian Pelz) @ 2022-06-11 11:24 UTC (permalink / raw)
  To: 35786-done

On Sat, May 18, 2019 at 12:48:26AM +0200, pelzflorian (Florian Pelz) wrote:
> […]po4a-translate transforms […]to[…]
> (@pxref{Packages
> with Multiple
> Outputs}),

Julien fixed it with 0623138ffa5b066afc25547ffdeb97753cb0ee9a

Closing.

Regards,
Florian




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-11 11:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87sgu8hmmr.fsf@gnu.org>
     [not found] ` <20190423155219.03d067f5@sybil.lepiller.eu>
     [not found]   ` <87zhof3mod.fsf@riseup.net>
     [not found]     ` <9D0C4E9F-D30E-426B-A079-C71F233F77F3@lepiller.eu>
     [not found]       ` <878sv922gg.fsf@riseup.net>
2019-05-17 22:48         ` bug#35786: Some manual @ref @xref @pxref fail when untranslated pelzflorian (Florian Pelz)
2019-05-18  7:40           ` Julien Lepiller
2019-05-23  4:05           ` bug#35786: " Meiyo Peng
2022-06-11 11:24           ` bug#35786: " pelzflorian (Florian Pelz)

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).