From: Julien Lepiller <julien@lepiller.eu>
To: 37285@debbugs.gnu.org
Subject: [bug#37285] [PATCH] doc: Rename translated manuals to drop the dot.
Date: Mon, 2 Sep 2019 20:50:34 +0200 [thread overview]
Message-ID: <20190902205034.6b4d2ea2@sybil.lepiller.eu> (raw)
[-- Attachment #1: Type: text/plain, Size: 536 bytes --]
Hi, the attached patch changes the translated manual name, from e.g.
guix.fr to guix-fr. The reason is that some info readers and generators
drop everything after the first dot to get the name of the manual. This
leads some readers to thing that "info guix" should open "guix.es.info"
instead of "guix.info", and the inter-lingua links on the website
version of the manual to be wrong.
I think I replaced every instance of the filename in this patch, but I
might have forgotten some, so if you see anything I missed, please tell
me :)
[-- Attachment #2: 0001-doc-Rename-translated-manuals-to-drop-the-dot.patch --]
[-- Type: text/x-patch, Size: 6013 bytes --]
From ac14ab493f6b8a9861be71183833a1b4fe7dbcb1 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 2 Sep 2019 19:45:05 +0200
Subject: [PATCH] doc: Rename translated manuals to drop the dot.
Some info readers and the html generator assume the name of the manual
is only what's before the first dot, which leads to errors, such as
wrong inter-lingua links and opening a translated manual with "info
guix".
---
.gitignore | 32 ++++++++++++++++----------------
bootstrap | 6 +++---
doc/build.scm | 4 ++--
doc/local.mk | 22 +++++++++++-----------
guix/self.scm | 4 ++--
5 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/.gitignore b/.gitignore
index 93d2ec9801..44a0febd60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,22 +29,22 @@
/doc/*.1
/doc/.dirstamp
/doc/contributing.*.texi
-/doc/guix.*.aux
-/doc/guix.*.cp
-/doc/guix.*.cps
-/doc/guix.*.fn
-/doc/guix.*.fns
-/doc/guix.*.html
-/doc/guix.*.info
-/doc/guix.*.info-[0-9]
-/doc/guix.*.ky
-/doc/guix.*.pg
-/doc/guix.*.toc
-/doc/guix.*.t2p
-/doc/guix.*.tp
-/doc/guix.*.vr
-/doc/guix.*.vrs
-/doc/guix.*.texi
+/doc/guix-*.aux
+/doc/guix-*.cp
+/doc/guix-*.cps
+/doc/guix-*.fn
+/doc/guix-*.fns
+/doc/guix-*.html
+/doc/guix-*.info
+/doc/guix-*.info-[0-9]
+/doc/guix-*.ky
+/doc/guix-*.pg
+/doc/guix-*.toc
+/doc/guix-*.t2p
+/doc/guix-*.tp
+/doc/guix-*.vr
+/doc/guix-*.vrs
+/doc/guix-*.texi
/doc/guix.aux
/doc/guix.cp
/doc/guix.cps
diff --git a/bootstrap b/bootstrap
index c0b5af7677..6471c96bcc 100755
--- a/bootstrap
+++ b/bootstrap
@@ -8,9 +8,9 @@ langs=`find po/doc -type f -name '*.po' \
| sed -e 's,guix-manual\.,,' \
| xargs -n 1 -I{} basename {} .po`
for lang in ${langs}; do
- if [ ! -e "doc/guix.${lang}.texi" ]; then
- echo "@setfilename guix.${lang}.info" > "doc/guix.${lang}.texi"
- echo "@include version-${lang}.texi" >> "doc/guix.${lang}.texi"
+ if [ ! -e "doc/guix-${lang}.texi" ]; then
+ echo "@setfilename guix-${lang}.info" > "doc/guix-${lang}.texi"
+ echo "@include version-${lang}.texi" >> "doc/guix-${lang}.texi"
# Ensure .po file is newer.
touch "po/doc/guix-manual.${lang}.po"
fi
diff --git a/doc/build.scm b/doc/build.scm
index 7ba9f57bc9..af284805eb 100644
--- a/doc/build.scm
+++ b/doc/build.scm
@@ -210,7 +210,7 @@ makeinfo OPTIONS."
(string-append #$manual-source "/"
#$manual ".texi")
(string-append #$manual-source "/"
- #$manual "." language ".texi")))))
+ #$manual "-" language ".texi")))))
(format #t "building HTML manual for language '~a'...~%"
language)
(mkdir-p (string-append #$output "/"
@@ -313,7 +313,7 @@ makeinfo OPTIONS."
(string-append #$manual-source "/"
#$manual ".texi")
(string-append #$manual-source "/"
- #$manual "." language ".texi")))))
+ #$manual "-" language ".texi")))))
(format #t "building PDF manual for language '~a'...~%"
language)
(mkdir-p (string-append #$output "/"
diff --git a/doc/local.mk b/doc/local.mk
index 336e961c4f..e4db71e8c7 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -22,11 +22,11 @@
# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
info_TEXINFOS = %D%/guix.texi \
- %D%/guix.de.texi \
- %D%/guix.es.texi \
- %D%/guix.fr.texi \
- %D%/guix.ru.texi \
- %D%/guix.zh_CN.texi
+ %D%/guix-de.texi \
+ %D%/guix-es.texi \
+ %D%/guix-fr.texi \
+ %D%/guix-ru.texi \
+ %D%/guix-zh_CN.texi
%C%_guix_TEXINFOS = \
%D%/contributing.texi \
@@ -58,11 +58,11 @@ OS_CONFIG_EXAMPLES_TEXI = \
%D%/os-config-lightweight-desktop.texi
TRANSLATED_INFO = \
- %D%/guix.de.texi \
- %D%/guix.es.texi \
- %D%/guix.fr.texi \
- %D%/guix.ru.texi \
- %D%/guix.zh_CN.texi \
+ %D%/guix-de.texi \
+ %D%/guix-es.texi \
+ %D%/guix-fr.texi \
+ %D%/guix-ru.texi \
+ %D%/guix-zh_CN.texi \
%D%/contributing.de.texi \
%D%/contributing.es.texi \
%D%/contributing.fr.texi \
@@ -102,7 +102,7 @@ cat "$@.tmp" | egrep '@p?x?ref' -A1 | sed 'N;s|--\n||g;P;D' | sed 's|^| |g' | \
done
endef
-$(srcdir)/%D%/guix.%.texi: po/doc/guix-manual.%.po $(srcdir)/%D%/contributing.%.texi
+$(srcdir)/%D%/guix-%.texi: po/doc/guix-manual.%.po $(srcdir)/%D%/contributing.%.texi
-$(AM_V_PO4A)$(PO4A_TRANSLATE) $(PO4A_PARAMS) -m "%D%/guix.texi" -p "$<" -l "$@.tmp"
-sed -i "s|guix\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp"
-$(AM_V_POXREF)$(xref_command)
diff --git a/guix/self.scm b/guix/self.scm
index f03fe01d0c..3370de0e18 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -341,10 +341,10 @@ TRANSLATIONS, an alist of msgid and msgstr."
"Translate the manual for one language LANG using the PO file."
(let ((translations (call-with-input-file po read-po-file)))
(translate-tmp-texi po "guix.texi"
- (string-append "guix." lang ".texi.tmp"))
+ (string-append "guix-" lang ".texi.tmp"))
(translate-tmp-texi po "contributing.texi"
(string-append "contributing." lang ".texi.tmp"))
- (let* ((texi-name (string-append "guix." lang ".texi"))
+ (let* ((texi-name (string-append "guix-" lang ".texi"))
(tmp-name (string-append texi-name ".tmp")))
(with-output-to-file texi-name
(lambda _
--
2.22.0
next reply other threads:[~2019-09-02 18:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-02 18:50 Julien Lepiller [this message]
2019-09-05 20:52 ` [bug#37285] [PATCH] doc: Rename translated manuals to drop the dot Ludovic Courtès
2019-09-26 21:11 ` Ludovic Courtès
2019-09-28 14:35 ` bug#37285: " Julien Lepiller
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190902205034.6b4d2ea2@sybil.lepiller.eu \
--to=julien@lepiller.eu \
--cc=37285@debbugs.gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.