* [bug#46166] [PATCH] [website] Add link to Weblate in language menu.
@ 2021-01-29 1:55 Julien Lepiller
2021-01-29 9:16 ` Mathieu Othacehe
0 siblings, 1 reply; 3+ messages in thread
From: Julien Lepiller @ 2021-01-29 1:55 UTC (permalink / raw)
To: 46166
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
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 :)
[-- Attachment #2: 0001-website-Add-link-to-Weblate-in-language-menu.patch --]
[-- Type: text/x-patch, Size: 2590 bytes --]
From 37c8fa06c756a1e051b3ec496032bfee077cbcaa Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#46166] [PATCH] [website] Add link to Weblate in language menu.
2021-01-29 1:55 [bug#46166] [PATCH] [website] Add link to Weblate in language menu Julien Lepiller
@ 2021-01-29 9:16 ` Mathieu Othacehe
2021-01-29 13:33 ` bug#46166: " Julien Lepiller
0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Othacehe @ 2021-01-29 9:16 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 46166
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#46166: [PATCH] [website] Add link to Weblate in language menu.
2021-01-29 9:16 ` Mathieu Othacehe
@ 2021-01-29 13:33 ` Julien Lepiller
0 siblings, 0 replies; 3+ messages in thread
From: Julien Lepiller @ 2021-01-29 13:33 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 46166-done
Le Fri, 29 Jan 2021 10:16:29 +0100,
Mathieu Othacehe <othacehe@gnu.org> 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!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-29 13:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 1:55 [bug#46166] [PATCH] [website] Add link to Weblate in language menu Julien Lepiller
2021-01-29 9:16 ` Mathieu Othacehe
2021-01-29 13:33 ` bug#46166: " Julien Lepiller
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.