guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: website: Add link to Weblate in language menu.


From: julien lepiller
Subject: branch master updated: website: Add link to Weblate in language menu.
Date: Fri, 29 Jan 2021 08:32:57 -0500

This is an automated email from the git hooks/post-receive script.

roptat pushed a commit to branch master
in repository guix-artwork.

The following commit(s) were added to refs/heads/master by this push:
     new f0132b1  website: Add link to Weblate in language menu.
f0132b1 is described below

commit f0132b172f451b3c3e8e23a8e802fe56945eeecf
Author: Julien Lepiller <julien@lepiller.eu>
AuthorDate: Fri Jan 29 02:30:43 2021 +0100

    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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]