>From 43fc90e205054333a751b5fb1a73c29c922a367c Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Thu, 8 Aug 2019 00:01:50 +0200 Subject: [PATCH 4/6] website: Mark some files in apps/base for translation. * website/apps/base/templates/about.scm (home-t): Mark for translation. * website/apps/base/templates/components.scm (home-t): Mark for translation. * website/apps/base/templates/contact.scm (home-t): Mark for translation. * website/apps/base/templates/home.scm (home-t): Mark for translation. * website/apps/base/templates/theme.scm (home-t): Mark for translation. --- website/apps/base/templates/about.scm | 159 +++++++------- website/apps/base/templates/components.scm | 54 ++--- website/apps/base/templates/contact.scm | 20 +- website/apps/base/templates/home.scm | 239 +++++++++++---------- website/apps/base/templates/theme.scm | 46 ++-- 5 files changed, 275 insertions(+), 243 deletions(-) diff --git a/website/apps/base/templates/about.scm b/website/apps/base/templates/about.scm index a654e2f..ecdc81b 100644 --- a/website/apps/base/templates/about.scm +++ b/website/apps/base/templates/about.scm @@ -6,102 +6,111 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (about-t)) (define (about-t) "Return the About page in SHTML." (theme - #:title '("About") + #:title (G_ '("About")) #:description - "Guix is an advanced distribution of the GNU operating system. - Guix is technology that respects the freedom of computer users. - You are free to run the system for any purpose, study how it - works, improve it, and share it with the whole world." + (G_ "Guix is an advanced distribution of the GNU operating system. + Guix is technology that respects the freedom of computer users. + You are free to run the system for any purpose, study how it + works, improve it, and share it with the whole world.") #:keywords - (list "GNU" "Linux" "Unix" "Free software" "Libre software" - "Operating system" "GNU Hurd" "GNU Guix package manager") - #:active-menu-item "About" + (string-split ;TRANSLATORS: |-separated list of webpage keywords + (G_ "GNU|Linux|Unix|Free software|Libre software|Operating \ +system|GNU Hurd|GNU Guix package manager") #\|) + #:active-menu-item (C_ "Website menu" "About") #:css (list (guix-url "static/base/css/page.css")) - #:crumbs (list (crumb "About" "./")) + #:crumbs (list (crumb (C_ "Website menu" "About") "./")) #:content `(main (section (@ (class "page centered-block limit-width")) - (h2 "About the Project") + ,(G_ `(h2 "About the Project")) - (p - "The " (em "GNU Guix") " package and system manager is a " - (a (@ (href ,(gnu-url "philosophy/free-sw.html"))) - "free software") - " project developed by volunteers around the world under the - umbrella of the " (a (@ (href ,(gnu-url))) "GNU Project") ". ") + ,(G_ + `(p + "The " ,(G_ `(em "GNU Guix")) " package and system manager is a " + ,(G_ `(a (@ (href ,(gnu-url "philosophy/free-sw.html"))) + "free software")) + " project developed by volunteers around the world under the + umbrella of the " + ,(G_ `(a (@ (href ,(gnu-url))) "GNU Project")) ". ")) - (p - "Guix System is an advanced distribution of the " - (a (@ (href ,(gnu-url))) "GNU operating system") - ". It uses the " - (a (@ (href ,(gnu-url "software/linux-libre"))) "Linux-libre") - " kernel, and support for " - (a (@ (href ,(gnu-url "software/hurd"))) "the Hurd") - " is being worked on. As a GNU distribution, it is committed - to respecting and enhancing " - (a (@ (href ,(gnu-url "philosophy/free-sw.html"))) - "the freedom of its users") - ". As such, it adheres to the " - (a (@ (href ,(gnu-url "distros/free-system-distribution-guidelines.html"))) - "GNU Free System Distribution Guidelines") ".") + ,(G_ + `(p + "Guix System is an advanced distribution of the " + ,(G_ `(a (@ (href ,(gnu-url))) "GNU operating system")) + ". It uses the " + ,(G_ `(a (@ (href ,(gnu-url "software/linux-libre"))) "Linux-libre")) + " kernel, and support for " + ,(G_ `(a (@ (href ,(gnu-url "software/hurd"))) "the Hurd")) + " is being worked on. As a GNU distribution, it is committed + to respecting and enhancing " + ,(G_ `(a (@ (href ,(gnu-url "philosophy/free-sw.html"))) + "the freedom of its users")) + ". As such, it adheres to the " + ,(G_ `(a (@ (href ,(gnu-url "distros/free-system-distribution-guidelines.html"))) + "GNU Free System Distribution Guidelines")) ".")) - (p - "GNU Guix provides " - (a (@ (href ,(manual-url "Features.html"))) - "state-of-the-art package management features") - " such as transactional upgrades and roll-backs, reproducible - build environments, unprivileged package management, and - per-user profiles. It uses low-level mechanisms from the " - (a (@ (href "https://nixos.org/nix/")) "Nix") - " package manager, but packages are " - (a (@ (href ,(manual-url "Defining-Packages.html"))) "defined") - " as native " - (a (@ (href ,(gnu-url "software/guile"))) "Guile") - " modules, using extensions to the " - (a (@ (href "http://schemers.org")) "Scheme") - " language—which makes it nicely hackable.") + ,(G_ + `(p + "GNU Guix provides " + ,(G_ `(a (@ (href ,(manual-url "Features.html"))) + "state-of-the-art package management features")) + " such as transactional upgrades and roll-backs, reproducible + build environments, unprivileged package management, and + per-user profiles. It uses low-level mechanisms from the " + ,(G_ `(a (@ (href "https://nixos.org/nix/")) "Nix")) + " package manager, but packages are " + ,(G_ `(a (@ (href ,(manual-url "Defining-Packages.html"))) "defined")) + " as native " + ,(G_ `(a (@ (href ,(gnu-url "software/guile"))) "Guile")) + " modules, using extensions to the " + ,(G_ `(a (@ (href "http://schemers.org")) "Scheme")) + " language—which makes it nicely hackable.")) - (p - "Guix takes that a step further by additionally supporting stateless, - reproducible " - (a (@ (href ,(manual-url "Using-the-Configuration-System.html"))) - "operating system configurations") - ". This time the whole system is hackable in Scheme, from the " - (a (@ (href ,(manual-url "Initial-RAM-Disk.html"))) - "initial RAM disk") - " to the " - (a (@ (href ,(gnu-url "software/shepherd"))) - "initialization system") - ", and to the " - (a (@ (href ,(manual-url "Defining-Services.html"))) - "system services") - ".") + ,(G_ + `(p + "Guix takes that a step further by additionally supporting stateless, + reproducible " + ,(G_ `(a (@ (href ,(manual-url "Using-the-Configuration-System.html"))) + "operating system configurations")) + ". This time the whole system is hackable in Scheme, from the " + ,(G_ `(a (@ (href ,(manual-url "Initial-RAM-Disk.html"))) + "initial RAM disk")) + " to the " + ,(G_ `(a (@ (href ,(gnu-url "software/shepherd"))) + "initialization system")) + ", and to the " + ,(G_ `(a (@ (href ,(manual-url "Defining-Services.html"))) + "system services")) + ".")) - (h3 (@ (id "mantainer")) "Maintainer") + ,(G_ `(h3 (@ (id "mantainer")) "Maintainer")) - (p - "Guix is currently maintained by Ludovic Courtès and Ricardo - Wurmus. Please use the " - (a (@ (href ,(guix-url "contact/"))) "mailing lists") - " for contact. ") + ,(G_ + `(p + "Guix is currently maintained by Ludovic Courtès and Ricardo + Wurmus. Please use the " + ,(G_ `(a (@ (href ,(guix-url "contact/"))) "mailing lists")) + " for contact. ")) - (h3 (@ (id "license")) "Licensing") + ,(G_ `(h3 (@ (id "license")) "Licensing")) - (p - "Guix is free software; you can redistribute it and/or modify - it under the terms of the " - (a (@ (rel "license") (href ,(gnu-url "licenses/gpl.html"))) - "GNU General Public License") - " as published by the Free Software Foundation; either - version\xa03 of the License, or (at your option) any later - version. "))))) + ,(G_ + `(p + "Guix is free software; you can redistribute it and/or modify + it under the terms of the " + ,(G_ `(a (@ (rel "license") (href ,(gnu-url "licenses/gpl.html"))) + "GNU General Public License")) + " as published by the Free Software Foundation; either + version\xa03 of the License, or (at your option) any later + version. ")))))) diff --git a/website/apps/base/templates/components.scm b/website/apps/base/templates/components.scm index d3f6af1..666abec 100644 --- a/website/apps/base/templates/components.scm +++ b/website/apps/base/templates/components.scm @@ -12,6 +12,7 @@ #:use-module (apps aux web) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:use-module (srfi srfi-1) #:use-module (ice-9 match) #:export (breadcrumbs @@ -41,9 +42,9 @@ (apps base types)." `(nav (@ (class "breadcrumbs")) - (h2 (@ (class "a11y-offset")) "Your location:") + ,(G_ `(h2 (@ (class "a11y-offset")) "Your location:")) - (a (@ (class "crumb") (href ,(guix-url))) "Home") (span " → ") + ,(G_ `(a (@ (class "crumb") (href ,(guix-url))) "Home")) (span " → ") ,@(separate (crumbs->shtml crumbs) '(span " → ")))) @@ -121,8 +122,9 @@ (sxml->string* (match (contact-description contact) ((and multilingual (((? string?) (? string?)) ...)) - (match (assoc "en" multilingual) - (("en" blurb) blurb))) + (let ((code (car (string-split (%current-lingua) #\_)))) + (match (assoc code multilingual) + ((code blurb) blurb)))) (blurb blurb))) 30) @@ -145,7 +147,7 @@ ,(if (string=? (contact-log contact) "") "" `(small - " (" (a (@ (href ,(contact-log contact))) "archive") ") ")) + " (" ,(G_ `(a (@ (href ,(contact-log contact))) "archive")) ") ")) ;; The description can be a list of language/blurb pairs. ,(match (contact-description contact) @@ -284,26 +286,26 @@ (h1 (a (@ (class "branding") (href ,(guix-url))) - (span (@ (class "a11y-offset")) "Guix"))) + ,(C_ "Website menu" `(span (@ (class "a11y-offset")) "Guix")))) ;; Menu. (nav (@ (class "menu")) - (h2 (@ (class "a11y-offset")) "Website menu:") + ,(G_ `(h2 (@ (class "a11y-offset")) "Website menu:")) (ul - ,(menu-item #:label "Overview" #:active-item active-item #:url (guix-url)) - ,(menu-item #:label "Download" #:active-item active-item #:url (guix-url "download/")) - ,(menu-item #:label "Packages" #:active-item active-item #:url (guix-url "packages/")) - ,(menu-item #:label "Blog" #:active-item active-item #:url (guix-url "blog/")) - ,(menu-item #:label "Help" #:active-item active-item #:url (guix-url "help/")) - ,(menu-item #:label "Donate" #:active-item active-item #:url (guix-url "donate/")) - - ,(menu-dropdown #:label "About" #:active-item active-item #:url (guix-url "about/") + ,(C_ "Website menu" (menu-item #:label "Overview" #:active-item active-item #:url (guix-url))) + ,(C_ "Website menu" (menu-item #:label "Download" #:active-item active-item #:url (guix-url "download/"))) + ,(C_ "Website menu" (menu-item #:label "Packages" #:active-item active-item #:url (guix-url "packages/"))) + ,(C_ "Website menu" (menu-item #:label "Blog" #:active-item active-item #:url (guix-url "blog/"))) + ,(C_ "Website menu" (menu-item #:label "Help" #:active-item active-item #:url (guix-url "help/"))) + ,(C_ "Website menu" (menu-item #:label "Donate" #:active-item active-item #:url (guix-url "donate/"))) + + ,(menu-dropdown #:label (C_ "Website menu" "About") #:active-item active-item #:url (guix-url "about/") #:items - (list - (menu-item #:label "Contact" #:active-item active-item #:url (guix-url "contact/")) - (menu-item #:label "Contribute" #:active-item active-item #:url (guix-url "contribute/")) - (menu-item #:label "Security" #:active-item active-item #:url (guix-url "security/")) - (menu-item #:label "Graphics" #:active-item active-item #:url (guix-url "graphics/")))))) + (list + (C_ "Website menu" (menu-item #:label "Contact" #:active-item active-item #:url (guix-url "contact/"))) + (C_ "Website menu" (menu-item #:label "Contribute" #:active-item active-item #:url (guix-url "contribute/"))) + (C_ "Website menu" (menu-item #:label "Security" #:active-item active-item #:url (guix-url "security/"))) + (C_ "Website menu" (menu-item #:label "Graphics" #:active-item active-item #:url (guix-url "graphics/"))))))) ;; Menu button. (a @@ -321,10 +323,10 @@ TOTAL-PAGES (number) The total number of pages that should be displayed." (if (> total-pages 1) - `(span - (@ (class "page-number-indicator")) - " (Page " ,(number->string page-number) - " of " ,(number->string total-pages) ")") + (G_ `(span + (@ (class "page-number-indicator")) + " (Page " ,(number->string page-number) + " of " ,(number->string total-pages) ")")) "")) @@ -345,8 +347,8 @@ (@ (class "page-selector")) (h3 (@ (class "a11y-offset")) - ,(string-append "Page " (number->string active-page) " of " - (number->string pages) ". Go to another page: ")) + ,(G_ (string-append "Page " (number->string active-page) " of " + (number->string pages) ". Go to another page: "))) ,(if (> pages 1) (map (lambda (page-number) diff --git a/website/apps/base/templates/contact.scm b/website/apps/base/templates/contact.scm index d4ee2f2..5b8df63 100644 --- a/website/apps/base/templates/contact.scm +++ b/website/apps/base/templates/contact.scm @@ -7,31 +7,33 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (contact-t)) (define (contact-t context) "Return the Contact page in SHTML with the data in CONTEXT." (theme - #:title '("Contact") + #:title (G_ '("Contact")) #:description - "A list of channels to communicate with GNU Guix users - and developers about anything you want." + (G_ "A list of channels to communicate with GNU Guix users + and developers about anything you want.") #:keywords - '("GNU" "Linux" "Unix" "Free software" "Libre software" - "Operating system" "GNU Hurd" "GNU Guix package manager" - "Community" "Mailing lists" "IRC channels" "Bug reports" "Help") - #:active-menu-item "About" + (string-split ;TRANSLATORS: |-separated list of webpage keywords + (G_ "GNU|Linux|Unix|Free software|Libre software|Operating \ +system|GNU Hurd|GNU Guix package manager|Community|Mailing lists|IRC +channels|Bug reports|Help") #\|) + #:active-menu-item (C_ "Website menu" "About") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/buttons.css") (guix-url "static/base/css/contact.css")) - #:crumbs (list (crumb "Contact" "./")) + #:crumbs (list (crumb (C_ "Website menu" "Contact") "./")) #:content `(main (section (@ (class "page centered-block limit-width")) - (h2 "Contact") + ,(G_ `(h2 "Contact")) ,@(map contact->shtml diff --git a/website/apps/base/templates/home.scm b/website/apps/base/templates/home.scm index 5cb3bf5..827724f 100644 --- a/website/apps/base/templates/home.scm +++ b/website/apps/base/templates/home.scm @@ -8,24 +8,26 @@ #:use-module (apps base types) #:use-module (apps base utils) #:use-module (apps blog templates components) + #:use-module (apps i18n) #:export (home-t)) (define (home-t context) "Return the Home page in SHTML using the data in CONTEXT." (theme - #:title '("GNU's advanced distro and transactional package manager") + #:title (G_ '("GNU's advanced distro and transactional package manager")) #:description - "Guix is an advanced distribution of the GNU operating system. + (G_ "Guix is an advanced distribution of the GNU operating system. Guix is technology that respects the freedom of computer users. - You are free to run the system for any purpose, study how it works, - improve it, and share it with the whole world." + You are free to run the system for any purpose, study how it + works, improve it, and share it with the whole world.") #:keywords - '("GNU" "Linux" "Unix" "Free software" "Libre software" - "Operating system" "GNU Hurd" "GNU Guix package manager" - "GNU Guile" "Guile Scheme" "Transactional upgrades" - "Functional package management" "Reproducibility") - #:active-menu-item "Overview" + (string-split ;TRANSLATORS: |-separated list of webpage keywords + (G_ "GNU|Linux|Unix|Free software|Libre software|Operating \ +system|GNU Hurd|GNU Guix package manager|GNU Guile|Guile \ +Scheme|Transactional upgrades|Functional package \ +management|Reproducibility") #\|) + #:active-menu-item (C_ "Website menu" "Overview") #:css (list (guix-url "static/base/css/item-preview.css") (guix-url "static/base/css/index.css")) @@ -34,83 +36,89 @@ ;; Featured content. (section (@ (class "featured-content")) - (h2 (@ (class "a11y-offset")) "Summary") + ,(G_ `(h2 (@ (class "a11y-offset")) "Summary")) (ul - (li - (b "Liberating.") - " Guix is an advanced - distribution of the " - ,(link-yellow - #:label "GNU operating system" - #:url (gnu-url "gnu/about-gnu.html")) - " developed by the " - ,(link-yellow - #:label "GNU Project" - #:url (gnu-url)) - "—which respects the " - ,(link-yellow - #:label "freedom of computer users" - #:url (gnu-url "distros/free-system-distribution-guidelines.html")) - ". ") - - (li - (b "Dependable.") - " Guix " - ,(link-yellow - #:label "supports" - #:url (manual-url "Package-Management.html")) - " transactional upgrades and roll-backs, unprivileged - package management, " - ,(link-yellow - #:label "and more" - #:url (manual-url "Features.html")) - ". When used as a standalone distribution, Guix supports " - ,(link-yellow - #:label "declarative system configuration" - #:url (manual-url "Using-the-Configuration-System.html")) - " for transparent and reproducible operating systems.") - - (li - (b "Hackable.") - " It provides " - ,(link-yellow - #:label "Guile Scheme" - #:url (gnu-url "software/guile/")) - " APIs, including high-level embedded domain-specific - languages (EDSLs) to " - ,(link-yellow - #:label "define packages" - #:url (manual-url "Defining-Packages.html")) - " and " - ,(link-yellow - #:label "whole-system configurations" - #:url (manual-url "System-Configuration.html")) - ".")) + ,(G_ + `(li + ,(G_ `(b "Liberating.")) + " Guix is an advanced distribution of the " + ,(G_ (link-yellow + #:label "GNU operating system" + #:url (gnu-url "gnu/about-gnu.html"))) + " developed by the " + ,(G_ (link-yellow + #:label "GNU Project" + #:url (gnu-url))) + "—which respects the " + ,(G_ (link-yellow + #:label "freedom of computer users" + #:url (gnu-url "distros/free-system-distribution-\ +guidelines.html"))) + ". ")) + + ,(G_ + `(li + ,(G_ `(b "Dependable.")) + " Guix " + ,(G_ (link-yellow + #:label "supports" + #:url (manual-url "Package-Management.html"))) + " transactional upgrades and roll-backs, unprivileged \ +package management, " + ,(G_ (link-yellow + #:label "and more" + #:url (manual-url "Features.html"))) + ". When used as a standalone distribution, Guix supports " + ,(G_ (link-yellow + #:label "declarative system configuration" + #:url (manual-url "Using-the-Configuration-System.html"))) + " for transparent and reproducible operating systems.")) + + ,(G_ + `(li + ,(G_ `(b "Hackable.")) + " It provides " + ,(G_ (link-yellow + #:label "Guile Scheme" + #:url (gnu-url "software/guile/"))) + " APIs, including high-level embedded domain-specific \ +languages (EDSLs) to " + ,(G_ (link-yellow + #:label "define packages" + #:url (manual-url "Defining-Packages.html"))) + " and " + ,(G_ (link-yellow + #:label "whole-system configurations" + #:url (manual-url "System-Configuration.html"))) + "."))) (div (@ (class "action-box centered-text")) ,(button-big - #:label (string-append "DOWNLOAD v" (latest-guix-version)) + #:label (apply string-append + (C_ "button" `("DOWNLOAD v" ,(latest-guix-version) ""))) #:url (guix-url "download/") #:light #true) " " ; A space for readability in non-CSS browsers. ,(button-big - #:label "CONTRIBUTE" + #:label (C_ "button" "CONTRIBUTE") #:url (guix-url "contribute/") #:light #true))) ;; Discover Guix. (section (@ (class "discovery-box")) - (h2 "Discover Guix") - - (p - (@ (class "limit-width centered-block")) - "Guix comes with thousands of packages which include - applications, system tools, documentation, fonts, and other - digital goods readily available for installing with the " - ,(link-yellow #:label "GNU Guix" #:url "#guix-in-other-distros") - " package manager.") + ,(G_ `(h2 "Discover Guix")) + + ,(G_ + `(p + (@ (class "limit-width centered-block")) + "Guix comes with thousands of packages which include \ +applications, system tools, documentation, fonts, and other digital \ +goods readily available for installing with the " + ,(G_ (link-yellow #:label "GNU Guix" + #:url (identity "#guix-in-other-distros"))) + " package manager.")) (div (@ (class "screenshots-box")) @@ -119,55 +127,57 @@ (div (@ (class "action-box centered-text")) ,(button-big - #:label "ALL PACKAGES" + #:label (C_ "button" "ALL PACKAGES") #:url (guix-url "packages/") #:light #true)) ,(horizontal-separator #:light #true) ;; Guix in different fields. - (h3 "GNU Guix in your field") + ,(G_ `(h3 "GNU Guix in your field")) - (p - (@ (class "limit-width centered-block")) - "Read some stories about how people are using GNU Guix in their daily - lives.") + ,(G_ + `(p + (@ (class "limit-width centered-block")) + "Read some stories about how people are using GNU Guix in +their daily lives.")) (div (@ (class "fields-box")) " " ; A space for readability in non-CSS browsers (same below). ,(button-big - #:label "SOFTWARE DEVELOPMENT" - #:url (guix-url "blog/tags/software-development/") - #:light #true) + #:label (C_ "button" "SOFTWARE DEVELOPMENT") + #:url (guix-url "blog/tags/software-development/") + #:light #true) " " ,(button-big - #:label "BIOINFORMATICS" - #:url (guix-url "blog/tags/bioinformatics/") - #:light #true) + #:label (C_ "button" "BIOINFORMATICS") + #:url (guix-url "blog/tags/bioinformatics/") + #:light #true) " " ,(button-big - #:label "HIGH PERFORMANCE COMPUTING" - #:url (guix-url "blog/tags/high-performance-computing/") - #:light #true) + #:label (C_ "button" "HIGH PERFORMANCE COMPUTING") + #:url (guix-url "blog/tags/high-performance-computing/") + #:light #true) " " ,(button-big - #:label "RESEARCH" - #:url (guix-url "blog/tags/research/") - #:light #true) + #:label (C_ "button" "RESEARCH") + #:url (guix-url "blog/tags/research/") + #:light #true) " " ,(button-big - #:label "ALL FIELDS..." - #:url (guix-url "blog/") - #:light #true)) + #:label (C_ "button" "ALL FIELDS...") + #:url (guix-url "blog/") + #:light #true)) ,(horizontal-separator #:light #true) ;; Using Guix in other distros. - (h3 - (@ (id "guix-in-other-distros")) - "GNU Guix in other GNU/Linux distros") + ,(G_ + `(h3 + (@ (id "guix-in-other-distros")) + "GNU Guix in other GNU/Linux distros")) (div (@ (class "info-box")) @@ -176,54 +186,55 @@ (src "https://audio-video.gnu.org/video/misc/2016-07__GNU_Guix_Demo_2.webm") (poster ,(guix-url "static/media/img/guix-demo.png")) (controls "controls")) - (p - "Video: " - ,(link-yellow - #:label "Demo of Guix in another GNU/Linux distribution" - #:url "https://audio-video.gnu.org/video/misc/2016-07__GNU_Guix_Demo_2.webm") - " (1 minute, 30 seconds)."))) + ,(G_ + `(p + "Video: " + ,(G_ (link-yellow + #:label "Demo of Guix in another GNU/Linux distribution" + #:url "https://audio-video.gnu.org/video/misc/\ +2016-07__GNU_Guix_Demo_2.webm")) + " (1 minute, 30 seconds).")))) (div (@ (class "info-box justify-left")) - (p - "If you don't use GNU Guix as a standalone GNU/Linux distribution, - you still can use it as a - package manager on top of any GNU/Linux distribution. This - way, you can benefit from all its conveniences.") + ,(G_ `(p + "If you don't use GNU Guix as a standalone GNU/Linux \ +distribution, you still can use it as a package manager on top of any \ +GNU/Linux distribution. This way, you can benefit from all its conveniences.")) - (p - "Guix won't interfere with the package manager that comes - with your distribution. They can live together.")) + ,(G_ `(p + "Guix won't interfere with the package manager that comes \ +with your distribution. They can live together."))) (div (@ (class "action-box centered-text")) ,(button-big - #:label "TRY IT OUT!" + #:label (C_ "button" "TRY IT OUT!") #:url (guix-url "download/") #:light #true))) ;; Latest Blog posts. (section (@ (class "centered-text")) - (h2 "Blog") + ,(G_ `(h2 "Blog")) ,@(map post-preview (context-datum context "posts")) (div (@ (class "action-box centered-text")) ,(button-big - #:label "ALL POSTS" + #:label (C_ "button" "ALL POSTS") #:url (guix-url "blog/")))) ;; Contact info. (section (@ (class "contact-box centered-text")) - (h2 "Contact") + ,(G_ `(h2 "Contact")) ,@(map contact-preview (context-datum context "contact-media")) (div (@ (class "action-box centered-text")) ,(button-big - #:label "ALL CONTACT MEDIA" + #:label (C_ "button" "ALL CONTACT MEDIA") #:url (guix-url "contact/"))))))) diff --git a/website/apps/base/templates/theme.scm b/website/apps/base/templates/theme.scm index ecb27ef..f300a8c 100644 --- a/website/apps/base/templates/theme.scm +++ b/website/apps/base/templates/theme.scm @@ -5,11 +5,12 @@ (define-module (apps base templates theme) #:use-module (apps base templates components) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (theme)) (define* (theme #:key - (lang-tag "en") + (lang-tag (car (string-split (%current-lingua) #\_))) (title '()) (description "") (keywords '()) @@ -65,12 +66,14 @@ `((doctype "html") (html - (@ (lang "en")) + (@ (lang ,(car (string-split (%current-lingua) #\_)))) (head ,(if (null? title) - `(title "GNU Guix") - `(title ,(string-join (append title '("GNU Guix")) " — "))) + `(title (C_ "webpage title" "GNU Guix")) + `(title ,(string-join (append title + (C_ "webpage title" '("GNU Guix"))) + " — "))) (meta (@ (charset "UTF-8"))) (meta (@ (name "keywords") (content ,(string-join keywords ", ")))) (meta (@ (name "description") (content ,description))) @@ -91,7 +94,7 @@ css) ;; Feeds. (link (@ (type "application/atom+xml") (rel "alternate") - (title "GNU Guix — Activity Feed") + (title (C_ "webpage title" "GNU Guix — Activity Feed")) (href ,(guix-url "feeds/blog.atom")))) (link (@ (rel "icon") (type "image/png") (href ,(guix-url "static/base/img/icon.png")))) @@ -108,17 +111,22 @@ ,(if (null? crumbs) "" (breadcrumbs crumbs)) ,content - (footer - "Made with " (span (@ (class "metta")) "♥") - " by humans and powered by " - (a (@ (class "link-yellow") (href ,(gnu-url "software/guile/"))) - "GNU Guile") ". " - (a - (@ (class "link-yellow") - (href "//git.savannah.gnu.org/cgit/guix/guix-artwork.git/tree/website")) - "Source code") - " under the " - (a - (@ (class "link-yellow") - (href ,(gnu-url "licenses/agpl-3.0.html"))) - "GNU AGPL") "."))))) + ,(G_ + `(footer + "Made with " ,(G_ `(span (@ (class "metta")) "♥")) + " by humans and powered by " + ,(G_ `(a + (@ (class "link-yellow") + (href ,(gnu-url "software/guile/"))) + "GNU Guile")) + ". " + ,(G_ `(a + (@ (class "link-yellow") + (href "//git.savannah.gnu.org/cgit/guix/guix-artwork.git/tree/website")) + "Source code")) + " under the " + ,(G_ `(a + (@ (class "link-yellow") + (href ,(gnu-url "licenses/agpl-3.0.html"))) + "GNU AGPL")) + ".")))))) -- 2.22.0