guix-commits
[Top][All Lists]
Advanced

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

01/01: website: Translate contact information for address@hidden


From: Ludovic Courtès
Subject: 01/01: website: Translate contact information for address@hidden
Date: Mon, 5 Mar 2018 03:48:39 -0500 (EST)

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

commit 69b083f87787e87fdb0a4cc77918ca6fbf95dbe6
Author: Ludovic CourtĂšs <address@hidden>
Date:   Mon Mar 5 09:45:51 2018 +0100

    website: Translate contact information for address@hidden
    
    Thanks to everyone who provided a translation:
    <https://lists.gnu.org/archive/html/guix-devel/2018-03/msg00023.html>.
    
    * website/apps/base/templates/components.scm (language-tag): New
    procedure.
    (contact->shtml): Support language tags in 'contact-description'.
    * website/apps/base/templates/contact.scm (contact-t): Include
    "button.css'.
    * website/static/base/css/buttons.css (.button-light): New item.
    * website/apps/base/data.scm (contact-media): For help-guix, add
    translations in several languages.
---
 website/apps/base/data.scm                 | 42 +++++++++++++++++++++++++-----
 website/apps/base/templates/components.scm | 19 +++++++++++++-
 website/apps/base/templates/contact.scm    |  3 ++-
 website/static/base/css/buttons.css        |  3 ++-
 4 files changed, 57 insertions(+), 10 deletions(-)

diff --git a/website/apps/base/data.scm b/website/apps/base/data.scm
index 0abcc7a..278f244 100644
--- a/website/apps/base/data.scm
+++ b/website/apps/base/data.scm
@@ -13,7 +13,6 @@
 ;;; Data.
 ;;;
 
-
 (define contact-media
   (list
    ;; The first three will be featured in the home page.
@@ -30,12 +29,41 @@
    (contact
     #:name "Help Mailing List"
     #:description
-    '(p
-      "Subscribe to the Help mailing list to get support from the
-      GuixSD and GNU Guix community via email. "
-      (a (@ (href 
"https://lists.gnu.org/archive/html/guix-devel/2015-12/msg00584.html";))
-        "Until December 2015")
-      ", the Guix-devel mailing list filled that role.")
+    `(("de"
+       "Melden Sie sich bei der „Help“-Mailingliste an, um per E-Mail
+gemeinschaftlichen Rat zu GuixSD und Guix zu bekommen.  Sie können
+Nachrichten auch auf deutsch verfassen.")
+      ("en"
+       "Subscribe to the Help mailing list to get support from the GuixSD
+and GNU Guix community via email.  You can post messages in English though we
+also accept other languages.")
+      ("eo"
+       "Subskribu al la retmesaĝolisto \"Help\" por demandi helpon pri
+GuixSD kaj GNU Guix al la grupo.  Vi povas skribi esperantlingve.")
+      ("fr"
+       "Abonnez-vous à la liste de diffusion « Help » pour obtenir l'aide
+de la communauté sur GuixSD et GNU Guix par courrier électronique.  Vous
+pouvez envoyer des messages en français.")
+      ("hu"
+       "Iratkozzon fel a „Help“ levelezƑlistĂĄra, hogy segĂ­tsĂ©get kaphasson
+e-mailben a GuixSD Ă©s a GNU Guix közössĂ©gtƑl. Magyarul is kĂŒldhet
+ĂŒzeneteket.")
+      ("it"
+       "Iscrivetevi alla mailing list 'Help' per essere aiutati da altri
+utenti di Guix e GuixSD.  Potete scrivere sulla mailing list anche in
+italiano.")
+      ("nb"
+       "Meld deg pÄ diskusjonslisten «Help» for Ä fÄ rÄd og tips fra
+andre GuixSD- og GNU Guix-brukere via e-post.  Du kan legge inn
+meldinger pÄ norsk.")
+      ("nl"
+       "Abonneer je op de discussielijst \"Help\" om hulp te vragen
+van de GuixSD- en GNU Guix-gemeenschap.  Je kunt berichten sturen in
+het Nederlands.")
+      ("zh"
+       "èš‚é–±ă€ŒHelpă€éƒ”ä»¶çŸ€ç”„ä»„é›»éƒ”ćŸžGuixSD揊GNU Guixç€ŸçŸ€ć–ćŸ—æ”ŻæŽă€‚äœ ćŻä»„äœżç”š
+æ­Łé«”ă€çčé«”äž­æ–‡ç™Œé€èšŠæŻ"))
+
     #:url "https://lists.gnu.org/mailman/listinfo/help-guix";
     #:log "https://lists.gnu.org/archive/html/help-guix";)
 
diff --git a/website/apps/base/templates/components.scm 
b/website/apps/base/templates/components.scm
index b329c71..04d3a08 100644
--- a/website/apps/base/templates/components.scm
+++ b/website/apps/base/templates/components.scm
@@ -13,6 +13,7 @@
   #:use-module (apps base types)
   #:use-module (apps base utils)
   #:use-module (srfi srfi-1)
+  #:use-module (ice-9 match)
   #:export (breadcrumbs
            button-big
            button-little
@@ -121,6 +122,11 @@
      "
")))
 
 
+(define (language-tag lang)
+  `(span (@ (class "button-little button-little-active")
+            (style "float: left; text-align: center; width: 20px; 
vertical-align: middle"))
+         ,lang))
+
 (define (contact->shtml contact)
   "Return an SHTML representation of the given contact object.
 
@@ -133,7 +139,18 @@
         ""
         `(small
           " (" (a (@ (href ,(contact-log contact))) "archive") ") "))
-    ,(contact-description contact)))
+
+    ;; The description can be a list of language/blurb pairs.
+    ,(match (contact-description contact)
+       ((((? string? languages) blurbs) ...)
+        `(p ,@(map (lambda (language blurb)
+                     `(div (@ (style "margin: 0 10px 10px 0"))
+                           ,(language-tag language)
+                           (div ,blurb)))
+                   languages
+                   blurbs)))
+       (blurb
+        blurb))))
 
 
 (define* (horizontal-separator #:key (light #false))
diff --git a/website/apps/base/templates/contact.scm 
b/website/apps/base/templates/contact.scm
index 16e4b4e..c246d4b 100644
--- a/website/apps/base/templates/contact.scm
+++ b/website/apps/base/templates/contact.scm
@@ -23,7 +23,8 @@
      "Community" "Mailing lists" "IRC channels" "Bug reports" "Help")
    #:active-menu-item "About"
    #:css (list
-         (guix-url "static/base/css/page.css"))
+         (guix-url "static/base/css/page.css")
+          (guix-url "static/base/css/buttons.css"))
    #:crumbs (list (crumb "Contact" "./"))
    #:content
    `(main
diff --git a/website/static/base/css/buttons.css 
b/website/static/base/css/buttons.css
index 9e45190..feabcea 100644
--- a/website/static/base/css/buttons.css
+++ b/website/static/base/css/buttons.css
@@ -37,6 +37,7 @@
 }
 
 
+.button-little,
 .button-little:link,
 .button-little:visited {
     border-color: #C0C0C0;
@@ -58,4 +59,4 @@
 .button-little:hover {
     background-color: #FFCC00;
     border-color: #D4AA00;
-}
\ No newline at end of file
+}



reply via email to

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