From unknown Thu Jun 19 14:04:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#46114 <46114@debbugs.gnu.org> To: bug#46114 <46114@debbugs.gnu.org> Subject: Status: [PATCH] website: Localize package list. Reply-To: bug#46114 <46114@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:04:43 +0000 retitle 46114 [PATCH] website: Localize package list. reassign 46114 guix-patches submitter 46114 Julien Lepiller severity 46114 normal tag 46114 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 11:56:42 2021 Received: (at submit) by debbugs.gnu.org; 26 Jan 2021 16:56:42 +0000 Received: from localhost ([127.0.0.1]:42538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Rdu-0003Ed-75 for submit@debbugs.gnu.org; Tue, 26 Jan 2021 11:56:42 -0500 Received: from lists.gnu.org ([209.51.188.17]:59784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Rds-0003ET-9l for submit@debbugs.gnu.org; Tue, 26 Jan 2021 11:56:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4Rds-0003Ap-00 for guix-patches@gnu.org; Tue, 26 Jan 2021 11:56:36 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:58046) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4Rdo-00026O-HQ for guix-patches@gnu.org; Tue, 26 Jan 2021 11:56:35 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 4c3e6314 for ; Tue, 26 Jan 2021 16:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type; s=dkim; bh=wZ+ 5g8KXZ1krq2TopAaSocQGEHTKvsKQ/r3UHu0gouo=; b=FsrTvj0ds9KTxtTRWF8 bJhOUMP+MzY1GofWgzBFUYRFiCib4K6vRuhYwUSGw2w9TVWOZ5k/FazMPY9hw8Bk L5bCK5Pjeh+9EYiAxzyfPSMlbOD773XKKDFoGZOe2fZZbd4t3zJtOyNHK98ZhTB/ G24BBH9H2yu3PSeNKSMLC+ARgAMbXMte7DS31eMMID/3xANOnS820xwHnl3ROBSs SitNjh8nrwd9EnmommnZHM/YIgYFjcaTg5GwMD6vXbrlcW3K+bUR2ukwWOAnaGyZ 1SmQjHKM+p6qLUj2izZZ9vb0rjyjF1ML8lI8P/KrmD2r4TzEiCTcayTepuTcVyGP o+Q== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 1c7f0b49 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Tue, 26 Jan 2021 16:56:25 +0000 (UTC) Date: Tue, 26 Jan 2021 17:56:18 +0100 From: Julien Lepiller To: guix-patches@gnu.org Subject: [PATCH] website: Localize package list. Message-ID: <20210126175618.252a04e8@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/M3fnH/6FAISSgaB+Bb=TOe4" Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --MP_/M3fnH/6FAISSgaB+Bb=TOe4 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Guix! This patch lets us localize package synopsis and description in package lists. This is not super useful, because our guix-packages domain is almost untranslated, for every language, but I think it's better than nothing. Locally, you can simply copy an existing guix-packages.mo (on the Guix System, /run/current-system/profile/share/locale/de/LC_MESSAGES/guix-packages.mo for the German translation) to the local locale directory (de/LC_MESSAGES/guix-packages.mo), in the same way we do for the guix-website domain. I also modified .guix.scm so the website can be generated with localized packages. I used the latest guix package from the current guix, because latest-guix (defined in .guix.scm) does not have any locale information in it (mo or po). Any idea to get the latest translations instead? --MP_/M3fnH/6FAISSgaB+Bb=TOe4 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-website-Update-announce-online-Guix-days.patch >From 87a0bb44fb28ff3a7e2237b2b559c1edbcbc6913 Mon Sep 17 00:00:00 2001 From: zimoun Date: Tue, 3 Nov 2020 10:05:50 +0100 Subject: [PATCH] website: Update announce online Guix days. * website/posts/online-guix-day-announce-1.md: Fix email, update the deadline. --- website/posts/online-guix-day-announce-1.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/posts/online-guix-day-announce-1.md b/website/posts/online-guix-day-announce-1.md index 686c01b..b4ca308 100644 --- a/website/posts/online-guix-day-announce-1.md +++ b/website/posts/online-guix-day-announce-1.md @@ -11,7 +11,7 @@ and will be held entirely online. Want to speak? Submit your proposal! Important dates: -1. **November 6th**: Deadline for talks proposal. +1. **November 10th**: Deadline for talks proposal. 1. **November 14th**: Deadline for releasing your pre-recorded talks. 1. **November 16th**: Release of the schedule. 1. **November 22nd**: Conference day! @@ -27,9 +27,9 @@ The agenda of the day is: *There will be no presentation on the 22nd!* And **no registration fee**. -##### Until November 6th: talks proposal +##### Until November 10th: talks proposal -Propose your talks by sending them to `guix-devel@gnu.org`. Feel free to drop +Propose your talks by sending them to `guix-days@gnu.org`. Feel free to drop in `#guix` on irc.freenode.net to discuss what you would like to talk about before submitting. :) -- 2.28.0 --MP_/M3fnH/6FAISSgaB+Bb=TOe4-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 16:29:44 2021 Received: (at 46114) by debbugs.gnu.org; 26 Jan 2021 21:29:44 +0000 Received: from localhost ([127.0.0.1]:42807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4VuC-0005cW-6j for submit@debbugs.gnu.org; Tue, 26 Jan 2021 16:29:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4VuA-0005cE-DO for 46114@debbugs.gnu.org; Tue, 26 Jan 2021 16:29:42 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33075) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4Vu3-0001Sp-SW; Tue, 26 Jan 2021 16:29:35 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43242 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4Vu3-000887-9t; Tue, 26 Jan 2021 16:29:35 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Julien Lepiller Subject: Re: bug#46114: [PATCH] website: Localize package list. References: <20210126175618.252a04e8@tachikoma.lepiller.eu> Date: Tue, 26 Jan 2021 22:29:33 +0100 In-Reply-To: <20210126175618.252a04e8@tachikoma.lepiller.eu> (Julien Lepiller's message of "Tue, 26 Jan 2021 17:56:18 +0100") Message-ID: <87bldbxu82.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46114 Cc: 46114@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Julien Lepiller skribis: > This patch lets us localize package synopsis and description in package > lists. This is not super useful, because our guix-packages domain is > almost untranslated, for every language, but I think it's better than > nothing. Yes, good idea. > Locally, you can simply copy an existing guix-packages.mo (on the Guix > System, > /run/current-system/profile/share/locale/de/LC_MESSAGES/guix-packages.mo > for the German translation) to the local locale directory > (de/LC_MESSAGES/guix-packages.mo), in the same way we do for the > guix-website domain. > > I also modified .guix.scm so the website can be generated with > localized packages. I used the latest guix package from the current > guix, because latest-guix (defined in .guix.scm) does not have any > locale information in it (mo or po). Any idea to get the latest > translations instead? =E2=80=98latest-guix=E2=80=99 is the same as what you get with =E2=80=98gui= x pull=E2=80=99, so it knows where to find its .gmo files=E2=80=94see this bit in (guix self): (bindtextdomain "guix" #$(locale-data source "guix")) (bindtextdomain "guix-packages" #$(locale-data source "guix-packages" "packages")) Now, you sent the wrong patch. :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 16:43:23 2021 Received: (at 46114) by debbugs.gnu.org; 26 Jan 2021 21:43:23 +0000 Received: from localhost ([127.0.0.1]:42828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4W7O-0005xf-LX for submit@debbugs.gnu.org; Tue, 26 Jan 2021 16:43:23 -0500 Received: from lepiller.eu ([89.234.186.109]:55564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4W7K-0005xS-Kl for 46114@debbugs.gnu.org; Tue, 26 Jan 2021 16:43:20 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 33be4afd; Tue, 26 Jan 2021 21:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type; s=dkim; bh=1YBXORgVCjHf9I5QrCKmuTNT9iggydmk4gbGTg +xUNM=; b=kXi7iaGa1iVafY/4IAY8HNwWnlKpjMDcfKkQYRukew8uAbHT/Uox7Z QBgAHE//3dn6pEAfJwoOuDB4UseKxNHQWUi8kemkGlIiwygiKIyEzpjSsCmsFGPI DPel3A9OB9FgaF4MQX2WRQ1mUx/k7qeq2Cw8puZ6uK7uEfdoeLE99ANC2hJAh7FS rh+2tb9EUBEGOgZ+Iy0/yv25xBP4puaV73Qa4DcWE7AWTeQBjeVQt3MIjrVwt/m7 2CrP2wxF2Ei0Win9bm+GA3YhAYF5zCMd8zfhWa/S0pYA/SneTCNiB8L21vZolNii m11AYjh5MAkrb9blVdHQOUrrbD8VBN2A== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id a457e3af (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 26 Jan 2021 21:43:16 +0000 (UTC) Date: Tue, 26 Jan 2021 22:43:06 +0100 From: Julien Lepiller To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Subject: Re: bug#46114: [PATCH] website: Localize package list. Message-ID: <20210126224306.08ebfa99@tachikoma.lepiller.eu> In-Reply-To: <87bldbxu82.fsf@gnu.org> References: <20210126175618.252a04e8@tachikoma.lepiller.eu> <87bldbxu82.fsf@gnu.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/17o.9z_JtMFTzOVcE1Z7d=1" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46114 Cc: 46114@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --MP_/17o.9z_JtMFTzOVcE1Z7d=1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Le Tue, 26 Jan 2021 22:29:33 +0100, Ludovic Court=C3=A8s a =C3=A9crit : > Hi, >=20 > Julien Lepiller skribis: >=20 > > This patch lets us localize package synopsis and description in > > package lists. This is not super useful, because our guix-packages > > domain is almost untranslated, for every language, but I think it's > > better than nothing. =20 >=20 > Yes, good idea. >=20 > > Locally, you can simply copy an existing guix-packages.mo (on the > > Guix System, > > /run/current-system/profile/share/locale/de/LC_MESSAGES/guix-packages.mo > > for the German translation) to the local locale directory > > (de/LC_MESSAGES/guix-packages.mo), in the same way we do for the > > guix-website domain. > > > > I also modified .guix.scm so the website can be generated with > > localized packages. I used the latest guix package from the current > > guix, because latest-guix (defined in .guix.scm) does not have any > > locale information in it (mo or po). Any idea to get the latest > > translations instead? =20 >=20 > =E2=80=98latest-guix=E2=80=99 is the same as what you get with =E2=80=98g= uix pull=E2=80=99, so it > knows where to find its .gmo files=E2=80=94see this bit in (guix self): >=20 > (bindtextdomain "guix" > #$(locale-data source "guix")) > (bindtextdomain "guix-packages" > #$(locale-data source > "guix-packages" > "packages")) yeah, but that's not very helpful. I don't understand how to get them from guix-latest? >=20 > Now, you sent the wrong patch. :-) haha, indeed ^^' >=20 > Ludo=E2=80=99. --MP_/17o.9z_JtMFTzOVcE1Z7d=1 Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-website-Localize-package-list.patch =46rom ee20fd1a63914b9f3d13afb061b2192d65a26ee7 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Tue, 26 Jan 2021 17:48:47 +0100 Subject: [PATCH] website: Localize package list. * .guix.scm: Copy guix-packages gettext domain locally. * apps/i18n.scm: Bind the guix-packages gettext domain. * apps/packages/templates/components.scm (package-preview): Localize package description. * apps/packages/utils.scm (package-description-shtml, package-synopsis-shtm= l): Localize package synopsis and description. * i18n-howto.txt: Document package list localization. --- website/.guix.scm | 21 +++++++++++++++++-- website/apps/i18n.scm | 3 +++ .../apps/packages/templates/components.scm | 4 +++- website/apps/packages/utils.scm | 7 +++++-- website/i18n-howto.txt | 7 ++++++- 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/website/.guix.scm b/website/.guix.scm index 5f5c570..f656d47 100644 --- a/website/.guix.scm +++ b/website/.guix.scm @@ -33,6 +33,7 @@ (use-modules (guix) (gnu) (gnu packages guile) (gnu packages guile-xyz) + (gnu packages package-management) (guix modules) (guix git-download) (guix gexp) @@ -145,7 +146,13 @@ "/bin/msgfmt")) (lingua-file (string-append "po/" lingua ".po")) (lang (car (string-split lingua #\_))) - (lang-file (string-append "po/" lang ".po"))) + (lang-file (string-append "po/" lang ".po")) + (packages-lingua-mo (string-append + #$guix "/share/locale/" lingua + "/LC_MESSAGES/guix-packages.mo")) + (packages-lang-mo (string-append + #$guix "/share/locale/" lang + "/LC_MESSAGES/guix-packages.mo"))) (define (create-mo filename) (begin (invoke msgfmt filename) @@ -158,7 +165,17 @@ (create-mo lingua-file)) ((file-exists? lang-file) (create-mo lang-file)) - (else #t)))) + (else #t)) + (cond + ((file-exists? packages-lingua-mo) + (copy-file packages-lingua-mo + (string-append lingua "/LC_MESSAGES/" + "guix-packages.mo"))) + ((file-exists? packages-lang-mo) + (copy-file packages-lang-mo + (string-append lingua "/LC_MESSAGES/" + "guix-packages.mo"))) + (else #t)))) (list #$@%linguas)) =20 ;; So we can read/write UTF-8 files. diff --git a/website/apps/i18n.scm b/website/apps/i18n.scm index d88333a..09f275e 100644 --- a/website/apps/i18n.scm +++ b/website/apps/i18n.scm @@ -20,6 +20,7 @@ #:use-module (haunt asset) #:use-module (haunt page) #:use-module (haunt utils) + #:use-module ((guix i18n) #:select (%package-text-domain)) #:use-module (ice-9 match) #:use-module (sexp-xgettext) #:use-module (srfi srfi-1) @@ -41,6 +42,8 @@ (bindtextdomain %gettext-domain (getcwd)) (bind-textdomain-codeset %gettext-domain "UTF-8") (textdomain %gettext-domain) +(bindtextdomain %package-text-domain (getcwd)) +(bind-textdomain-codeset %package-text-domain "UTF-8") =20 ;; NOTE: The sgettext macros have no hygiene because they use ;; datum->syntax and do not preserve the semantics of anything looking diff --git a/website/apps/packages/templates/components.scm b/website/apps/= packages/templates/components.scm index 565b408..785b01a 100644 --- a/website/apps/packages/templates/components.scm +++ b/website/apps/packages/templates/components.scm @@ -14,6 +14,7 @@ #:use-module (apps packages utils) #:use-module (guix licenses) #:use-module (guix packages) + #:use-module ((guix i18n) #:select (P_)) #:use-module (guix gnu-maintenance) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -186,7 +187,8 @@ (p (@ (class "item-summary")) ,(string-summarize - (stexi->plain-text (texi-fragment->stexi (package-description packa= ge))) + (stexi->plain-text + (texi-fragment->stexi (P_ (package-description package)))) 30) "=E2=80=A6"))) =20 diff --git a/website/apps/packages/utils.scm b/website/apps/packages/utils.= scm index 66edfc6..2a1be86 100644 --- a/website/apps/packages/utils.scm +++ b/website/apps/packages/utils.scm @@ -24,9 +24,11 @@ (define-module (apps packages utils) #:use-module (apps aux web) #:use-module (apps base utils) + #:use-module (apps i18n) #:use-module (apps packages data) #:use-module (apps packages types) #:use-module (guix packages) + #:use-module ((guix i18n) #:select (P_)) #:use-module (guix utils) #:use-module (guix build utils) #:use-module (guix build download) @@ -92,12 +94,13 @@ (define (package-description-shtml package) "Return a SXML representation of PACKAGE description field with HTML vocabulary." - (and=3D> (package-description package) texinfo->shtml)) + ;(setenv "LC_ALL" (getenv "LANG")) + (and=3D> (and=3D> (package-description package) P_) texinfo->shtml)) =20 (define (package-synopsis-shtml package) "Return a SXML representation of PACKAGE synopsis field with HTML vocabulary." - (and=3D> (package-synopsis package) + (and=3D> (and=3D> (package-synopsis package) P_) (lambda (synopsis) ;; Strip the paragraph that 'texinfo->shtml' adds. (match (texinfo->shtml synopsis) diff --git a/website/i18n-howto.txt b/website/i18n-howto.txt index 9ec8e81..1cf836b 100644 --- a/website/i18n-howto.txt +++ b/website/i18n-howto.txt @@ -70,11 +70,16 @@ msgfmt de.po cd .. mv po/messages.mo de/LC_MESSAGES/guix-website.mo =20 +To translate package synopsis and descriptions, you will need the guix-pac= kages +domain. On the Guix System, you can copy one from your installation: + +cp /run/current-system/profile/share/locale/de/LC_MESSAGES/guix-packages.m= o de/LC_MESSAGES/ + To build all languages: =20 guix build -f .guix.scm =20 -To test the de_DE translation, update its mo file as above, then: +To test the de_DE translation, update its mo files as above, then: =20 guix environment --ad-hoc haunt LC_ALL=3Dde_DE.utf8 \ --=20 2.30.0 --MP_/17o.9z_JtMFTzOVcE1Z7d=1-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 17:18:16 2021 Received: (at 46114) by debbugs.gnu.org; 27 Jan 2021 22:18:16 +0000 Received: from localhost ([127.0.0.1]:46358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4t8h-00078J-Sb for submit@debbugs.gnu.org; Wed, 27 Jan 2021 17:18:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4t8f-000786-NF for 46114@debbugs.gnu.org; Wed, 27 Jan 2021 17:18:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56682) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4t8Y-0007N7-Ut; Wed, 27 Jan 2021 17:18:07 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51282 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4t8W-0003NH-J4; Wed, 27 Jan 2021 17:18:05 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Julien Lepiller Subject: Re: bug#46114: [PATCH] website: Localize package list. References: <20210126175618.252a04e8@tachikoma.lepiller.eu> <87bldbxu82.fsf@gnu.org> <20210126224306.08ebfa99@tachikoma.lepiller.eu> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 =?utf-8?Q?Pluvi=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 27 Jan 2021 23:18:02 +0100 In-Reply-To: <20210126224306.08ebfa99@tachikoma.lepiller.eu> (Julien Lepiller's message of "Tue, 26 Jan 2021 22:43:06 +0100") Message-ID: <87tur2t46d.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46114 Cc: 46114@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Julien Lepiller skribis: > Le Tue, 26 Jan 2021 22:29:33 +0100, > Ludovic Court=C3=A8s a =C3=A9crit : [...] >> =E2=80=98latest-guix=E2=80=99 is the same as what you get with =E2=80=98= guix pull=E2=80=99, so it >> knows where to find its .gmo files=E2=80=94see this bit in (guix self): >>=20 >> (bindtextdomain "guix" >> #$(locale-data source "guix")) >> (bindtextdomain "guix-packages" >> #$(locale-data source >> "guix-packages" >> "packages")) > > yeah, but that's not very helpful. I don't understand how to get them > from guix-latest? Oh you need the .mo files so you can =E2=80=98bindtextdomain=E2=80=99 hmmm= =E2=80=A6 It would be easier if the web site used the inferior API; you would delegate translation to the inferior and that=E2=80=99s it. > From ee20fd1a63914b9f3d13afb061b2192d65a26ee7 Mon Sep 17 00:00:00 2001 > From: Julien Lepiller > Date: Tue, 26 Jan 2021 17:48:47 +0100 > Subject: [PATCH] website: Localize package list. > > * .guix.scm: Copy guix-packages gettext domain locally. > * apps/i18n.scm: Bind the guix-packages gettext domain. > * apps/packages/templates/components.scm (package-preview): Localize > package description. > * apps/packages/utils.scm (package-description-shtml, package-synopsis-sh= tml): > Localize package synopsis and description. > * i18n-howto.txt: Document package list localization. [...] > + (packages-lingua-mo (string-append > + #$guix "/share/locale/" lingua > + "/LC_MESSAGES/guix-packages.mo= ")) > + (packages-lang-mo (string-append > + #$guix "/share/locale/" lang > + "/LC_MESSAGES/guix-packages.mo")= )) > (define (create-mo filename) > (begin > (invoke msgfmt filename) > @@ -158,7 +165,17 @@ > (create-mo lingua-file)) > ((file-exists? lang-file) > (create-mo lang-file)) > - (else #t)))) > + (else #t)) > + (cond > + ((file-exists? packages-lingua-mo) > + (copy-file packages-lingua-mo > + (string-append lingua "/LC_MESSAGES/" > + "guix-packages.mo"))) > + ((file-exists? packages-lang-mo) > + (copy-file packages-lang-mo > + (string-append lingua "/LC_MESSAGES/" > + "guix-packages.mo"))) So we copy them for the sake of =E2=80=98bindtextdomain=E2=80=99, right? In practice those .mo files should be the same as what you=E2=80=99d get via =E2=80=98latest-guix=E2=80=99 so that=E2=80=99s probably fine. Why =E2=80=9Clingua=E2=80=9D and =E2=80=9Clang=E2=80=9D BTW? [...] > (define (package-description-shtml package) > "Return a SXML representation of PACKAGE description field with HTML > vocabulary." > - (and=3D> (package-description package) texinfo->shtml)) > + ;(setenv "LC_ALL" (getenv "LANG")) Leftover. :-) LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 20:53:12 2021 Received: (at 46114) by debbugs.gnu.org; 29 Jan 2021 01:53:12 +0000 Received: from localhost ([127.0.0.1]:50682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5IyG-00057v-5f for submit@debbugs.gnu.org; Thu, 28 Jan 2021 20:53:12 -0500 Received: from lepiller.eu ([89.234.186.109]:55818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5IyC-00057l-NY for 46114@debbugs.gnu.org; Thu, 28 Jan 2021 20:53:10 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id ed6514b8; Fri, 29 Jan 2021 01:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=GUymQ56XBpk/ 0s8DK+90yfKsAp2eTxegYvo2+fK/xzg=; b=UzVPtZCzKPUGPHr/0BQIOACjp4CA jf/PK60Bw8G/4XNqnlCoDdt6bFaDWFQCPCp3UuPG74gyiZRNgwA8NdHM9WoWjKlK X/PhdylnaaHnXWQEz8bdA6jJF7gLz4tm7ZGKjqSXoiAa61nzrdit4+QzW+ayu/2Z xoz61DXgt3kcGj4gZACJhUuwZkB7p4Fpicr1bKvJQLGZ2RXr8TV3ucOqnsO/Pvam SB9BNO/hAYPgG///QTSsv89YnfPO3E6lkhYehZWSeiSwtZT4ZIi/JiDjGlLTNXwm TtNJRfPEMuSUrP6dwTAUy6rolKiyJrOM+QMCse12Yj8CUbXpBGSxa317WA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id f0a1d99f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Fri, 29 Jan 2021 01:53:06 +0000 (UTC) Date: Fri, 29 Jan 2021 02:52:54 +0100 From: Julien Lepiller To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Subject: Re: bug#46114: [PATCH] website: Localize package list. Message-ID: <20210129025254.041f18be@tachikoma.lepiller.eu> In-Reply-To: <87tur2t46d.fsf@gnu.org> References: <20210126175618.252a04e8@tachikoma.lepiller.eu> <87bldbxu82.fsf@gnu.org> <20210126224306.08ebfa99@tachikoma.lepiller.eu> <87tur2t46d.fsf@gnu.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46114 Cc: 46114@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Le Wed, 27 Jan 2021 23:18:02 +0100, Ludovic Court=C3=A8s a =C3=A9crit : >=20 > So we copy them for the sake of =E2=80=98bindtextdomain=E2=80=99, right? >=20 > In practice those .mo files should be the same as what you=E2=80=99d get = via > =E2=80=98latest-guix=E2=80=99 so that=E2=80=99s probably fine. >=20 > Why =E2=80=9Clingua=E2=80=9D and =E2=80=9Clang=E2=80=9D BTW? I simply copied the same template as for the po file. I think lingua contains the specific language+territory code, whearas lang contains only the language code. If we have a specific translation, we want to use it, otherwise we use the generic one for the language. >=20 >=20 > [...] >=20 > > (define (package-description-shtml package) > > "Return a SXML representation of PACKAGE description field with > > HTML vocabulary." =20 > > - (and=3D> (package-description package) texinfo->shtml)) =20 > > + ;(setenv "LC_ALL" (getenv "LANG")) =20 >=20 > Leftover. :-) Fixed. >=20 > LGTM, thanks! >=20 > Ludo=E2=80=99. Pushed as f56e35bbd34aca09b67c3623fcd9b05cc0467d6f, thank you! From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 20:53:34 2021 Received: (at 46114-done) by debbugs.gnu.org; 29 Jan 2021 01:53:34 +0000 Received: from localhost ([127.0.0.1]:50685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5Iyc-00058f-Dk for submit@debbugs.gnu.org; Thu, 28 Jan 2021 20:53:34 -0500 Received: from lepiller.eu ([89.234.186.109]:55826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5Iya-00058X-Cz for 46114-done@debbugs.gnu.org; Thu, 28 Jan 2021 20:53:33 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id c3a2a298 for <46114-done@debbugs.gnu.org>; Fri, 29 Jan 2021 01:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=r1CUJ/CM1shw K8TNkWQAlHCoowu4FZCcIT1ulGW9hK8=; b=SGJAR1tih8tlhS490/g5ooWrpDFN 1e+5I/p8TsNOcojDsfEvTI2SjffMGe7ty87MI30A2PLKt0MlEbthKlx7vPtAMaPd AEDH9kxgPS7pqMOnrEKEa2GE60TUos5oD07aBBr5oLOEgDc917a6ObY/rF7UBvLD g+t9LqmYKDCTAgfGyxfpzAuHRC0FJCU15NQ8kHGd+31YowmaFq+loUBE/9oHlioS uSZwBH2pburOiGypTLopG730pGeEFoW5yqLjuo4KNSJDg3H/yggTmHJMUqKznZ+f wSsAJ2dNp80V8IfETzxrC3XMqfYc9iExWbKRhx7PSpWFlSpYF5QVBXkxQw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id b959b364 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <46114-done@debbugs.gnu.org>; Fri, 29 Jan 2021 01:53:31 +0000 (UTC) Date: Fri, 29 Jan 2021 02:53:25 +0100 From: Julien Lepiller To: 46114-done@debbugs.gnu.org Subject: Re: bug#46114: [PATCH] website: Localize package list. Message-ID: <20210129025325.2c88f454@tachikoma.lepiller.eu> In-Reply-To: <87tur2t46d.fsf@gnu.org> References: <20210126175618.252a04e8@tachikoma.lepiller.eu> <87bldbxu82.fsf@gnu.org> <20210126224306.08ebfa99@tachikoma.lepiller.eu> <87tur2t46d.fsf@gnu.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46114-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Forgot to close :) From unknown Thu Jun 19 14:04:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 26 Feb 2021 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator