From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: Meiyo Peng <meiyo@riseup.net>
Cc: guix-devel@gnu.org, 35786@debbugs.gnu.org
Subject: bug#35786: Some manual @ref @xref @pxref fail when untranslated
Date: Sat, 18 May 2019 00:48:26 +0200 [thread overview]
Message-ID: <20190517224826.4cy2aymsxaa5sehz@pelzflorian.localdomain> (raw)
In-Reply-To: <878sv922gg.fsf@riseup.net>
[-- 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
next parent reply other threads:[~2019-05-17 22:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 ` pelzflorian (Florian Pelz) [this message]
2019-05-18 7:40 ` Some manual @ref @xref @pxref fail when untranslated Julien Lepiller
2019-05-23 4:05 ` bug#35786: " Meiyo Peng
2022-06-11 11:24 ` bug#35786: " pelzflorian (Florian Pelz)
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190517224826.4cy2aymsxaa5sehz@pelzflorian.localdomain \
--to=pelzflorian@pelzflorian.de \
--cc=35786@debbugs.gnu.org \
--cc=guix-devel@gnu.org \
--cc=meiyo@riseup.net \
/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.
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).