Subject: bug#46166: closed (Re: [bug#46166] [PATCH] [website] Add link to Weblate in language menu.)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 29 Jan 2021 13:34:02 +0000

Your bug report

#46166: [PATCH] [website] Add link to Weblate in language menu.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
46166: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46166
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#46166] [PATCH] [website] Add link to Weblate in language menu.
From: Julien Lepiller <[email-masked]>
To: Mathieu Othacehe <[email-masked]>
Cc: [email-masked]
Date: Fri, 29 Jan 2021 14:33:30 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Le Fri, 29 Jan 2021 10:16:29 +0100,
Mathieu Othacehe <[email-masked]> a écrit :

> Hello Julien,
> 
> > This patch adds a simple link "Translate" to at the bottom of the
> > language dropdown. It goes to the website domain on weblate, so
> > translators can immediately start working on the translation :)  
> 
> This looks fine, thanks!
> 
> Mathieu

Pushed as f0132b172f451b3c3e8e23a8e802fe56945eeecf, thanks!

Subject: [PATCH] [website] Add link to Weblate in language menu.
From: Julien Lepiller <[email-masked]>
To: [email-masked]
Date: Fri, 29 Jan 2021 02:55:04 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

This patch adds a simple link "Translate" to at the bottom of the
language dropdown. It goes to the website domain on weblate, so
translators can immediately start working on the translation :)
>From 37c8fa06c756a1e051b3ec496032bfee077cbcaa Mon Sep 17 00:00:00 2001
From: Julien Lepiller <[email-masked]>
Date: Fri, 29 Jan 2021 02:30:43 +0100
Subject: [PATCH] website: Add link to Weblate in language menu.

* website/apps/base/templates/components.scm (navbar): Add a link to Weblate
in the language dropdown.
---
 website/apps/base/templates/components.scm | 35 ++++++++++++----------
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/website/apps/base/templates/components.scm b/website/apps/base/templates/components.scm
index 44d410e..7ca76cc 100644
--- a/website/apps/base/templates/components.scm
+++ b/website/apps/base/templates/components.scm
@@ -430,21 +430,26 @@ manual.
       ;; Languages dropdown.
       ,(menu-dropdown #:label (locale-display-name) #:active-item active-item
         #:items
-        (map-in-order
-         (lambda (ietf-info)
-           (let ((lingua (car ietf-info))
-                 (code (cdr ietf-info)))
-             (setlocale LC_ALL (string-append lingua ".utf8"))
-             (let ((out (menu-item #:label (locale-display-name)
-                                   #:active-item active-item
-                                   #:url (guix-url (string-append code "/")
-                                                   #:localize #f))))
-               (setlocale LC_ALL "")
-               out)))
-         (sort (delete %current-lingua
-                       ietf-tags-file-contents
-                       (lambda (a b) (string=? a (car b))))
-               (lambda (a b) string<?))))))
+        (append
+          (map-in-order
+           (lambda (ietf-info)
+             (let ((lingua (car ietf-info))
+                   (code (cdr ietf-info)))
+               (setlocale LC_ALL (string-append lingua ".utf8"))
+               (let ((out (menu-item #:label (locale-display-name)
+                                     #:active-item active-item
+                                     #:url (guix-url (string-append code "/")
+                                                     #:localize #f))))
+                 (setlocale LC_ALL "")
+                 out)))
+           (sort (delete %current-lingua
+                         ietf-tags-file-contents
+                         (lambda (a b) (string=? a (car b))))
+                 (lambda (a b) string<?)))
+          (list
+            (menu-item #:label (G_ "Translate")
+                       #:active-item active-item
+                       #:url "https://translate.fedoraproject.org/projects/guix/website"))))))

     ;; Menu button.
-- 
2.30.0