From patchwork Mon Sep 2 18:50:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Lepiller X-Patchwork-Id: 15271 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1869F17354; Mon, 2 Sep 2019 19:51:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id A6A7317348 for ; Mon, 2 Sep 2019 19:51:12 +0100 (BST) Received: from localhost ([::1]:39324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4rPz-0002Ct-27 for patchwork@mira.cbaines.net; Mon, 02 Sep 2019 14:51:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45073) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4rPs-0002Ck-FY for guix-patches@gnu.org; Mon, 02 Sep 2019 14:51:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4rPq-0006s3-RP for guix-patches@gnu.org; Mon, 02 Sep 2019 14:51:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50151) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4rPq-0006rs-NZ for guix-patches@gnu.org; Mon, 02 Sep 2019 14:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4rPq-0005nC-KX for guix-patches@gnu.org; Mon, 02 Sep 2019 14:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37285] [PATCH] doc: Rename translated manuals to drop the dot. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Sep 2019 18:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37285 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37285@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156745025722252 (code B ref -1); Mon, 02 Sep 2019 18:51:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Sep 2019 18:50:57 +0000 Received: from localhost ([127.0.0.1]:58971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4rPg-0005mk-9b for submit@debbugs.gnu.org; Mon, 02 Sep 2019 14:50:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:59642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4rPe-0005mc-3K for submit@debbugs.gnu.org; Mon, 02 Sep 2019 14:50:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45009) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4rPc-0002CT-3S for guix-patches@gnu.org; Mon, 02 Sep 2019 14:50:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4rPa-0006UV-Ef for guix-patches@gnu.org; Mon, 02 Sep 2019 14:50:47 -0400 Received: from lepiller.eu ([89.234.186.109]:44680) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i4rPX-0006R7-Lt for guix-patches@gnu.org; Mon, 02 Sep 2019 14:50:44 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 86dbab7c for ; Mon, 2 Sep 2019 18:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type; s=dkim; bh=Bl+ wS9lFzXXYJLHcedosfmbJ0P8=; b=TO5LT//40dhn6SqogDBO5InHYEFfXVVveMn t42iIVhzoivnqw+hIaseUK2bnnFewglX+kkmN8owVtZOCjGNQ78LGSvNU4GeuI0M 9VQCuzQ9Ek+QHVJrNOpJKCTfdsqnpX143KjhPLtWc30SVOQmJME70QaCMaZOg0Cc Y1g4rKx0K9ky2tl4N8PWK3pa7deAtsg0zJvD1ggUJud86iWrIgA+p+ybcpSfqftd ceo6dvI8f2Wq68vgUOStg3tHltI4C8uHYxspF7EWykzSFvgrAF1HmoQqVhnCIs8V 9Q8q29YcQ5sUbhhWLkp2xN/g0Y3qRWgGI0Yk1cyfwx1uqGz39Mg== DomainKey-Signature: a=rsa-sha1; c=nofws; d=lepiller.eu; h=date:from:to :subject:message-id:mime-version:content-type; q=dns; s=dkim; b= YEYQQSMcBVOPEflFa6iz0yvuLYgCqhYKz4XWaQZSTVJcN1te4AlUoK1sh1okn4VZ PPYOvNw7c4y+sWEkW5SX7z2Tsv+bGxJqflelDMiKjKKiCMp7R44jRBdkmDgpdEnd ut3LQqOFviWT3bJiMxJyYCcz6QV2Tf/5WkDMXoEp2e3jiIsjn53trVLKKdd66YYt NICm9MUF0k33H9Av7/i1E12yWKhvZZs9Gp6BXwMazcvA2T0gmOSyOXo1ePxAQ930 +MH+qABy/Sw33eQDJc17iquvrovlsV/gK+X9ljdhdpmpVO2wzofAQBGEIepPiOBX 5MYfanJ9CTUOgNroFYeUpw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id e77bd6ca (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Mon, 2 Sep 2019 18:50:38 +0000 (UTC) Date: Mon, 2 Sep 2019 20:50:34 +0200 From: Julien Lepiller Message-ID: <20190902205034.6b4d2ea2@sybil.lepiller.eu> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 :) From ac14ab493f6b8a9861be71183833a1b4fe7dbcb1 Mon Sep 17 00:00:00 2001 From: Julien Lepiller 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 . 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