unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: 51456@debbugs.gnu.org
Subject: bug#51456: website: Language selection dropdown not translated
Date: Thu, 28 Oct 2021 12:09:56 +0200	[thread overview]
Message-ID: <20211028100956.iebrx6v7iommkgdn@pelzflorian.localdomain> (raw)
In-Reply-To: <20211028081340.hj2ceeagqfjay2m2@pelzflorian.localdomain>

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

On Thu, Oct 28, 2021 at 10:13:49AM +0200, pelzflorian (Florian Pelz) wrote:
> Is the proper solution to symlink all lingua-mo-files, i.e. reinstate
> from before commit 4d5bf8522e2 a for-each like
> 
> (for-each
>  (lambda (lingua mo-directory)
>          (symlink (string-append mo-directory "/" lingua)
>                   lingua))
>  (list #$@%linguas)
>  '#$(map lingua-mo-files %linguas))
> 
> (I have not tried.)

Seems to work.  I have guix build -f .guix.scm but only one lingua got
built so far, it looks right.  Patch attached.  Shall I push or …

> 
> Or should website/apps/base/templates/components.scm look up the
> language dropdown’s language names in a different way such as from the
> PO file, which is more complicated?

Regards,
Florian

[-- Attachment #2: 0001-website-Make-available-all-.mo-files-for-each-langua.patch --]
[-- Type: text/plain, Size: 1324 bytes --]

From 947a7b98beda5b49890a61f0751d5765157f5cde Mon Sep 17 00:00:00 2001
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Thu, 28 Oct 2021 10:21:52 +0200
Subject: [PATCH] website: Make available all .mo files for each language.

Because the language selection dropdown needs all.

Fixes <https://issues.guix.gnu.org/51456>.

* website/.guix.scm (lingua-web-site): When building one language,
still use 'lingua-mo-files' for all languages.
---
 website/.guix.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/website/.guix.scm b/website/.guix.scm
index 3beb0e8..c5cb367 100644
--- a/website/.guix.scm
+++ b/website/.guix.scm
@@ -215,8 +215,12 @@
 
             ;; Build the website for LINGUA.  (apps i18n) calls
             ;; 'bindtextdomain' on $PWD so provide .mo files right here.
-            (symlink (string-append #$(lingua-mo-files lingua) "/" lingua)
-                     lingua)
+            (for-each
+             (lambda (lingua mo-directory)
+               (symlink (string-append mo-directory "/" lingua)
+                        lingua))
+             (list #$@%linguas)
+             '#$(map lingua-mo-files %linguas))
 
             (setenv "LC_ALL" (string-append lingua ".utf8"))
             (format #t "Running 'haunt build' for lingua ~a...~%" lingua)
-- 
2.33.1


  reply	other threads:[~2021-10-28 10:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28  8:13 bug#51456: website: Language selection dropdown not translated pelzflorian (Florian Pelz)
2021-10-28 10:09 ` pelzflorian (Florian Pelz) [this message]
2021-11-02 15:08   ` 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=20211028100956.iebrx6v7iommkgdn@pelzflorian.localdomain \
    --to=pelzflorian@pelzflorian.de \
    --cc=51456@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 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).