>From e3ddfc769631e8899ba8114f454502c73d8e7691 Mon Sep 17 00:00:00 2001 From: Florian Pelz
Date: Sun, 15 Sep 2019 17:15:48 +0200 Subject: [PATCH 5/8] website: Mark all files in apps for translation. * website/po/guix-website.pot: New file. * website/apps/base/utils.scm (manual-url-with-language): New procedure. (locale-display-name): New procedure. (guix-url): Use localized URLs by default. * website/apps/base/templates/components.scm (manual-href, manual-link-yellow): New procedures. (breadcrumbs, contact->shtml, navbar): Mark for translation. * website/apps/base/data.scm (contact-media, screenshots): Mark for translation. * website/apps/base/templates/about.scm (about-t): Mark for translation. * website/apps/base/templates/contact.scm (contact-t): Mark for translation. * website/apps/base/templates/contribute.scm (contribute-t): Mark for translation. * website/apps/base/templates/donate.scm (donate-t): Mark for translation. * website/apps/base/templates/graphics.scm (graphics-t): Mark for translation. * website/apps/base/templates/help.scm (help-t): Mark for translation. * website/apps/base/templates/home.scm (home-t): Mark for translation. * website/apps/base/templates/irc.scm (irc-t): Mark for translation. * website/apps/base/templates/menu.scm (menu-t): Mark for translation. * website/apps/base/templates/screenshot.scm (screenshot-t): Mark for translation. * website/apps/base/templates/security.scm (security-t): Mark for translation. * website/apps/base/templates/theme.scm (theme): Mark for translation. * website/apps/blog/templates/components.scm (post-preview, sidebar): Mark for translation. * website/apps/blog/templates/feed.scm (atom-feed-t): Mark for translation. * website/apps/blog/templates/post-list.scm (post-list-t): Mark for translation. * website/apps/blog/templates/post.scm (post-t): Mark for translation. * website/apps/blog/templates/tag.scm (tag-t): Mark for translation. * website/apps/download/data.scm (home-t): Mark for translation. * website/apps/download/templates/components.scm (system-downloads): Mark for translation. * website/apps/download/templates/download.scm (download-t): Mark for translation. * website/apps/packages/templates/components.scm (detailed-package-preview, letter-selector, sidebar, supported-systems->shtml): Mark for translation. * website/apps/packages/templates/detailed-index.scm (detailed-index-t): Mark for translation. * website/apps/packages/templates/detailed-package-list.scm (detailed-package-list-t): Mark for translation. * website/apps/packages/templates/index.scm (index-t): Mark for translation. * website/apps/packages/templates/package-list.scm (package-list-t): Mark for translation. * website/apps/packages/templates/package.scm (package-t): Mark for translation. --- website/apps/base/data.scm | 242 ++-- website/apps/base/templates/about.scm | 169 ++- website/apps/base/templates/components.scm | 102 +- website/apps/base/templates/contact.scm | 20 +- website/apps/base/templates/contribute.scm | 385 +++--- website/apps/base/templates/donate.scm | 397 +++--- website/apps/base/templates/graphics.scm | 87 +- website/apps/base/templates/help.scm | 100 +- website/apps/base/templates/home.scm | 245 ++-- website/apps/base/templates/irc.scm | 48 +- website/apps/base/templates/menu.scm | 17 +- website/apps/base/templates/screenshot.scm | 14 +- website/apps/base/templates/security.scm | 91 +- website/apps/base/templates/theme.scm | 51 +- website/apps/base/utils.scm | 49 +- website/apps/blog/templates/components.scm | 16 +- website/apps/blog/templates/feed.scm | 3 +- website/apps/blog/templates/post-list.scm | 23 +- website/apps/blog/templates/post.scm | 14 +- website/apps/blog/templates/tag.scm | 27 +- website/apps/download/data.scm | 46 +- .../apps/download/templates/components.scm | 12 +- website/apps/download/templates/download.scm | 68 +- .../apps/packages/templates/components.scm | 80 +- .../packages/templates/detailed-index.scm | 47 +- .../templates/detailed-package-list.scm | 23 +- website/apps/packages/templates/index.scm | 45 +- .../apps/packages/templates/package-list.scm | 21 +- website/apps/packages/templates/package.scm | 56 +- website/po/guix-website.pot | 1216 +++++++++++++++++ 30 files changed, 2654 insertions(+), 1060 deletions(-) create mode 100644 website/po/guix-website.pot diff --git a/website/apps/base/data.scm b/website/apps/base/data.scm index dfe65fe..1a4217c 100644 --- a/website/apps/base/data.scm +++ b/website/apps/base/data.scm @@ -1,10 +1,15 @@ ;;; GNU Guix web site +;;; Copyright © 2019 Florian Pelz ;;; Initially written by sirgazil who waves all ;;; copyright interest on this file. (define-module (apps base data) + #:use-module (apps base templates components) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) + #:use-module (srfi srfi-1) + #:use-module (sexp-xgettext) #:export (contact-media screenshots)) @@ -17,150 +22,187 @@ (list ;; The first three will be featured in the home page. (contact - #:name "IRC Channel" + #:name (G_ "IRC Channel") #:description - '(p - "Join the " (code "#guix") " channel on the Freenode IRC network to chat - with the community about GNU Guix or to get help in - real-time.") + (G_ + `(p + "Join the " (code "#guix") " channel on the Freenode IRC network to chat + with the community about GNU Guix or to get help in + real-time.")) #:url (guix-url "contact/irc/") #:log guix-irc-log-url) (contact - #:name "Info Mailing List" + #:name (G_ "Info Mailing List") #:description - '(p "Subscribe to the " (code "info-guix") " low-traffic mailing + (G_ + `(p + "Subscribe to the " (code "info-guix") " low-traffic mailing list to receive important announcements sent by the project maintainers (in -English).") +English).")) #:url "https://lists.gnu.org/mailman/listinfo/info-guix" #:log "https://lists.gnu.org/archive/html/info-guix") (contact - #:name "Help Mailing List" + #:name (G_ "Help Mailing List") #:description - `(("de" - "Melden Sie sich bei der „Help“-Mailingliste an, um per E-Mail + ;; Compute an association list from language code to blurb. + ;; If possible, look up translated blurbs from the PO file. + ;; Fall back to old hard-coded translations. + (let ((original '(G_ + "Subscribe to the Help mailing list to get support +from the GNU Guix community via email. You can post messages in English +though we also accept other languages.")) + (lang-code '(C_ "unique lingua code like en or zh-cn" "en"))) + (sort + (delete-duplicates + (append + (delete ;delete untranslated blurbs other than "en" + (cons original lang-code) + (map-in-order + (lambda (lingua) + (begin + (setlocale LC_ALL (string-append lingua ".utf8")) + (let ((out (list (gettext (string-append + (cadr lang-code) ;msgctxt + (string #\eot) ;separates msgctxt + (caddr lang-code))) ;msgid + (gettext (cadr original))))) + (setlocale LC_ALL "") + (if (string-index (car out) #\eot) ;if untranslated + (list (caddr lang-code) (cadr original)) ;use original + out)))) ;else use what has been looked up via gettext + %linguas) + (lambda (to-delete b) (and ;delete where text is equal to original + (string=? (cadar to-delete) (cadr b)) + ;; but language code is different + (not (string=? (cadddr to-delete) (car b)))))) + `(("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 -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 + ("eo" + "Subskribu al la retmesaĝolisto \"Help\" por demandi helpon pri GNU Guix al la grupo. Vi povas skribi esperantlingve.") - ("es" - "Suscríbete a la lista de correo electrónico \"Help\" por pedir + ("es" + "Suscríbete a la lista de correo electrónico \"Help\" por pedir ayuda con Guix. Puedes escribir mensajes en Español.") - ("fr" - "Abonnez-vous à la liste de diffusion « Help » pour obtenir l'aide + ("fr" + "Abonnez-vous à la liste de diffusion « Help » pour obtenir l'aide de la communauté sur 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 + ("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 + ("it" + "Iscrivetevi alla mailing list 'Help' per essere aiutati da altri utenti di Guix e GuixSD. Potete scrivere sulla mailing list anche in italiano.") - ("ja" - "メールでGNU GuixとGuixSDのコミュニティからサポートを受けるには、 + ("ja" + "メールでGNU GuixとGuixSDのコミュニティからサポートを受けるには、 「Help」のメーリングリストに登録してください。 メッセージ内容は日本語でも問題ございませんが、多言語でも受け付けております。") - ("nb" - "Meld deg på diskusjonslisten «Help» for å få råd og tips fra + ("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 + ("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.") - ("ru" - "Подпишитесь на список рассылки «Help», чтобы получить помощь от + ("ru" + "Подпишитесь на список рассылки «Help», чтобы получить помощь от сообщества GuixSD и GNU Guix по электронной почте. Вы можете писать на русском языке.") - ("zh" - "訂閱「Help」郵件群組以電郵從GuixSD及GNU Guix社群取得支援。你可以使用 -正體、繁體中文發送訊息")) - + ("zh" + "訂閱「Help」郵件群組以電郵從GuixSD及GNU Guix社群取得支援。你可以使用 +正體、繁體中文發送訊息"))) + (lambda (a b) (string=? (car a) (car b)))) + (lambda (a b) (string (car a) (car b))))) #:url "https://lists.gnu.org/mailman/listinfo/help-guix" #:log "https://lists.gnu.org/archive/html/help-guix") (contact - #:name "Bug Reporting" + #:name (G_ "Bug Reporting") #:description - '(p - "If you found a bug in Guix, check whether the bug is - already in the " - (a (@ (href "https://issues.guix.gnu.org")) - "bug database") - ". If it is not, please " - (a (@ (href "mailto:address@hidden")) "report it.")) + (G_ + `(p + "If you found a bug in Guix, check whether the bug is + already in the " + ,(G_ `(a (@ (href "https://issues.guix.gnu.org")) + "bug database")) + ". If it is not, please " + ,(G_ `(a (@ (href "mailto:address@hidden")) "report it.")))) #:url "https://lists.gnu.org/mailman/listinfo/bug-guix" #:log "https://issues.guix.gnu.org/") (contact - #:name "Development Mailing List" + #:name (G_ "Development Mailing List") #:description - '(p - "Discussion about the development of GNU Guix. " - (a (@ (href "https://lists.gnu.org/archive/html/bug-guix/2013-07/msg00039.html")) - " Until July 2013") - ", the bug-Guix mailing list filled that role. ") + (G_ + `(p + "Discussion about the development of GNU Guix. " + ,(G_ `(a (@ (href "https://lists.gnu.org/archive/html/bug-guix/2013-07/msg00039.html")) + " Until July 2013")) + ", the bug-Guix mailing list filled that role. ")) #:url "https://lists.gnu.org/mailman/listinfo/guix-devel" #:log "https://lists.gnu.org/archive/html/guix-devel") (contact - #:name "Patches Mailing List" + #:name (G_ "Patches Mailing List") #:description - `(p - "Submission of patches. Every message sent to this mailing list - leads to a new entry in our " - (a (@ (href "https://issues.guix.gnu.org")) - "patch tracking tool") - ". See " - (a (@ (href "https://debbugs.gnu.org/Advanced.html")) "this page") - " for more information on how to use it; see " - (a (@ (href ,(manual-url "Submitting-Patches.html"))) - "the manual") - " for more information on how to submit a patch. " - (a (@ (href "https://lists.gnu.org/archive/html/guix-devel/2017-02/msg00627.html")) - "Until February 2017") - ", the guix-devel mailing list filled that role.") + (G_ + `(p + "Submission of patches. Every message sent to this mailing list + leads to a new entry in our " + ,(G_ `(a (@ (href "https://issues.guix.gnu.org")) + "patch tracking tool")) + ". See " + ,(G_ `(a (@ (href "https://debbugs.gnu.org/Advanced.html")) "this page")) + " for more information on how to use it; see " + ,(G_ (manual-href "the manual" (G_ "en") (G_ "Submitting-Patches.html"))) + " for more information on how to submit a patch. " + ,(G_ + `(a (@ (href "https://lists.gnu.org/archive/html/guix-devel/2017-02/msg00627.html")) + "Until February 2017")) + ", the guix-devel mailing list filled that role.")) #:url "https://lists.gnu.org/mailman/listinfo/guix-patches" #:log "https://issues.guix.gnu.org") (contact - #:name "Commits Mailing List" + #:name (G_ "Commits Mailing List") #:description - `(p - "Notifications of commits made to the " - (a (@ (href ,(guix-url "contribute/"))) "Git repositories") - ".") + (G_ + `(p + "Notifications of commits made to the " + ,(G_ `(a (@ (href ,(guix-url "contribute/"))) "Git repositories")) + ".")) #:url "https://lists.gnu.org/mailman/listinfo/guix-commits" #:log "https://lists.gnu.org/archive/html/guix-commits") (contact - #:name "Security Mailing List" + #:name (G_ "Security Mailing List") #:description - `(p - "This is a private mailing list that anyone can post to to " - (a (@ (href ,(guix-url "security/"))) "report security issues") - " in Guix itself or in " - "the " (a (@ (href ,(guix-url "packages/"))) "packages") - " it provides. Posting here allows Guix developers to address - the problem before it is widely publicized.") + (G_ + `(p + "This is a private mailing list that anyone can post to to " + ,(G_ `(a (@ (href ,(guix-url "security/"))) "report security issues")) + " in Guix itself or in " + "the " ,(G_ `(a (@ (href ,(guix-url "packages/"))) "packages")) + " it provides. Posting here allows Guix developers to address + the problem before it is widely publicized.")) #:url "https://lists.gnu.org/mailman/listinfo/guix-security" #:log "") (contact - #:name "Sysadmin Mailing List" + #:name (G_ "Sysadmin Mailing List") #:description - '(p - "Private mailing list for the " - (a (@ (href "https://hydra.gnu.org/")) "build farm") - " system administration.") + (G_ + `(p + "Private mailing list for the " + ,(G_ `(a (@ (href "https://hydra.gnu.org/")) "build farm")) + " system administration.")) #:url "https://lists.gnu.org/mailman/listinfo/guix-sysadmin" #:log "") @@ -168,23 +210,23 @@ het Nederlands.") ;; Non-Guix lists. (contact - #:name "GNU System Discuss Mailing List" + #:name (G_ "GNU System Discuss Mailing List") #:description - '(p "Discussion about the development of the broader GNU system.") + (G_ '(p "Discussion about the development of the broader GNU system.")) #:url "https://lists.gnu.org/mailman/listinfo/gnu-system-discuss" #:log "https://lists.gnu.org/archive/html/gnu-system-discuss/") (contact - #:name "GNU/Linux-libre Mailing List" + #:name (G_ "GNU/Linux-libre Mailing List") #:description - '(p "Workgroup for fully free GNU/Linux distributions.") + (G_ '(p "Workgroup for fully free GNU/Linux distributions.")) #:url "https://lists.nongnu.org/mailman/listinfo/gnu-linux-libre" #:log "https://lists.nongnu.org/archive/html/gnu-linux-libre/") (contact - #:name "GNU Info Mailing List" + #:name (G_ "GNU Info Mailing List") #:description - '(p "GNU software announcements.") + (G_ '(p "GNU software announcements.")) #:url "https://lists.gnu.org/mailman/listinfo/info-gnu" #:log "https://lists.gnu.org/archive/html/info-gnu/"))) @@ -193,36 +235,36 @@ het Nederlands.") (define screenshots (list (screenshot - #:title "Graphical log-in" + #:title (C_ "screenshot title" "Graphical log-in") #:slug "slim" #:image (guix-url "static/media/img/gdm-sessions.png") #:preview (guix-url "static/media/img/gdm-sessions.mini.png") - #:caption "Graphical log-in screen") + #:caption (G_ "Graphical log-in screen")) (screenshot - #:title "GNOME" + #:title (C_ "screenshot title" "GNOME") #:slug "gnome" #:image (guix-url "static/media/img/gnome-totem-epiphany.png") #:preview (guix-url "static/media/img/gnome-totem-epiphany.mini.png") - #:caption "Control your computer with the GNOME desktop environment") + #:caption (G_ "Control your computer with the GNOME desktop environment")) (screenshot - #:title "Xfce" + #:title (C_ "screenshot title" "Xfce") #:slug "xfce" #:image (guix-url "static/media/img/guixsd-xfce-icecat-emacs.png") #:preview (guix-url "static/media/img/guixsd-xfce-icecat-emacs.mini.png") - #:caption "The Xfce desktop environment with GNU Emacs and IceCat") + #:caption (G_ "The Xfce desktop environment with GNU Emacs and IceCat")) (screenshot - #:title "Virtual machine" + #:title (C_ "screenshot title" "Virtual machine") #:slug "virtual-machine" #:image (guix-url "static/media/img/guix-system-vm.png") #:preview (guix-url "static/media/img/guix-system-vm.mini.png") - #:caption "Virtual machine started with 'guix system vm'") + #:caption (G_ "Virtual machine started with 'guix system vm'")) (screenshot - #:title "Enlightenment" + #:title (C_ "screenshot title" "Enlightenment") #:slug "enlightenment" #:image (guix-url "static/media/img/enlightenment-inkscape.png") #:preview (guix-url "static/media/img/enlightenment-inkscape.mini.png") - #:caption "Enlightenment, Inkscape, and Serbian text"))) + #:caption (G_ "Enlightenment, Inkscape, and Serbian text")))) diff --git a/website/apps/base/templates/about.scm b/website/apps/base/templates/about.scm index a654e2f..ab81cb2 100644 --- a/website/apps/base/templates/about.scm +++ b/website/apps/base/templates/about.scm @@ -3,105 +3,124 @@ ;;; copyright interest on this file. (define-module (apps base templates about) + #:use-module (apps base templates components) #: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 (C_ "webpage title" '("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.") + ;; TRANSLATORS: Features and Defining Packages are section names + ;; in the English (en) manual. + ,(G_ + `(p + "GNU Guix provides " + ,(G_ (manual-href "state-of-the-art package management features" + (G_ "en") + (G_ "Features.html"))) + " 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_ (manual-href "defined" (G_ "en") (G_ "Defining-Packages.html"))) + " 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") - ".") + ;; TRANSLATORS: Using the Configuration System, Initial RAM Disk + ;; and Defining Services are section names in the English (en) + ;; manual. + ,(G_ + `(p + "Guix takes that a step further by additionally supporting stateless, + reproducible " + ,(G_ (manual-href "operating system configurations" + (G_ "en") + (G_ "Using-the-Configuration-System.html"))) + ". This time the whole system is hackable in Scheme, from the " + ,(G_ (manual-href "initial RAM disk" + (G_ "en") + (G_ "Initial-RAM-Disk.html"))) + " to the " + ,(G_ `(a (@ (href ,(gnu-url "software/shepherd"))) + "initialization system")) + ", and to the " + ,(G_ (manual-href "system services" + (G_ "en") + (G_ "Defining-Services.html"))) + ".")) - (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..6b5ec21 100644 --- a/website/apps/base/templates/components.scm +++ b/website/apps/base/templates/components.scm @@ -1,4 +1,5 @@ ;;; GNU Guix web site +;;; Copyright © 2019 Florian Pelz ;;; Initially written by sirgazil who waves all ;;; copyright interest on this file. @@ -12,6 +13,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 @@ -23,6 +25,8 @@ link-more link-subtle link-yellow + manual-href + manual-link-yellow navbar page-indicator page-selector @@ -41,9 +45,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 +125,9 @@ (sxml->string* (match (contact-description contact) ((and multilingual (((? string?) (? string?)) ...)) - (match (assoc "en" multilingual) - (("en" blurb) blurb))) + (let ((code %current-lang)) + (match (assoc code multilingual) + ((code blurb) blurb)))) (blurb blurb))) 30) @@ -145,7 +150,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) @@ -216,6 +221,51 @@ `(a (@ (class "link-yellow") (href ,url)) ,label)) + + +(define (manual-href label manual-lang _1 subpath _2) + "Return an HTML a element with its href attribute pointing to the +manual. It can be marked for translation as: + + (G_ (manual-href \"some-text\" (G_ \"en\") (G_ \"Some-section.html\"))) + + LABEL (string) + The content of the a element. + + MANUAL-LANG (string) + The normalized language for the Guix manual as produced by +'doc/build.scm' in the Guix source tree, i.e. \"en\" for the English +manual. + + SUBPATH (string) + The same as in the manual-url procedure." + ;; The _ arguments are placeholders for args added by G_, cf. i18n-howto.txt. + `(a (@ (href ,(manual-url subpath #:language manual-lang))) label)) + +(define* (manual-link-yellow label manual-lang _1 #:optional (subpath "") _2) + "Return a link-yellow component pointing to the manual. It can be +used like this: + + (manual-link-yellow \"some-text\" (G_ \"en\") \"Package-Management.html\") + + LABEL (string) + The label of the link-yellow. + + MANUAL-LANG (string) + The normalized language for the Guix manual as produced by +'doc/build.scm' in the Guix source tree, i.e. \"en\" for the English +manual. + + SUBPATH (string) + The same as in the manual-url procedure." + ;; The _ arguments are placeholders for args added by G_, cf. i18n-howto.txt. + (link-yellow + #:label label + #:url (manual-url subpath #:language manual-lang))) + + + + (define* (menu-dropdown #:key (label "Item") (active-item "") (url "#") (items '())) "Return an SHTML li element representing a dropdown for the navbar. @@ -284,26 +334,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 +371,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 +395,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..44dbabb 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 (C_ "webpage title" '("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/contribute.scm b/website/apps/base/templates/contribute.scm index 4d68e87..ff12815 100644 --- a/website/apps/base/templates/contribute.scm +++ b/website/apps/base/templates/contribute.scm @@ -7,248 +7,289 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (contribute-t)) (define (contribute-t) "Return the Contribute page in SHTML." (theme - #:title '("Contribute") + #:title (C_ "webpage title" '("Contribute")) #:description - "Check all the ways you can contribute to make GNU Guix - better, and join the world-wide community of volunteers." + (G_ "Check all the ways you can contribute to make GNU Guix + better, and join the world-wide community of volunteers.") #:keywords - '("GNU" "Linux" "Unix" "Free software" "Libre software" - "Operating system" "GNU Hurd" "GNU Guix package manager" - "Volunteer" "Development" "Translation" "I18N" "L10N" - "Artwork") - #: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|Volunteer|Development|\ +Translation|I18N|L10N|Artwork") #\|) + #:active-menu-item (C_ "website menu" "About") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/item-preview.css")) - #:crumbs (list (crumb "Contribute" "./")) + #:crumbs (list (crumb (C_ "website menu" "Contribute") "./")) #:content `(main (section (@ (class "page centered-block limit-width")) - (h2 "Contribute") - - (p - "GNU Guix is a large project developed - mostly by volunteers from all around the world. You are welcome - to join us in the " - (a (@ (href "https://lists.gnu.org/mailman/listinfo/guix-devel")) - "development mailing list") - " or in the " - (a (@ (href ,(guix-url "contact/irc/"))) "#guix channel") - " in IRC Freenode. Tell us how would you like to help, and we - will do our best to guide you. ") - - (p - "We want to provide a warm, friendly, and harassment-free environment, - so that anyone can contribute to the best of their abilities. To this - end our project uses a “Contributor Covenant”, which was adapted from " - (a (@ (href "https://contributor-covenant.org/")) - "https://contributor-covenant.org/") - ". You can find the full pledge in the " - (a (@ (href "//git.savannah.gnu.org/cgit/guix.git/tree/CODE-OF-CONDUCT") - (class "mono")) - "CODE-OF-CONDUCT") " file.") + ,(G_ `(h2 "Contribute")) + + ,(G_ + `(p + "GNU Guix is a large project developed + mostly by volunteers from all around the world. You are welcome + to join us in the " + ,(G_ + `(a (@ (href "https://lists.gnu.org/mailman/listinfo/guix-devel")) + "development mailing list")) + " or in the " + ,(G_ + `(a (@ (href ,(guix-url "contact/irc/"))) "#guix channel")) + " in IRC Freenode. Tell us how would you like to help, and we + will do our best to guide you. ")) + + ,(G_ + `(p + "We want to provide a warm, friendly, and harassment-free environment, + so that anyone can contribute to the best of their abilities. To + this end our project uses a “Contributor Covenant”, which was adapted + from " + ,(G_ ((lambda (url) + `(a (@ (href ,url)) url)) + "https://contributor-covenant.org/")) + ". You can find the full pledge in the " + ,(G_ + `(a (@ (href "//git.savannah.gnu.org/cgit/guix.git/tree/CODE-OF-CONDUCT") + (class "mono")) + "CODE-OF-CONDUCT")) + " file.")) (div (@ (class "centered-text")) (div (@ (class "summary-box")) - (h3 (@ (id "pms")) "Project Management") - (p - "We use " - (a (@ (href "https://savannah.gnu.org/")) "Savannah") - " as the central point for development, maintenance and - distribution of the Guix System Distribution and GNU Guix.") - (p - "The source files for all the components of the project, - including software, web site, documentation, and artwork, are - available in " - (a (@ (href "https://savannah.gnu.org/git/?group=guix")) - "Git repositories") - " at Savannah. ") + ,(G_ `(h3 (@ (id "pms")) "Project Management")) + ,(G_ + `(p + "We use " + ,(G_ `(a (@ (href "https://savannah.gnu.org/")) "Savannah")) + " as the central point for development, maintenance and + distribution of the Guix System Distribution and GNU Guix.")) + ,(G_ + `(p + "The source files for all the components of the project, + including software, web site, documentation, and artwork, are + available in " + ,(G_ `(a (@ (href "https://savannah.gnu.org/git/?group=guix")) + "Git repositories")) + " at Savannah. ")) (p ,(link-more - #:label "Access Savannah" + #:label (G_ "Access Savannah") #:url "https://savannah.gnu.org/projects/guix"))) (div (@ (class "summary-box")) - (h3 (@ (id "art")) "Art") - (p - "We are always looking for artists to help us design and - improve user interfaces, and create multimedia material for - documentation, presentations, and promotional items. ") - (p - "The artwork used in the different components of the project - is available in the " - (a (@ (href "//git.savannah.gnu.org/cgit/guix/guix-artwork.git")) - "guix-artwork") - " repository. ") + ,(G_ `(h3 (@ (id "art")) "Art")) + ,(G_ + `(p + "We are always looking for artists to help us design and + improve user interfaces, and create multimedia material for + documentation, presentations, and promotional items. ")) + ,(G_ + `(p + "The artwork used in the different components of the project + is available in the " + ,(G_ + `(a (@ (href "//git.savannah.gnu.org/cgit/guix/guix-artwork.git")) + "guix-artwork")) + " repository. ")) (p ,(link-more - #:label "Contribute" + #:label (G_ "Contribute") #:url "https://lists.gnu.org/mailman/listinfo/guix-devel"))) (div (@ (class "summary-box")) - (h3 (@ (id "documentation")) "Documentation") - (p - "You can read the " - (a (@ (href ,(guix-url "help/"))) "project documentation") - " already available in the system and in the website, and - help us identify any errors or omissions. Creating new - manuals, tutorials, and blog entries will also help users and - developers discover what we do. ") - (p - "Helping improve the documentation of the " - (a (@ (href ,(guix-url "packages/"))) "packaged software") - " is another way to contribute. ") + ,(G_ `(h3 (@ (id "documentation")) "Documentation")) + ,(G_ + `(p + "You can read the " + ,(G_ `(a (@ (href ,(guix-url "help/"))) "project documentation")) + " already available in the system and in the website, and + help us identify any errors or omissions. Creating new + manuals, tutorials, and blog entries will also help users and + developers discover what we do. ")) + ,(G_ + `(p + "Helping improve the documentation of the " + ,(G_ `(a (@ (href ,(guix-url "packages/"))) "packaged software")) + " is another way to contribute. ")) (p ,(link-more - #:label "Start writing" + #:label (G_ "Start writing") #:url "https://lists.gnu.org/mailman/listinfo/guix-devel"))) (div (@ (class "summary-box")) - (h3 (@ (id "packages")) "Packages") - (p - "Hundreds of software, documentation, and assets need to be - packaged to make it easier for users to install their - favorite tools with the Guix package manager, and be - productive using the system. ") - (p - "Information on how to add packages to the distribution can - be found " - (a (@ (href ,(manual-url "Packaging-Guidelines.html"))) - "in the manual") - ". ") - (p - "Check out the " - (a (@ (href ,(guix-url "packages/"))) - "package database") - " for a list of available packages, and the " - (a (@ (href "//bugs.gnu.org/guix-patches")) - "patch-tracking database") - " for a list of pending submissions.") + ,(G_ `(h3 (@ (id "packages")) "Packages")) + ,(G_ + `(p + "Hundreds of software, documentation, and assets need to be + packaged to make it easier for users to install their + favorite tools with the Guix package manager, and be + productive using the system. ")) + ;; TRANSLATORS: Packaging Guidelines is a section name in the + ;; English (en) manual. + ,(G_ + `(p + "Information on how to add packages to the distribution can + be found " + ,(G_ + (manual-href + "in the manual" + (G_ "en") + (G_ "Packaging-Guidelines.html"))) + ". ")) + ,(G_ + `(p + "Check out the " + ,(G_ `(a (@ (href ,(guix-url "packages/"))) + "package database")) + " for a list of available packages, and the " + ,(G_ `(a (@ (href "//bugs.gnu.org/guix-patches")) + "patch-tracking database")) + " for a list of pending submissions.")) (p ,(link-more - #:label "Send a new package" + #:label (G_ "Send a new package") #:url "https://lists.gnu.org/mailman/listinfo/guix-patches"))) (div (@ (class "summary-box")) - (h3 (@ (id "programming")) "Programming") - (p - "Source code is in the " - (a (@ (href "//git.savannah.gnu.org/cgit/guix.git/")) - "main Git repository") - ". " - "We use " - (a (@ (href ,(gnu-url "software/guile"))) "GNU Guile") - " as the main programming and extension language for the - components of the system. ") - (p - "You will find it useful to browse the " - (a (@ (href ,(gnu-url "software/guile/manual"))) - "Guile manual") - " or other " - (a (@ (href "http://www.schemers.org/Documents/#intro-texts")) - "introductory material about Scheme") - ". Also, make sure to read the " - (a (@ (href ,(manual-url "Contributing.html"))) - "Contributing") - " section of the manual for more details on the development - setup, as well as the coding and cooperation conventions used - in the project. ") + ,(G_ `(h3 (@ (id "programming")) "Programming")) + ,(G_ + `(p + "Source code is in the " + ,(G_ `(a (@ (href "//git.savannah.gnu.org/cgit/guix.git/")) + "main Git repository")) + ". " + "We use " + ,(G_ `(a (@ (href ,(gnu-url "software/guile"))) "GNU Guile")) + " as the main programming and extension language for the + components of the system. ")) + ;; TRANSLATORS: Contributing is a section name in the English + ;; (en) manual. + ,(G_ + `(p + "You will find it useful to browse the " + ,(G_ + `(a (@ (href ,(gnu-url "software/guile/manual"))) + "Guile manual")) + " or other " + ,(G_ `(a (@ (href "http://www.schemers.org/Documents/#intro-texts")) + "introductory material about Scheme")) + ". Also, make sure to read the " + ,(G_ (manual-href "Contributing" + (G_ "en") + (G_ "Contributing.html"))) + " section of the manual for more details on the development + setup, as well as the coding and cooperation conventions used + in the project. ")) (p ,(link-more - #:label "Send a patch" + #:label (G_ "Send a patch") #:url "https://lists.gnu.org/mailman/listinfo/guix-patches"))) (div (@ (class "summary-box")) - (h3 (@ (id "sysadmin")) "System Administration") - (p - "Our system infrastructure makes it possible for all the - contributors to communicate and collaborate in the project, - and users to be able to download and install packages. Help - us keep the system up and running smoothly. ") - (p - "You can also " - (a (@ (href ,(guix-url "donate/"))) - "donate hardware or hosting") - " for our " - (a (@ (href "https://hydra.gnu.org")) "build farm") ". ") + ,(G_ `(h3 (@ (id "sysadmin")) "System Administration")) + ,(G_ + `(p + "Our system infrastructure makes it possible for all the + contributors to communicate and collaborate in the project, + and users to be able to download and install packages. Help + us keep the system up and running smoothly. ")) + ,(G_ + `(p + "You can also " + ,(G_ `(a (@ (href ,(guix-url "donate/"))) + "donate hardware or hosting")) + " for our " + ,(G_ `(a (@ (href "https://hydra.gnu.org")) "build farm")) ". ")) (p ,(link-more - #:label "Contribute" + #:label (G_ "Contribute") #:url "https://lists.gnu.org/mailman/listinfo/guix-devel"))) (div (@ (class "summary-box")) - (h3 (@ (id "testing")) "Test and Bug Reports") - (p - "Install the software and send feedback to the community - about your experience. Help the project by reporting bugs.") - (p - "Before reporting a bug, please check whether the bug is - already " - (a (@ (href "https://issues.guix.gnu.org")) - "in the bug database") - ". See " - (a (@ (href "https://debbugs.gnu.org/Developer.html")) - "the developer information page") - " for more information on how to manipulate bug reports. ") + ,(G_ `(h3 (@ (id "testing")) "Test and Bug Reports")) + ,(G_ + `(p + "Install the software and send feedback to the community + about your experience. Help the project by reporting bugs.")) + ,(G_ + `(p + "Before reporting a bug, please check whether the bug is + already " + ,(G_ `(a (@ (href "https://issues.guix.gnu.org")) + "in the bug database")) + ". See " + ,(G_ `(a (@ (href "https://debbugs.gnu.org/Developer.html")) + "the developer information page")) + " for more information on how to manipulate bug reports. ")) (p ,(link-more - #:label "Report a bug" + #:label (G_ "Report a bug") #:url "https://lists.gnu.org/mailman/listinfo/bug-guix"))) (div (@ (class "summary-box")) - (h3 (@ (id "translation")) "Translation") - (p - "You can help translate the " - (a (@ (href "https://translationproject.org/domain/guix.html")) - "software") - ", the " - (a (@ (href "https://translationproject.org/domain/guix-packages.html")) - "package descriptions") - ", and the " - (a (@ (href "https://translationproject.org/domain/guix-manual.html")) - "manual") - " into your language. See the " - (a (@ (href "https://translationproject.org/html/translators.html")) - "Translation Project") - " for information on how you can help.") - (p - (a (@ (href ,(guix-url "packages"))) "Software packages") - " provided by the system may have their own translation - tools. Visit their websites and help translate. ") - (p + ,(G_ `(h3 (@ (id "translation")) "Translation")) + ,(G_ + `(p + "You can help translate the " + ,(G_ + `(a (@ (href "https://translationproject.org/domain/guix.html")) + "software")) + ", the " + ,(G_ + `(a (@ (href "https://translationproject.org/domain/guix-packages.html")) + "package descriptions")) + ", and the " + ,(G_ + `(a (@ (href "https://translationproject.org/domain/guix-manual.html")) + "manual")) + " into your language. See the " + ,(G_ + `(a (@ (href "https://translationproject.org/html/translators.html")) + "Translation Project")) + " for information on how you can help.")) + ,(G_ + `(p + ,(G_ `(a (@ (href ,(guix-url "packages"))) "Software packages")) + " provided by the system may have their own translation + tools. Visit their websites and help translate. ")) + (p ,(link-more - #:label "Start translating" + #:label (G_ "Start translating") #:url "https://translationproject.org/")))) - (h3 (@ (id "resources")) "Other resources for contributors") - (p - "Documents, supporting material of previous talks, and - auxiliary information useful to hackers and maintainers is - available at " - (a (@ (href "//git.savannah.gnu.org/cgit/guix/maintenance.git")) - "git://git.sv.gnu.org/guix/maintenance.git") - "."))))) + ,(G_ `(h3 (@ (id "resources")) "Other resources for contributors")) + ,(G_ + `(p + "Documents, supporting material of previous talks, and + auxiliary information useful to hackers and maintainers is + available at " + (a (@ (href "//git.savannah.gnu.org/cgit/guix/maintenance.git")) + "git://git.sv.gnu.org/guix/maintenance.git") + ".")))))) diff --git a/website/apps/base/templates/donate.scm b/website/apps/base/templates/donate.scm index 8babaec..301e801 100644 --- a/website/apps/base/templates/donate.scm +++ b/website/apps/base/templates/donate.scm @@ -7,206 +7,267 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (donate-t)) (define (donate-t) "Return the Donate page in SHTML." (theme - #:title '("Donate") + #:title (C_ "webpage title" '("Donate")) #:description - "We are looking for donations of hardware and optionally hosting - for machines (they should be usable with exclusively free - software)." + (G_ "We are looking for donations of hardware and optionally + hosting for machines (they should be usable with exclusively + free software).") #:keywords - '("GNU" "Linux" "Unix" "Free software" "Libre software" - "Operating system" "GNU Hurd" "GNU Guix package manager" - "Donations") - #:active-menu-item "Donate" + (string-split ;TRANSLATORS: |-separated list of webpage keywords + (G_ "GNU|Linux|Unix|Free software|Libre software|Operating \ +system|GNU Hurd|GNU Guix package manager|Donations") #\|) + #:active-menu-item (C_ "website menu" "Donate") #:css (list (guix-url "static/base/css/page.css")) - #:crumbs (list (crumb "Donate" "./")) + #:crumbs (list (crumb (C_ "website menu" "Donate") "./")) #:content `(main (section (@ (class "page centered-block limit-width")) - (h2 "Donate") + ,(G_ `(h2 "Donate")) - (p - "The " - (a (@ (href "https://hydra.gnu.org/jobset/gnu/master")) - "build farm") - " of the Guix System Distribution runs on donated hardware and" - " hosting. As the distribution grows (see the " - (a (@ (href ,(guix-url "packages/"))) "package list") - "), so do the computing and storage needs.") + ,(G_ + `(p + "The " + ,(G_ + `(a (@ (href "https://hydra.gnu.org/jobset/gnu/master")) + "build farm")) + " of the Guix System Distribution runs on donated hardware and" + " hosting. As the distribution grows (see the " + ,(G_ `(a (@ (href ,(guix-url "packages/"))) "package list")) + "), so do the computing and storage needs.")) - (p - "We have " - (a (@ (href "https://savannah.gnu.org/forum/forum.php?forum_id=8423")) - "started a fundraising campaign") - " to strengthen our build farm, with " - (a (@ (href "https://www.fsf.org/blogs/community/fsf-announces-support-for-gnu-guix")) - "support from the Free Software Foundation (FSF)") - ". Please consider helping out by making a donation on this - FSF-hosted page:") + ,(G_ + `(p + "We have " + ,(G_ + `(a (@ (href "https://savannah.gnu.org/forum/forum.php?forum_id=8423")) + "started a fundraising campaign")) + " to strengthen our build farm, with " + ,(G_ + `(a (@ (href "https://www.fsf.org/blogs/community/fsf-announces-support-for-gnu-guix")) + "support from the Free Software Foundation (FSF)")) + ". Please consider helping out by making a donation on this + FSF-hosted page:")) (p (@ (class "centered-text")) ,(button-big - #:label "♥ DONATE!" + #:label (C_ "button" "♥ DONATE!") #:url "https://my.fsf.org/civicrm/contribute/transact?reset=1&id=50")) - (h3 - (@ (id "hardware-and-hosting")) - "Hardware and Hosting") + ,(G_ + `(h3 + (@ (id "hardware-and-hosting")) + "Hardware and Hosting")) - (p - "We are also looking for donations of hardware and optionally - hosting for the following kinds of machines (they should be - usable with exclusively free software): ") + ,(G_ + `(p + "We are also looking for donations of hardware and optionally + hosting for the following kinds of machines (they should be + usable with exclusively free software): ")) (ul - (li "x86_64 machines, with on the order of 1\xa0TiB of storage - and 4\xa0GiB of RAM;") - (li "armv7 machines (such as the Novena) to more quickly test - and provide binaries for the armhf-linux port;") - (li "mips64el machines to strengthen this port.")) + ,(G_ + `(li "x86_64 machines, with on the order of 1\xa0TiB of storage + and 4\xa0GiB of RAM;")) + ,(G_ + `(li "armv7 machines (such as the Novena) to more quickly test + and provide binaries for the armhf-linux port;")) + ,(G_ + `(li "mips64el machines to strengthen this port."))) - (p - "Please get in touch with us through the " - (a (@ (href ,(guix-url "contact/"))) "usual channels") - " or using the " (b "address@hidden") " private alias to - discuss any opportunities. ") + ,(G_ + `(p + "Please get in touch with us through the " + ,(G_ `(a (@ (href ,(guix-url "contact/"))) "usual channels")) + " or using the " (b "address@hidden") " private alias to + discuss any opportunities. ")) - (h3 - (@ (id "hardware-donors")) - "Thanks to the donors!") + ,(G_ + `(h3 + (@ (id "hardware-donors")) + "Thanks to the donors!")) - (p - "The table below summarizes hardware and hosting donations that - make the " (a (@ (href "https://hydra.gnu.org")) "build farm") - " for the Guix System Distribution a reality.") + ,(G_ + `(p + "The table below summarizes hardware and hosting donations that + make the " ,(G_ `(a (@ (href "https://hydra.gnu.org")) "build farm")) + " for the Guix System Distribution a reality.")) (div (@ (class "table-box")) (table (thead - (tr (th "machine") - (th "system") - (th "donors"))) + ,(G_ `(tr ,(G_ `(th "machine")) + ,(G_ `(th "system")) + ,(G_ `(th "donors"))))) (tbody - (tr - (td "hydra.gnu.org") - (td "build farm front-end") - (td - (ul - (li - (a (@ (href "https://www.fsf.org/")) - "Free Software Foundation"))))) - (tr - (td "berlin.guixsd.org") - (td "build farm with 25 build nodes for x86_64-linux and -i686-linux, and dedicated storage") - (td - (ul - (li - (a (@ (href "https://www.mdc-berlin.de/")) - "Max Delbrück Center for Molecular Medicine") - " (hardware and hosting)")))) - (tr - (td "overdrive1.guixsd.org") - (td "aarch64-linux") - (td - (ul - (li (a (@ (href "https://www.arm.com/")) - "ARM Holdings") " (hardware)")))) - (tr - (td "bayfront.guixsd.org") - (td "new build farm front-end (WIP)") - (td - (ul - (li - (a (@ (href ,(guix-url "news/growing-our-build-farm.html"))) - "Igalia"))))) - (tr - (td "hydra.gnunet.org") - (td "x86_64-linux, i686-linux") - (td (ul (li (a (@ (href "https://gnunet.org/fsnsg")) - "Free Secure Network Systems Group") - " at the " - (a (@ (href "https://www.tum.de/")) - "Technische Universität München"))))) - (tr - (td "chapters.gnu.org") - (td "x86_64-linux, i686-linux") - (td - (ul - (li (a (@ (href "https://es.gnu.org")) - "GNU\xa0España") " (hardware)") - (li (a (@ (href "https://fsffrance.org/index.en.html")) - "FSF\xa0France") - " (hosting)")))) - (tr - (td "librenote") - (td "mips64el-linux") - (td (ul (li "Daniel Clark (hardware)") - (li "Mark H Weaver (hosting)")))) - (tr - (td "hydra-slave0") - (td "mips64el-linux") - (td - (ul - (li (a (@ (href "https://www.fsf.org/")) - "Free Software Foundation"))))) - (tr - (td "guix.sjd.se") - (td "x86_64-linux, i686-linux") - (td - (ul - (li (a (@ (href "http://josefsson.org")) - "Simon Josefsson"))))) - (tr - (td "x15.sjd.se") - (td "armhf-linux") - (td - (ul - (li (a (@ (href "http://josefsson.org")) - "Simon Josefsson"))))) - (tr - (td "hydra-slave1") - (td "armhf-linux") - (td - (ul - (li "Steve Sprang (hardware)") - ;; XXX: Eventually move to the FSF? - (li "Mark H Weaver (hosting)")))) - (tr - (td "hydra-slave2") - (td "armhf-linux") - (td - (ul - (li (a (@ (href "http://harmoninstruments.com/")) - "Harmon Instruments") - " (hardware)") - ;; XXX: Eventually move to the FSF? - (li "Mark H Weaver (hosting)")))) - (tr - (td "hydra-slave3") - (td "armhf-linux") - (td - (ul - (li (a (@ (href "http://www.kosagi.com/w/index.php?title=Novena_Main_Page")) - "Kosagi (Sutajio Ko-Usagi Pte Ltd)") - " (hardware)") - (li "Mark H Weaver (hosting)")))) - (tr - (td "redhill") - (td "armhf-linux") - (td - (ul - (li (a (@ (href "http://www.kosagi.com/w/index.php?title=Novena_Main_Page")) - "Kosagi (Sutajio Ko-Usagi Pte Ltd)") - " (hardware)") - (li "Andreas Enge (hosting)"))))))))))) + ,(G_ `(tr + ,(G_ `(td "hydra.gnu.org")) + ,(G_ `(td "build farm front-end")) + ,(G_ ((lambda (content) + `(td + (ul + (li + (a (@ (href "https://www.fsf.org/")) + ,content))))) + "Free Software Foundation")))) + ,(G_ `(tr + ,(G_ `(td "berlin.guixsd.org")) + ,(G_ `(td "build farm with 25 build nodes for x86_64-linux and +i686-linux, and dedicated storage")) + ,(G_ ((lambda content + `(td + (ul + (li + ,@content)))) + (G_ `(a (@ (href "https://www.mdc-berlin.de/")) + "Max Delbrück Center for Molecular Medicine")) + " (hardware and hosting)")))) + ,(G_ `(tr + ,(G_ `(td "overdrive1.guixsd.org")) + ,(G_ `(td "aarch64-linux")) + ,(G_ ((lambda content + `(td + (ul + (li + ,@content)))) + (G_ `(a (@ (href "https://www.arm.com/")) + "ARM Holdings") " (hardware)"))))) + ,(G_ + `(tr + ,(G_ `(td "bayfront.guixsd.org")) + ,(G_ `(td "new build farm front-end (WIP)")) + ,(G_ ((lambda (content) + `(td + (ul + (li + (a + (@ (href ,(guix-url "news/growing-our-build-farm.html"))) + ,content))))) + "Igalia")))) + ,(G_ `(tr + ,(G_ `(td "hydra.gnunet.org")) + ,(G_ `(td "x86_64-linux, i686-linux")) + ,(G_ ((lambda content + `(td + (ul + (li + ,@content)))) + (G_ `(a (@ (href "https://gnunet.org/fsnsg")) + "Free Secure Network Systems Group")) + " at the " + (G_ `(a (@ (href "https://www.tum.de/")) + "Technische Universität München")))))) + ,(G_ `(tr + ,(G_ `(td "chapters.gnu.org")) + ,(G_ `(td "x86_64-linux, i686-linux")) + ,(G_ ((lambda content + `(td + (ul + ,@content))) + (G_ `(li + ,(G_ `(a (@ (href "https://es.gnu.org")) + "GNU\xa0España")) + " (hardware)")) + (G_ `(li + ,(G_ `(a (@ (href "https://fsffrance.org/index.en.html")) + "FSF\xa0France")) + " (hosting)")))))) + ,(G_ `(tr + ,(G_ `(td "librenote")) + ,(G_ `(td "mips64el-linux")) + ,(G_ ((lambda content + `(td + (ul + ,@content))) + (G_ `(li "Daniel Clark (hardware)")) + (G_ `(li "Mark H Weaver (hosting)")))))) + ,(G_ `(tr + ,(G_ `(td "hydra-slave0")) + ,(G_ `(td "mips64el-linux")) + ,(G_ ((lambda (content) + `(td + (ul + (li + (a (@ (href "https://www.fsf.org/")) + ,content))))) + "Free Software Foundation")))) + ,(G_ `(tr + ,(G_ `(td "guix.sjd.se")) + ,(G_ `(td "x86_64-linux, i686-linux")) + ,(G_ ((lambda (content) + `(td + (ul + (li + (a (@ (href "http://josefsson.org")) + ,content))))) + "Simon Josefsson")))) + ,(G_ `(tr + ,(G_ `(td "x15.sjd.se")) + ,(G_ `(td "armhf-linux")) + ,(G_ ((lambda (content) + `(td + (ul + (li + (a (@ (href "http://josefsson.org")) + ,content))))) + "Simon Josefsson")))) + ,(G_ `(tr + ,(G_ `(td "hydra-slave1")) + ,(G_ `(td "armhf-linux")) + ,(G_ ((lambda content + `(td + (ul + ,@content))) + (G_ `(li "Steve Sprang (hardware)")) + ;; XXX: Eventually move to the FSF? + (G_ `(li "Mark H Weaver (hosting)")))))) + ,(G_ `(tr + ,(G_ `(td "hydra-slave2")) + ,(G_ `(td "armhf-linux")) + ,(G_ ((lambda content + `(td + (ul + ,@content))) + (G_ `(li + ,(G_ `(a (@ (href "http://harmoninstruments.com/")) + "Harmon Instruments")) + " (hardware)")) + ;; XXX: Eventually move to the FSF? + (G_ `(li "Mark H Weaver (hosting)")))))) + ,(G_ + `(tr + ,(G_ `(td "hydra-slave3")) + ,(G_ `(td "armhf-linux")) + ,(G_ ((lambda content + `(td + (ul + ,@content))) + (G_ `(li + ,(G_ `(a (@ (href "http://www.kosagi.com/w/index.php?title=Novena_Main_Page")) + "Kosagi (Sutajio Ko-Usagi Pte Ltd)")) + " (hardware)")) + (G_ `(li "Mark H Weaver (hosting)")))))) + ,(G_ + `(tr + ,(G_ `(td "redhill")) + ,(G_ `(td "armhf-linux")) + ,(G_ ((lambda content + `(td + (ul + ,@content))) + (G_ `(li + ,(G_ `(a (@ (href "http://www.kosagi.com/w/index.php?title=Novena_Main_Page")) + "Kosagi (Sutajio Ko-Usagi Pte Ltd)")) + " (hardware)")) + (G_ `(li "Andreas Enge (hosting)"))))))))))))) diff --git a/website/apps/base/templates/graphics.scm b/website/apps/base/templates/graphics.scm index 80b6532..6c1d70f 100644 --- a/website/apps/base/templates/graphics.scm +++ b/website/apps/base/templates/graphics.scm @@ -6,66 +6,73 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (graphics-t)) (define (graphics-t) "Return the Graphics page in SHTML." (theme - #:title '("Graphics") + #:title (C_ "webpage title" '("Graphics")) #:description - "Information about images used for the graphical identity of - GNU Guix and Guix System (formerly “GuixSD”)." + (G_ "Information about images used for the graphical identity + of GNU Guix and Guix System (formerly “GuixSD”).") #:keywords - '("GNU" "Linux" "Unix" "Free software" "Libre software" - "Operating system" "GNU Hurd" "GNU Guix package manager" - "Branding" "Logo") - #: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|Donations|Branding|Logo") #\|) + #:active-menu-item (C_ "website menu" "About") #:css (list (guix-url "static/base/css/page.css")) - #:crumbs (list (crumb "Graphics" "./")) + #:crumbs (list (crumb (C_ "website menu" "Graphics") "./")) #:content `(main (section (@ (class "page centered-block limit-width")) - (h2 "Graphics") + ,(G_ `(h2 "Graphics")) - (p - "For questions regarding the graphics listed in this page, - please contact " - (a (@ (href "https://lists.gnu.org/mailman/listinfo/help-guix")) - ("address@hidden")) - ".") + ,(G_ + `(p + "For questions regarding the graphics listed in this page, + please contact " + ,(G_ `(a (@ (href "https://lists.gnu.org/mailman/listinfo/help-guix")) + "address@hidden")) + ".")) (p (@ (class "centered-text")) (img (@ (src ,(guix-url "static/base/img/Guix.png")) - (alt "GNU Guix logotype")))) - (p - "The standalone Guix, formerly known as the “Guix System - Distribution” or GuixSD, had its own logo, which is now - deprecated.") + ,(G_ `(alt "GNU Guix logotype"))))) + ,(G_ + `(p + "The standalone Guix, formerly known as the “Guix System + Distribution” or GuixSD, had its own logo, which is now + deprecated.")) - (p - "The GNU Guix and GuixSD - logotypes were designed by Luis Felipe López Acevedo - (a.k.a. sirgazil). They are available under the following - terms:") + ,(G_ + `(p + "The GNU Guix and GuixSD + logotypes were designed by Luis Felipe López Acevedo + (a.k.a. sirgazil). They are available under the following + terms:")) (blockquote (p "Copyright © 2015 Luis Felipe López Acevedo") (p - "Permission is granted to copy, distribute and/or modify this + "Permission is granted to copy, distribute and/or modify this work under the terms of the " - (a (@ (href "https://creativecommons.org/licenses/by-sa/4.0/")) - "Creative Commons Attribution-ShareAlike 4.0 International License") - ".")) - (p - "The source files (SVG) for these logotypes, their variants, and - other artwork used in the different components of the GNU Guix - project are available in the " - (a (@ (href "//git.savannah.gnu.org/cgit/guix/guix-artwork.git/tree/logo")) - "guix-artwork") - " repository, including the previous GNU Guix logotype designed - by Nikita Karetnikov in 2013 and " - (a (@ (href "https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25205")) - "superseded") - " by the golden GNU in 2016."))))) + `(a (@ (href "https://creativecommons.org/licenses/by-sa/4.0/")) + "Creative Commons Attribution-ShareAlike 4.0 International License") + ".")) + ,(G_ + `(p + "The source files (SVG) for these logotypes, their variants, and + other artwork used in the different components of the GNU Guix + project are available in the " + ,(G_ + `(a (@ (href "//git.savannah.gnu.org/cgit/guix/guix-artwork.git/tree/logo")) + "guix-artwork")) + " repository, including the previous GNU Guix logotype designed + by Nikita Karetnikov in 2013 and " + ,(G_ + `(a (@ (href "https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25205")) + "superseded")) + " by the golden GNU in 2016.")))))) diff --git a/website/apps/base/templates/help.scm b/website/apps/base/templates/help.scm index 8117957..c9d6ab2 100644 --- a/website/apps/base/templates/help.scm +++ b/website/apps/base/templates/help.scm @@ -7,31 +7,32 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (help-t)) (define (help-t) "Return the Help page in SHTML." (theme - #:title '("Help") + #:title (C_ "webpage title" '("Help")) #:description - "A list of resources about how to use GNU Guix, plus + (G_ "A list of resources about how to use GNU Guix, plus information about getting help from the community of users and - developers." + developers.") #:keywords - '("GNU" "Linux" "Unix" "Free software" "Libre software" - "Operating system" "GNU Hurd" "GNU Guix package manager" - "Help resources") - #:active-menu-item "Help" + (string-split ;TRANSLATORS: |-separated list of webpage keywords + (G_ "GNU|Linux|Unix|Free software|Libre software|Operating \ +system|GNU Hurd|GNU Guix package manager|Help resources") #\|) + #:active-menu-item (C_ "website menu" "Help") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/item-preview.css")) - #:crumbs (list (crumb "Help" "./")) + #:crumbs (list (crumb (C_ "website menu" "Help") "./")) #:content `(main (section (@ (class "page")) - (h2 "Help") + ,(G_ `(h2 "Help")) (div (@ (class "centered-text")) @@ -42,24 +43,25 @@ (img (@ (src ,(guix-url "static/base/img/manual-icon.png")) (alt ""))) - (h3 "GNU Guix Manual") - (p - "Documentation for GNU Guix is available - online. You may also find more information about Guix by running " - (code "info guix") ".") - (p - ,(link-more #:label "Read Guix manual" - #:url (guix-url "manual/en"))) + ,(G_ `(h3 "GNU Guix Manual")) + ,(G_ + `(p + "Documentation for GNU Guix is available + online. You may also find more information about Guix by running " + ,(G_ `(code "info guix")) ".")) (p - (a (@ (href ,(guix-url "manual/de"))) "Deutsch") " | " - (a (@ (href ,(guix-url "manual/en"))) "English") " | " - (a (@ (href ,(guix-url "manual/es"))) "español") " | " - (a (@ (href ,(guix-url "manual/fr"))) "français") " | " - (a (@ (href ,(guix-url "manual/ru"))) "русский") " | " - (a (@ (href ,(guix-url "manual/zh-cn"))) "简体中文")) + ,(link-more #:label (G_ "Read Guix manual") + #:url (guix-url "manual/en" #:localize #f))) + (p + (a (@ (href ,(guix-url "manual/de" #:localize #f))) "Deutsch") " | " + (a (@ (href ,(guix-url "manual/en" #:localize #f))) "English") " | " + (a (@ (href ,(guix-url "manual/es" #:localize #f))) "español") " | " + (a (@ (href ,(guix-url "manual/fr" #:localize #f))) "français") " | " + (a (@ (href ,(guix-url "manual/ru" #:localize #f))) "русский") " | " + (a (@ (href ,(guix-url "manual/zh-cn" #:localize #f))) "简体中文")) ,(link-more - #:label "Get Guix reference card" + #:label (G_ "Get Guix reference card") #:url (guix-url "guix-refcard.pdf"))) @@ -67,15 +69,16 @@ (@ (class "summary-box")) (img (@ (src ,(guix-url "static/base/img/library-icon.png")) (alt ""))) - (h3 "GNU Manuals") - (p - "Guix is a distribution of the " - (a (@ (href ,(gnu-url))) "GNU operating system") - ". Documentation for GNU packages is - available online in various formats. ") + ,(G_ `(h3 "GNU Manuals")) + ,(G_ + `(p + "Guix is a distribution of the " + ,(G_ `(a (@ (href ,(gnu-url))) "GNU operating system")) + ". Documentation for GNU packages is + available online in various formats. ")) (p ,(link-more - #:label "Browse GNU manuals" + #:label (G_ "Browse GNU manuals") #:url (gnu-url "manual")))) @@ -83,18 +86,20 @@ (@ (class "summary-box")) (img (@ (src ,(guix-url "static/base/img/chat-icon.png")) (alt ""))) - (h3 "IRC Chat") - (p - "For real-time support from the community, you can connect - to the " (code "#guix") " channel on irc.freenode.net. There - you can get help about anything related to GNU Guix.") - (p - "The " (code "#guix") " channel is logged. Previous - conversations can be browsed online. See the " - (a (@ (href ,guix-irc-log-url)) "channel logs") ". ") + ,(G_ `(h3 "IRC Chat")) + ,(G_ + `(p + "For real-time support from the community, you can connect + to the " (code "#guix") " channel on irc.freenode.net. There + you can get help about anything related to GNU Guix.")) + ,(G_ + `(p + "The " (code "#guix") " channel is logged. Previous + conversations can be browsed online. See the " + ,(G_ `(a (@ (href ,guix-irc-log-url)) "channel logs")) ". ")) (p ,(link-more - #:label "Connect" + #:label (G_ "Connect") #:url (guix-url "contact/irc/")))) @@ -102,13 +107,14 @@ (@ (class "summary-box")) (img (@ (src ,(guix-url "static/base/img/email-icon.png")) (alt ""))) - (h3 "Mailing lists") - (p - "Email support from the community is also available through - several mailing list. The messages sent to the lists are - public and archived online.") + ,(G_ `(h3 "Mailing lists")) + ,(G_ + `(p + "Email support from the community is also available through + several mailing list. The messages sent to the lists are + public and archived online.")) (p ,(link-more - #:label "See all lists" + #:label (G_ "See all lists") #:url (guix-url "contact/"))))))))) diff --git a/website/apps/base/templates/home.scm b/website/apps/base/templates/home.scm index 5cb3bf5..f0f889e 100644 --- a/website/apps/base/templates/home.scm +++ b/website/apps/base/templates/home.scm @@ -8,24 +8,27 @@ #: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 (C_ "webpage title" + '("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 +37,94 @@ ;; 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"))) + ". ")) + + ;; TRANSLATORS: Package Management, Features and Using the + ;; Configuration System are section names in the English (en) + ;; manual. + ,(G_ + `(li + ,(G_ `(b "Dependable.")) + " Guix " + ,(G_ (manual-link-yellow "supports" + (G_ "en") + (G_ "Package-Management.html"))) + " transactional upgrades and roll-backs, unprivileged \ +package management, " + ,(G_ (manual-link-yellow "and more" + (G_ "en") + (G_ "Features.html"))) + ". When used as a standalone distribution, Guix supports " + ,(G_ (manual-link-yellow "declarative system configuration" + (G_ "en") + (G_ "Using-the-Configuration-System.html"))) + " for transparent and reproducible operating systems.")) + + ;; TRANSLATORS: Defining Packages and System Configuration are + ;; section names in the English (en) manual. + ,(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_ (manual-link-yellow "define packages" + (G_ "en") + (G_ "Defining-Packages.html"))) + " and " + ,(G_ (manual-link-yellow "whole-system configurations" + (G_ "en") + (G_ "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 +133,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 +192,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/irc.scm b/website/apps/base/templates/irc.scm index c21f77e..5674d1f 100644 --- a/website/apps/base/templates/irc.scm +++ b/website/apps/base/templates/irc.scm @@ -6,45 +6,49 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (irc-t)) (define (irc-t) "Return the Kiwi IRC widget page in SHTML." (theme - #:title '("IRC" "Contact") + #:title + (list (C_ "webpage title" "IRC") + (C_ "webpage title" "Contact")) #:description - "Internet relay chat." + (G_ "Internet relay chat.") #:keywords - '("GNU" "Linux" "Unix" "Free software" "Libre software" - "Operating system" "GNU Hurd" "GNU Guix package manager" - "IRC" "chat") + (string-split ;TRANSLATORS: |-separated list of webpage keywords + (G_ "GNU|Linux|Unix|Free software|Libre software|Operating \ +system|GNU Hurd|GNU Guix package manager|IRC|chat") #\|) #:active-menu-item "About" #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/irc.css")) - #:crumbs (list (crumb "Contact" (guix-url "contact/")) - (crumb "IRC" "./")) + #:crumbs (list (crumb (C_ "webpage title" "Contact") (guix-url "contact/")) + (crumb (C_ "webpage title" "IRC") "./")) #:content `(main (section (@ (class "page")) - (h2 "IRC") + ,(G_ `(h2 "IRC")) - (p - (@ (class "centered-block limit-width")) - "Join the " (code "#guix") " channel on the " - (a (@ (href "https://en.wikipedia.org/wiki/Freenode")) - "Freenode IRC network") - " to chat with the GNU Guix community or to get help - in real-time. You can use the chat widget below, or just use - the " - (a (@ (href "https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients")) - "IRC client") - " of your preference. Note that the conversations that happen - on the " (code "#guix") " channel are logged (" - (a (@ (href ,guix-irc-log-url)) "browse the log") - ").") + ,(G_ + `(p + (@ (class "centered-block limit-width")) + "Join the " (code "#guix") " channel on the " + ,(G_ `(a (@ (href "https://en.wikipedia.org/wiki/Freenode")) + "Freenode IRC network")) + " to chat with the GNU Guix community or to get help + in real-time. You can use the chat widget below, or just use + the " + ,(G_ `(a (@ (href "https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients")) + "IRC client")) + " of your preference. Note that the conversations that happen + on the " (code "#guix") " channel are logged (" + ,(G_ `(a (@ (href ,guix-irc-log-url)) "browse the log")) + ").")) (iframe (@ (class "chat-widget centered-block") diff --git a/website/apps/base/templates/menu.scm b/website/apps/base/templates/menu.scm index b87387f..ce6b54e 100644 --- a/website/apps/base/templates/menu.scm +++ b/website/apps/base/templates/menu.scm @@ -6,17 +6,20 @@ #:use-module (apps base templates components) #:use-module (apps base templates theme) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (menu-t)) (define (menu-t) "Return the Menu page in SHTML." (theme - #:title '("Menu") - #:description "Website menu." - #: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 "Menu" + #:title (C_ "webpage title" '("Menu")) + #:description (G_ "Website menu.") + #:keywords + (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" "Menu") #:css (list (guix-url "static/base/css/menu.css")))) diff --git a/website/apps/base/templates/screenshot.scm b/website/apps/base/templates/screenshot.scm index 41a3a07..60662fa 100644 --- a/website/apps/base/templates/screenshot.scm +++ b/website/apps/base/templates/screenshot.scm @@ -7,6 +7,7 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (screenshot-t)) @@ -15,14 +16,15 @@ (let ((shot (context-datum context "screenshot")) (shots (context-datum context "screenshots"))) (theme - #:title (list (screenshot-title shot) "Screenshots") + #:title (list (screenshot-title shot) (C_ "webpage title" "Screenshots")) #:description (screenshot-caption shot) #: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/index.css") (guix-url "static/base/css/screenshots.css")) #:content diff --git a/website/apps/base/templates/security.scm b/website/apps/base/templates/security.scm index b772912..d28b548 100644 --- a/website/apps/base/templates/security.scm +++ b/website/apps/base/templates/security.scm @@ -3,9 +3,11 @@ ;;; copyright interest on this file. (define-module (apps base templates security) + #:use-module (apps base templates components) #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:export (security-t)) (define ludovics-key @@ -14,36 +16,38 @@ (define (security-t) "Return the Security page in SHTML." (theme - #:title '("Security") + #:title (C_ "webpage title" '("Security")) #:description - "Important information about getting security updates for your - GNU Guix installation, and instructions on how to report - security issues." + (G_ "Important information about getting security updates + for your GNU Guix installation, and instructions on how + to report security issues.") #:keywords - '("GNU" "Linux" "Unix" "Free software" "Libre software" - "Operating system" "GNU Hurd" "GNU Guix package manager" - "Security updates") - #: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|Security updates") #\|) + #:active-menu-item (C_ "website menu" "About") #:css (list (guix-url "static/base/css/page.css")) - #:crumbs (list (crumb "Security" "./")) + #:crumbs (list (crumb (C_ "website menu" "Security") "./")) #:content `(main (section (@ (class "page centered-block limit-width")) - (h2 "Security") + ,(G_ `(h2 "Security")) - (h3 "How to report security issues") - (p - "To report sensitive security issues in Guix itself or the - packages it provides, you can write to the private mailing list " - (a (@ (href "https://lists.gnu.org/mailman/listinfo/guix-security")) - ("address@hidden")) ". This list is monitored by a - small team of Guix developers.") - (p - "If you prefer to send your report using OpenPGP encrypted email, - please send it to one of the following Guix developers using their - respective OpenPGP key:") + ,(G_ `(h3 "How to report security issues")) + ,(G_ + `(p + "To report sensitive security issues in Guix itself or the + packages it provides, you can write to the private mailing list " + (a (@ (href "https://lists.gnu.org/mailman/listinfo/guix-security")) + ("address@hidden")) ". This list is monitored by a + small team of Guix developers.")) + ,(G_ + `(p + "If you prefer to send your report using OpenPGP encrypted email, + please send it to one of the following Guix developers using their + respective OpenPGP key:")) (ul (li "Leo Famulari" (ul (@ (class "mono")) @@ -58,23 +62,30 @@ (ul (@ (class "mono")) (li "BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC")))) - (h3 "Release signatures") - (p - "Releases of Guix are signed using the OpenPGP " - "key with the fingerprint " - (span (@ (class "mono")) ,ludovics-key) - ". " - "Users should " - (a (@ (href ,(manual-url "Binary-Installation.html"))) "verify") - " their downloads before extracting or running them.") + ,(G_ `(h3 "Release signatures")) + ,(G_ + `(p + "Releases of Guix are signed using the OpenPGP " + "key with the fingerprint " + (span (@ (class "mono")) ,ludovics-key) + ". " + "Users should " + ,(G_ (manual-href "verify" + (G_ "en") + (G_ "Binary-Installation.html"))) + " their downloads before extracting or running them.")) - (h3 "Security updates") - (p - "When security vulnerabilities are found in Guix or the " - "packages provided by Guix, we will provide " - (a (@ (href ,(manual-url "Security-Updates.html"))) "security updates") - " quickly and with minimal disruption for users.") - (p - "Guix uses a “rolling release” model. All security " - "bug-fixes are pushed directly to the master branch. There" - " is no “stable” branch that only receives security fixes."))))) + ,(G_ `(h3 "Security updates")) + ,(G_ + `(p + "When security vulnerabilities are found in Guix or the " + "packages provided by Guix, we will provide " + ,(G_ (manual-href "security updates" + (G_ "en") + (G_ "Security-Updates.html"))) + " quickly and with minimal disruption for users.")) + ,(G_ + `(p + "Guix uses a “rolling release” model. All security " + "bug-fixes are pushed directly to the master branch. There" + " is no “stable” branch that only receives security fixes.")))))) diff --git a/website/apps/base/templates/theme.scm b/website/apps/base/templates/theme.scm index ecb27ef..e33c0d3 100644 --- a/website/apps/base/templates/theme.scm +++ b/website/apps/base/templates/theme.scm @@ -5,15 +5,16 @@ (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 %current-ietf-tag) (title '()) (description "") (keywords '()) - (active-menu-item "About") + (active-menu-item (C_ "website menu" "About")) (css '()) (scripts '()) (crumbs '()) @@ -23,7 +24,8 @@ LANG-TAG (string) IETF language tag. This is used to specify the language of the document. For example: en, en-CA. If not provided, the value - defaults to English (en). + defaults to the currently built language, i.e. the + %current-ietf-tag from (apps i18n). TITLE (list) A list of strings to form the value of the title element of the @@ -65,12 +67,14 @@ `((doctype "html") (html - (@ (lang "en")) + (@ (lang lang-tag)) (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 +95,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 +112,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")) + ".")))))) diff --git a/website/apps/base/utils.scm b/website/apps/base/utils.scm index d57ec7c..4201bf6 100644 --- a/website/apps/base/utils.scm +++ b/website/apps/base/utils.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Mathieu Lirzin ;;; Copyright © 2013 Alex Sassmannshausen ;;; Copyright © 2017 Eric Bavier +;;; Copyright © 2019 Florian Pelz ;;; Initially written by sirgazil who waives all copyright interest on this ;;; file. ;;; @@ -25,6 +26,7 @@ #:use-module (apps aux lists) #:use-module (apps aux system) #:use-module (apps base types) + #:use-module (apps i18n) #:use-module (haunt page) #:use-module (ice-9 i18n) #:use-module (ice-9 match) @@ -34,7 +36,9 @@ guix-irc-log-url guix-url latest-guix-version + locale-display-name manual-url + manual-url-with-language number* paginate)) @@ -51,6 +55,14 @@ (define latest-guix-version (make-parameter "1.0.1")) +(define (locale-display-name) + "Return the display name of the current locale." + ;; TRANSLATORS: The locale’s display name; please include a country + ;; code like in English (US) *only* if there are multiple + ;; Translation Project teams for the same language. + (let ((str '(G_ "English (US)"))) + (gettext (cadr str)))) + ;;; @@ -83,20 +95,24 @@ (string-append "https://git.savannah.gnu.org/cgit/guix.git/tree/" subpath)) -(define* (guix-url #:optional (subpath "")) +(define* (guix-url #:optional (subpath "") #:key (localize #t)) "Append SUBPATH to GNU Guix root URL path (see guix-root-url-path). SUBPATH (string) An optional relative URL path to a resource in the GNU Guix path. For example: 'packages/icecat-XYZ/'. + LOCALIZE (boolean) + Whether to call localize-url on the URL path. + RETURN VALUE (string) A URL path. For example: /software/guix/packages/icecat-XYZ/." - ;; If we are trying out the website locally, use "/" as the root. - ;; Otherwise use guix-root-url-path for deployment to gnu.org. - (if (getenv "GUIX_WEB_SITE_LOCAL") - (string-append "/" subpath) - (string-append (guix-root-url-path) subpath))) + ((if localize localize-url identity) + ;; If we are trying out the website locally, use "/" as the root. + ;; Otherwise use guix-root-url-path for deployment to gnu.org. + (if (getenv "GUIX_WEB_SITE_LOCAL") + (string-append "/" subpath) + (string-append (guix-root-url-path) subpath)))) (define* (manual-url #:optional (subpath "") @@ -115,6 +131,27 @@ "/html_node/") subpath)))) +(define* (manual-url-with-language _ language #:optional (subpath "")) + "Shorthand for manual-url without keywords for prettier output +PO files when marked for translation. It can be marked for translation +as: + + (G_ (manual-url-with-language (G_ \"en\") (G_ \"Some-section.html\"))) + + LANGUAGE (string) + Normalized language for the Guix manual as produced by +'doc/build.scm' in the Guix source tree, i.e. \"en\" for the English +manual. + + SUBPATH (string) + Like manual-url. + + RETURN VALUE (string) + A URL path. For example: + /software/guix/manual/en/html_node/System-installation.html." + ;; The _ argument is a placeholder for an arg added by G_, cf. i18n-howto.txt. + (manual-url subpath #:language language)) + ;;; diff --git a/website/apps/blog/templates/components.scm b/website/apps/blog/templates/components.scm index fe67f29..38d02ac 100644 --- a/website/apps/blog/templates/components.scm +++ b/website/apps/blog/templates/components.scm @@ -8,6 +8,7 @@ #:use-module (apps aux web) #:use-module (apps base utils) #:use-module (apps blog utils) + #:use-module (apps i18n) #:use-module (haunt post) #:use-module (srfi srfi-19) #:export (post-preview @@ -29,11 +30,12 @@ (h3 ,(post-ref post 'title)) (p (@ (class "item-date")) - ,(date->string (post-date post) "~B ~e, ~Y")) + ,(date->string (post-date post) (C_ "SRFI-19 date->string format" + "~B ~e, ~Y"))) (p (@ (class "item-summary")) ,(string-summarize (sxml->string* (post-sxml post)) 30) - "…"))) + (C_ "blog post summary ellipsis" "…")))) (define* (sidebar tags #:optional (current-tag #false)) @@ -44,13 +46,13 @@ Haunt's 'posts/group-by-tag' procedure in (haunt post) module." `(section (@ (class "side-bar")) - (h3 (@ (class "a11y-offset")) "Blog menu: ") + (h3 (@ (class "a11y-offset")) (G_ "Blog menu: ")) (h4 (@ (class "bar-title bar-title-top")) ,(if current-tag - "Get topic updates" - "Get blog updates")) + (G_ "Get topic updates") + (G_ "Get blog updates"))) (ul (@ (class "bar-list")) (li (@ (class "bar-item")) @@ -62,9 +64,9 @@ (slugify current-tag) ".atom")))) `(href ,(guix-url (url-path-join "feeds" "blog.atom"))))) - " Atom feed"))) + (C_ "button" "Atom feed")))) - (h4 (@ (class "bar-title")) "Posts by topic") + (h4 (@ (class "bar-title")) (G_ "Posts by topic")) (ul (@ (class "bar-list")) ,@(map diff --git a/website/apps/blog/templates/feed.scm b/website/apps/blog/templates/feed.scm index 5e015d0..0392345 100644 --- a/website/apps/blog/templates/feed.scm +++ b/website/apps/blog/templates/feed.scm @@ -10,6 +10,7 @@ #:use-module (apps base types) #:use-module (apps base utils) #:use-module (apps blog utils) + #:use-module (apps i18n) #:use-module (haunt html) #:use-module (haunt post) #:use-module (srfi srfi-19) @@ -28,7 +29,7 @@ (@ (xmlns "http://www.w3.org/2005/Atom")) (id ,id) (title ,title) - (author (name "GNU Guix") (uri ,domain)) + (author (name (C_ "feed author name" "GNU Guix")) (uri ,domain)) (icon ,(guix-url "static/base/img/icon.png")) (updated ,(date->string (current-date) "~4")) (link (@ (rel "alternate") (href ,alternate))) diff --git a/website/apps/blog/templates/post-list.scm b/website/apps/blog/templates/post-list.scm index a64e33a..5b3f73f 100644 --- a/website/apps/blog/templates/post-list.scm +++ b/website/apps/blog/templates/post-list.scm @@ -9,6 +9,7 @@ #:use-module (apps base types) #:use-module (apps base utils) #:use-module ((apps blog templates components) #:prefix blog:) + #:use-module (apps i18n) #:export (post-list-t)) @@ -19,22 +20,24 @@ (total-pages (number->string (context-datum context "total-pages")))) (theme - #:title (list (string-append "Page " page-number) "Blog") + #:title (list (G_ (string-append "Page " page-number "")) + (C_ "webpage title" "Blog")) #:description - "Blog posts about GNU Guix." + (G_ "Blog posts about GNU Guix.") #: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 "Blog" + (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" "Blog") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/item-preview.css") (guix-url "static/base/css/sidebar.css")) #:crumbs - (list (crumb "Blog" (guix-url "blog/")) - (crumb (string-append "Page " page-number) + (list (crumb (C_ "website menu" "Blog") (guix-url "blog/")) + (crumb (G_ (string-append "Page " page-number "")) (guix-url (url-path-join "blog" "page" page-number @@ -43,7 +46,7 @@ `(main (section (@ (class "page centered-text")) - (h2 "Blog" + (h2 (G_ "Blog") ,(page-indicator (string->number page-number) (string->number total-pages))) diff --git a/website/apps/blog/templates/post.scm b/website/apps/blog/templates/post.scm index fe90ba0..2871431 100644 --- a/website/apps/blog/templates/post.scm +++ b/website/apps/blog/templates/post.scm @@ -9,6 +9,7 @@ #:use-module (apps base utils) #:use-module (apps blog utils) #:use-module ((apps blog templates components) #:prefix blog:) + #:use-module (apps i18n) #:use-module (haunt post) #:use-module (srfi srfi-19) #:export (post-t)) @@ -21,17 +22,17 @@ (theme #:title (list (post-ref post 'title) (date->string (post-date post) "~Y") - "Blog") + (C_ "webpage title" "Blog")) #:description - "Blog posts about GNU Guix." + (G_ "Blog posts about GNU Guix.") #:keywords tags - #:active-menu-item "Blog" + #:active-menu-item (C_ "website menu" "Blog") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/code.css") (guix-url "static/blog/css/post.css")) #:crumbs - (list (crumb "Blog" (guix-url "blog/")) + (list (crumb (C_ "website menu" "Blog") (guix-url "blog/")) (crumb (post-ref post 'title) (guix-url (post-url-path post)))) #:content @@ -42,13 +43,14 @@ (p (@ (class "post-metadata centered-text")) ,(post-ref post 'author) " — " - ,(date->string (post-date post) "~B ~e, ~Y")) + ,(date->string (post-date post) (C_ "SRFI-19 date->string format" + "~B ~e, ~Y"))) ,(syntax-highlight (post-sxml post)) (div (@ (class "tag-list")) - (p "Related topics:") + ,(G_ `(p "Related topics:")) ,@(map (lambda (tag) diff --git a/website/apps/blog/templates/tag.scm b/website/apps/blog/templates/tag.scm index 7d9c88b..7bd7570 100644 --- a/website/apps/blog/templates/tag.scm +++ b/website/apps/blog/templates/tag.scm @@ -10,6 +10,7 @@ #:use-module (apps base utils) #:use-module ((apps blog templates components) #:prefix blog:) #:use-module (apps blog utils) + #:use-module (apps i18n) #:export (tag-t)) @@ -21,25 +22,27 @@ (total-pages (number->string (context-datum context "total-pages")))) (theme - #:title (list (string-append "Page " page-number) tag "Blog") + #:title (list (G_ (string-append "Page " page-number "")) + tag (C_ "webpage title" "Blog")) #:description - (string-append "Blog posts about " - tag - " on GNU Guix.") + (G_ (string-append "Blog posts about " + tag + " on GNU Guix.")) #: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 "Blog" + (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" "Blog") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/item-preview.css") (guix-url "static/base/css/sidebar.css")) #:crumbs - (list (crumb "Blog" (guix-url "blog/")) + (list (crumb (C_ "website menu" "Blog") (guix-url "blog/")) (crumb tag (guix-url (tag-url-path tag))) - (crumb (string-append "Page " page-number) + (crumb (G_ (string-append "Page " page-number "")) (guix-url (url-path-join (tag-url-path tag) "page" page-number @@ -48,7 +51,7 @@ `(main (section (@ (class "page centered-text")) - (h2 "Blog — " ,tag + (h2 ,(G_ "Blog — ") ,tag ,(page-indicator (string->number page-number) (string->number total-pages))) diff --git a/website/apps/download/data.scm b/website/apps/download/data.scm index 8e432db..34c50df 100644 --- a/website/apps/download/data.scm +++ b/website/apps/download/data.scm @@ -5,6 +5,7 @@ (define-module (apps download data) #:use-module (apps base utils) #:use-module (apps download types) + #:use-module (apps i18n) #:export (system-downloads)) @@ -16,34 +17,44 @@ (define system-downloads (list (download - #:title (string-append "GNU Guix System " (latest-guix-version)) + #:title (C_ "download page title" + (string-append "GNU Guix System " (latest-guix-version) "")) #:description `(div - (p "USB/DVD ISO installer of the standalone Guix System.")) + ,(G_ `(p "USB/DVD ISO installer of the standalone Guix System."))) #:image (guix-url "static/base/img/GuixSD-package.png") #:base-url (string-append "https://ftp.gnu.org/gnu/guix/guix-system-install-" (latest-guix-version) ".") #:variants (list (variant "x86_64" "x86_64-linux.iso.xz") (variant "i686" "i686-linux.iso.xz")) - #:manual (manual-url "System-Installation.html")) + ;; TRANSLATORS: System installation is a section name in the + ;; English (en) manual. + #:manual (G_ (manual-url-with-language (G_ "en") + "System-Installation.html"))) (download - #:title (string-append "GNU Guix " (latest-guix-version) " QEMU Image") + #:title (C_ "download page title" + (string-append "GNU Guix " (latest-guix-version) " QEMU Image")) #:description `(div - (p "QCOW2 virtual machine (VM) image.")) + ,(G_ `(p "QCOW2 virtual machine (VM) image."))) #:image (guix-url "static/base/img/QEMU-package.png") #:base-url (string-append "https://ftp.gnu.org/gnu/guix/guix-system-vm-image-" (latest-guix-version) ".") #:variants (list (variant "x86_64" "x86_64-linux.xz")) - #:manual (manual-url "Running-Guix-in-a-VM.html")) + ;; TRANSLATORS: Running Guix in a VM is a section name in the + ;; English (en) manual. + #:manual (G_ (manual-url-with-language (G_ "en") + "Running-Guix-in-a-VM.html"))) (download - #:title (string-append "GNU Guix " (latest-guix-version) " Binary") + #:title (C_ "download page title" + (string-append "GNU Guix " (latest-guix-version) " Binary")) #:description - '(p - "Self-contained tarball providing binaries for Guix and its - dependencies, to be installed on top of your Linux-based system.") + (G_ + '(p + "Self-contained tarball providing binaries for Guix and its + dependencies, to be installed on top of your Linux-based system.")) #:image (guix-url "static/base/img/Guix-package.png") #:base-url (string-append "https://ftp.gnu.org/gnu/guix/guix-binary-" (latest-guix-version) ".") @@ -51,13 +62,20 @@ (variant "i686" "i686-linux.tar.xz") (variant "armhf" "armhf-linux.tar.xz") (variant "aarch64" "aarch64-linux.tar.xz")) - #:manual (manual-url "Binary-Installation.html")) + ;; TRANSLATORS: Binary Installation is a section name in the + ;; English (en) manual. + #:manual (G_ (manual-url-with-language (G_ "en") + "Binary-Installation.html"))) (download - #:title (string-append "GNU Guix " (latest-guix-version) " Source") - #:description '(p "Source code distribution.") + #:title (C_ "download page title" + (string-append "GNU Guix " (latest-guix-version) " Source")) + #:description (G_ '(p "Source code distribution.")) #:image (guix-url "static/base/img/src-package.png") #:base-url (string-append "https://ftp.gnu.org/gnu/guix/guix-" (latest-guix-version) ".") #:variants (list (variant "tarball" "tar.gz")) - #:manual (manual-url "Requirements.html")))) + ;; TRANSLATORS: Requirements is a section name in the English (en) + ;; manual. + #:manual (G_ (manual-url-with-language (G_ "en") + "Requirements.html"))))) diff --git a/website/apps/download/templates/components.scm b/website/apps/download/templates/components.scm index bbd46b0..60e7330 100644 --- a/website/apps/download/templates/components.scm +++ b/website/apps/download/templates/components.scm @@ -4,6 +4,7 @@ (define-module (apps download templates components) #:use-module (apps download types) + #:use-module (apps i18n) #:export (download)) @@ -21,7 +22,7 @@ (img (@ (src ,(download-image dnd)) (alt ""))) (h3 ,(download-title dnd)) ,(download-description dnd) - (p "Download options:") + ,(G_ `(p "Download options:")) ,@(map (lambda (variant) `(a (@ (class "download-btn") @@ -34,7 +35,7 @@ (download-variants dnd)) (p - "Signatures: " + ,(G_ "Signatures: ") ,@(map (lambda (variant) `(a (@ (class "signature-btn") @@ -46,4 +47,9 @@ " ")) ; Force a space for readability in non-CSS browsers. (download-variants dnd))) - (p (a (@ (href ,(download-manual dnd))) "Installation instructions") "."))) + ,(G_ + `(p + ,(G_ + `(a (@ (href ,(download-manual dnd))) + "Installation instructions")) + ".")))) diff --git a/website/apps/download/templates/download.scm b/website/apps/download/templates/download.scm index f888a0b..ffa6ce0 100644 --- a/website/apps/download/templates/download.scm +++ b/website/apps/download/templates/download.scm @@ -23,56 +23,60 @@ #:use-module (apps base types) #:use-module (apps base utils) #:use-module (apps download templates components) + #:use-module (apps i18n) #:export (download-t)) (define (download-t context) "Return the Download page in SHTML." (theme - #:title '("Download") + #:title (C_ "webpage title" '("Download")) #:description - "Installers and source files for GNU Guix. GNU Guix can be - installed on different GNU/Linux distributions." + (G_ "Installers and source files for GNU Guix. GNU Guix can be + installed on different GNU/Linux distributions.") #:keywords - '("GNU" "Linux" "Unix" "Free software" "Libre software" - "Operating system" "GNU Hurd" "GNU Guix package manager" - "Installer" "Source code" "Package manager") - #:active-menu-item "Download" + (string-split ;TRANSLATORS: |-separated list of webpage keywords + (G_ "GNU|Linux|Unix|Free software|Libre software|Operating \ +system|GNU Hurd|GNU Guix package manager|Installer|Source code|\ +Package manager") #\|) + #:active-menu-item (C_ "website menu" "Download") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/download.css")) - #:crumbs (list (crumb "Download" "./")) + #:crumbs (list (crumb (C_ "website menu" "Download") "./")) #:content `(main (section (@ (class "page")) - (h2 "Download") + ,(G_ `(h2 "Download")) - (p - (@ (class "centered-block limit-width")) - "As of version " ,(latest-guix-version) - ", the standalone Guix System " - (a - (@ (href ,(manual-url "System-Installation.html"))) - "can be installed") - " on an i686, x86_64, ARMv7, or AArch64 machine. It uses the " - (a (@ (href ,(gnu-url "software/linux-libre"))) "Linux-Libre") - " kernel and the " - (a (@ (href ,(gnu-url "software/shepherd"))) "GNU Shepherd") - " init system. Alternately, GNU Guix - can be installed as an additional package manager on top of an - installed Linux-based system.") + ,(G_ + `(p + (@ (class "centered-block limit-width")) + "As of version " ,(latest-guix-version) + ", the standalone Guix System " + ,(G_ `(a + (@ (href ,(manual-url "System-Installation.html"))) + "can be installed")) + " on an i686, x86_64, ARMv7, or AArch64 machine. It uses the " + ,(G_ `(a (@ (href ,(gnu-url "software/linux-libre"))) "Linux-Libre")) + " kernel and the " + ,(G_ `(a (@ (href ,(gnu-url "software/shepherd"))) "GNU Shepherd")) + " init system. Alternately, GNU Guix + can be installed as an additional package manager on top of an + installed Linux-based system.")) (div (@ (class "centered-text")) ,@(map download (context-datum context "downloads"))) - (p - (@ (class "centered-block limit-width")) - "Source code and binaries for the Guix System distribution ISO - image as well as GNU Guix can be found on the GNU servers at " - (a (@ (href "https://ftp.gnu.org/gnu/guix/")) - "https://ftp.gnu.org/gnu/guix/") - ". Older releases can still be found on " - (a (@ (href "https://alpha.gnu.org/gnu/guix/")) - "alpha.gnu.org") "."))))) + ,(G_ + `(p + (@ (class "centered-block limit-width")) + "Source code and binaries for the Guix System distribution ISO + image as well as GNU Guix can be found on the GNU servers at " + (a (@ (href "https://ftp.gnu.org/gnu/guix/")) + "https://ftp.gnu.org/gnu/guix/") + ". Older releases can still be found on " + (a (@ (href "https://alpha.gnu.org/gnu/guix/")) + "alpha.gnu.org") ".")))))) diff --git a/website/apps/packages/templates/components.scm b/website/apps/packages/templates/components.scm index 96e4296..926ec0b 100644 --- a/website/apps/packages/templates/components.scm +++ b/website/apps/packages/templates/components.scm @@ -8,6 +8,7 @@ #:use-module (apps aux web) #:use-module (apps base templates components) #:use-module (apps base utils) + #:use-module (apps i18n) #:use-module (apps packages data) #:use-module (apps packages types) #:use-module (apps packages utils) @@ -55,37 +56,38 @@ ;; 'gnu-package?' might fetch stuff from the network. Assume #f if that ;; doesn't work. ,(if (false-if-exception (gnu-package? package)) - '(p (i "This is a GNU package. ")) + `(p (i ,(G_ "This is a GNU package. "))) "") ,(package-description-shtml package)) (ul (@ (class "package-info")) - (li (b "License:") " " - ,(license->shtml (package-license package)) - ".") - - (li (b "Website:") " " - ,(link-subtle #:label (package-home-page package) - #:url (package-home-page package)) ".") - - (li (b "Package source:") " " - ,(location->shtml (package-location package)) - ".") - - (li (b "Patches:") " " - ,(patches->shtml (package-patches package)) - ".") - - (li (b "Lint issues:") " " - ,(if (null? (package-lint-issues package)) - "No" - (link-subtle #:label "Yes" - #:url (guix-url "packages/issues/"))) - ".") - - (li (b "Builds:") " " ,(supported-systems->shtml package) ".") + ,(G_ `(li ,(G_ `(b "License:")) " " + ,(license->shtml (package-license package)) + ".")) + + ,(G_ `(li ,(G_ `(b "Website:")) " " + ,(link-subtle #:label (package-home-page package) + #:url (package-home-page package)) ".")) + + ,(G_ `(li ,(G_ `(b "Package source:")) " " + ,(location->shtml (package-location package)) + ".")) + + ,(G_ `(li ,(G_ `(b "Patches:")) " " + ,(patches->shtml (package-patches package)) + ".")) + + ,(G_ `(li ,(G_ `(b "Lint issues:")) " " + ,(if (null? (package-lint-issues package)) + (G_ "No") + (link-subtle #:label (G_ "Yes") + #:url (guix-url "packages/issues/"))) + ".")) + + ,(G_ `(li ,(G_ `(b "Builds:")) " " + ,(supported-systems->shtml package) ".")) "\n"))) @@ -99,7 +101,7 @@ A span element if the count is 0. A mark element otherwise." `(,(if (> count 0) 'mark 'span) ,(number->string count) - ,(if (= count 1) " issue" " issues"))) + ,(N_ " issue" " issues" count))) (define* (letter-selector #:optional (active-letter "")) @@ -110,10 +112,10 @@ The letter that should be displayed as active." `(section (@ (class "letter-selector")) - (h3 (@ (class "a11y-offset")) "Packages menu: ") + ,(G_ `(h3 (@ (class "a11y-offset")) "Packages menu: ")) - (h4 (@ (class "selector-title selector-title-top")) - "Browse alphabetically") + ,(G_ `(h4 (@ (class "selector-title selector-title-top")) + "Browse alphabetically")) (div (@ (class "selector-box-padded")) ,@(map @@ -199,7 +201,7 @@ If the list of patches is empty, return the string 'None'. Otherwise, return a list of links to patches." (if (null? patches) - "None" + (G_ "None") (separate (map (lambda (patch) (link-subtle #:label (ilink-name patch) @@ -216,9 +218,9 @@ The letter in which the current packages are listed." `(section (@ (class "side-bar")) - (h3 (@ (class "a11y-offset")) "Packages menu: ") + ,(G_ `(h3 (@ (class "a11y-offset")) "Packages menu: ")) - (h4 (@ (class "bar-title bar-title-top")) "Browse alphabetically") + ,(G_ `(h4 (@ (class "bar-title bar-title-top")) "Browse alphabetically")) (div (@ (class "bar-box-padded")) ,@(map @@ -233,16 +235,16 @@ ;; FIXME: This is currently too costly to produce so we just disable it. - ;; (h4 (@ (class "bar-title")) "Packages Issues") + ;; ,(G_ `(h4 (@ (class "bar-title")) "Packages Issues")) ;; (ul ;; (@ (class "bar-list")) ;; (li (@ (class "bar-item")) - ;; (a (@ (class "bar-link") - ;; (href ,(guix-url "packages/issues/lint/"))) "Lint")) + ;; ,(G_ `(a (@ (class "bar-link") + ;; (href ,(guix-url "packages/issues/lint/"))) "Lint"))) ;; (li (@ (class "bar-item")) - ;; (a (@ (class "bar-link") - ;; (href ,(guix-url "packages/issues/reproducibility/"))) - ;; "Reproducibility"))) + ;; ,(G_ `(a (@ (class "bar-link") + ;; (href ,(guix-url "packages/issues/reproducibility/"))) + ;; "Reproducibility")))) )) @@ -265,7 +267,7 @@ %hydra-supported-systems (package-transitive-supported-systems package)))) (if (null? systems) - "None" + (G_ "None") (separate (map (lambda (system) (link-subtle #:label system diff --git a/website/apps/packages/templates/detailed-index.scm b/website/apps/packages/templates/detailed-index.scm index 81dfdd6..68dc9de 100644 --- a/website/apps/packages/templates/detailed-index.scm +++ b/website/apps/packages/templates/detailed-index.scm @@ -8,6 +8,7 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:use-module (apps packages templates components) #:use-module (srfi srfi-19) #:export (detailed-index-t)) @@ -18,39 +19,45 @@ packages to advertise." (let ((packages (context-datum context "packages"))) (theme - #:title (list "Packages") + #:title (C_ "webpage title" (list "Packages")) #:description - "List of packages available through GNU Guix." + (G_ "List of packages available through GNU Guix.") #:keywords - (list "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 "Packages" + (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" "Packages") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/item-preview.css") (guix-url "static/packages/css/letter-selector.css") (guix-url "static/packages/css/package-list.css")) #:crumbs - (list (crumb "Packages" (guix-url "packages/"))) + (list (crumb (C_ "website menu" "Packages") (guix-url "packages/"))) #:content `(main (section (@ (class "page centered-text")) - (h2 "Packages") + ,(G_ `(h2 "Packages")) - (p - (@ (class "limit-width centered-block")) - "GNU Guix provides " ,(number* (or total (length packages))) - " packages transparently " - (a (@ (href "https://hydra.gnu.org/jobset/gnu/master#tabs-status")) - "available as pre-built binaries") - ". These pages provide a complete list of the packages. Our " - (a (@ (href "https://hydra.gnu.org/jobset/gnu/master")) - "continuous integration system") - " shows their current build status " - "(updated " ,(date->string (current-date) "~B ~e, ~Y") ").") + ,(G_ + `(p + (@ (class "limit-width centered-block")) + "GNU Guix provides " ,(number* (or total (length packages))) + " packages transparently " + ,(G_ + `(a (@ (href "https://hydra.gnu.org/jobset/gnu/master#tabs-status")) + "available as pre-built binaries")) + ". These pages provide a complete list of the packages. Our " + ,(G_ + `(a (@ (href "https://hydra.gnu.org/jobset/gnu/master")) + "continuous integration system")) + " shows their current build status " + "(updated " ,(date->string (current-date) + (C_ "SRFI-19 date->string format" + "~B ~e, ~Y")) ").")) (div (@ (class "sheet sheet-padded justify-left")) diff --git a/website/apps/packages/templates/detailed-package-list.scm b/website/apps/packages/templates/detailed-package-list.scm index c0a60de..9b23ed1 100644 --- a/website/apps/packages/templates/detailed-package-list.scm +++ b/website/apps/packages/templates/detailed-package-list.scm @@ -8,6 +8,7 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:use-module (apps packages templates components) #:export (detailed-package-list-t)) @@ -20,15 +21,17 @@ (total-pages (number->string (context-datum context "total-pages")))) (theme - #:title (list (string-append "Page " page-number) letter "Packages") + #:title (list (G_ (string-append "Page " page-number "")) + letter (C_ "webpage title" "Packages")) #:description - "List of packages available through GNU Guix." + (G_ "List of packages available through GNU Guix.") #: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 "Packages" + (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" "Packages") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/item-preview.css") @@ -37,11 +40,11 @@ #:scripts (list (guix-url "static/packages/js/build-status.js")) #:crumbs - (list (crumb "Packages" (guix-url "packages/")) + (list (crumb (C_ "website menu" "Packages") (guix-url "packages/")) (crumb letter (guix-url (url-path-join "packages" letter ""))) - (crumb (string-append "Page " page-number) + (crumb (G_ (string-append "Page " page-number "")) (guix-url (url-path-join "packages" "page" page-number @@ -50,7 +53,7 @@ `(main (section (@ (class "page centered-text")) - (h2 "Packages — " ,letter + (h2 (G_ "Packages — ") ,letter ,(page-indicator (string->number page-number) (string->number total-pages))) diff --git a/website/apps/packages/templates/index.scm b/website/apps/packages/templates/index.scm index afd10d9..aa0a91d 100644 --- a/website/apps/packages/templates/index.scm +++ b/website/apps/packages/templates/index.scm @@ -8,6 +8,7 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:use-module (apps packages templates components) #:use-module (srfi srfi-19) #:export (index-t)) @@ -18,37 +19,43 @@ (let ((packages (context-datum context "packages")) (total (context-datum context "total"))) (theme - #:title (list "Packages") + #:title (C_ "webpage title" (list "Packages")) #:description - "List of packages available through GNU Guix." + (G_ "List of packages available through GNU Guix.") #:keywords - (list "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 "Packages" + (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" "Packages") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/item-preview.css") (guix-url "static/packages/css/letter-selector.css")) #:crumbs - (list (crumb "Packages" (guix-url "packages/"))) + (list (crumb (C_ "website menu" "Packages") (guix-url "packages/"))) #:content `(main (section (@ (class "page centered-text")) - (h2 "Packages") + ,(G_ `(h2 "Packages")) - (p - (@ (class "limit-width centered-block")) - "GNU Guix provides " ,(number* total) " packages transparently " - (a (@ (href "https://hydra.gnu.org/jobset/gnu/master#tabs-status")) - "available as pre-built binaries") - ". These pages provide a complete list of the packages. Our " - (a (@ (href "https://hydra.gnu.org/jobset/gnu/master")) - "continuous integration system") - " shows their current build status " - "(updated " ,(date->string (current-date) "~B ~e, ~Y") ").") + ,(G_ + `(p + (@ (class "limit-width centered-block")) + "GNU Guix provides " ,(number* total) " packages transparently " + ,(G_ + `(a (@ (href "https://hydra.gnu.org/jobset/gnu/master#tabs-status")) + "available as pre-built binaries")) + ". These pages provide a complete list of the packages. Our " + ,(G_ + `(a (@ (href "https://hydra.gnu.org/jobset/gnu/master")) + "continuous integration system")) + " shows their current build status " + "(updated " ,(date->string (current-date) + (C_ "SRFI-19 date->string format" + "~B ~e, ~Y")) ").")) (div (@ (class "sheet")) diff --git a/website/apps/packages/templates/package-list.scm b/website/apps/packages/templates/package-list.scm index e047812..d77ed17 100644 --- a/website/apps/packages/templates/package-list.scm +++ b/website/apps/packages/templates/package-list.scm @@ -8,6 +8,7 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:use-module (apps packages templates components) #:export (package-list-t)) @@ -20,25 +21,27 @@ (total-pages (number->string (context-datum context "total-pages")))) (theme - #:title (list (string-append "Page " page-number) letter "Packages") + #:title (list (G_ (string-append "Page " page-number "")) + letter (C_ "webpage title" "Packages")) #:description "List of packages available through GNU Guix." #: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 "Packages" + (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" "Packages") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/base/css/item-preview.css") (guix-url "static/packages/css/letter-selector.css")) #:crumbs - (list (crumb "Packages" (guix-url "packages/")) + (list (crumb (C_ "website menu" "Packages") (guix-url "packages/")) (crumb letter (guix-url (url-path-join "packages" letter ""))) - (crumb (string-append "Page " page-number) + (crumb (G_ (string-append "Page " page-number "")) (guix-url (url-path-join "packages" "page" page-number @@ -47,7 +50,7 @@ `(main (section (@ (class "page centered-text")) - (h2 "Packages — " ,letter + (h2 (G_ "Packages — ") ,letter ,(page-indicator (string->number page-number) (string->number total-pages))) diff --git a/website/apps/packages/templates/package.scm b/website/apps/packages/templates/package.scm index 9dfb2fa..814700f 100644 --- a/website/apps/packages/templates/package.scm +++ b/website/apps/packages/templates/package.scm @@ -8,6 +8,7 @@ #:use-module (apps base templates theme) #:use-module (apps base types) #:use-module (apps base utils) + #:use-module (apps i18n) #:use-module (apps packages templates components) #:use-module (apps packages types) #:use-module (apps packages utils) @@ -24,19 +25,20 @@ (package-version package))) (lint-issues (package-lint-issues package))) (theme - #:title (list package-id "Packages") + #:title (C_ "webpage title" (list package-id "Packages")) #:description (package-synopsis-shtml package) #: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 "Packages" + (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" "Packages") #:css (list (guix-url "static/base/css/page.css") (guix-url "static/packages/css/package.css")) #:crumbs - (list (crumb "Packages" (guix-url "packages/")) + (list (crumb (C_ "website menu" "Packages") (guix-url "packages/")) (crumb package-id (guix-url (package-url-path package)))) #:content @@ -51,31 +53,35 @@ ;; 'gnu-package?' might fetch stuff from the network. Assume #f if ;; that doesn't work. (p ,(if (false-if-exception (gnu-package? package)) - '(it "This is a GNU package. ") + (G_ '(it "This is a GNU package. ")) "") ,(package-description-shtml package)) (ul (@ (class "package-info")) - (li (b "Website: ") - (a (@ (href ,(package-home-page package))) - ,(package-home-page package))) - (li (b "License: ") - ,(license->shtml (package-license package))) - (li (b "Package source: ") - ,(location->shtml (package-location package))) - (li (b "Patches: ") - ,(patches->shtml (package-patches package))) - (li (b "Builds: ") - ,(supported-systems->shtml package))) + ,(G_ `(li ,(G_ `(b "Website: ")) + (a (@ (href ,(package-home-page package))) + ,(package-home-page package)))) + ,(G_ `(li ,(G_ `(b "License: ")) + ,(license->shtml (package-license package)))) + ,(G_ `(li ,(G_ `(b "Package source: ")) + ,(location->shtml (package-location package)))) + ,(G_ `(li ,(G_ `(b "Patches: ")) + ,(patches->shtml (package-patches package)))) + ,(G_ `(li ,(G_ `(b "Builds: ")) + ,(supported-systems->shtml package)))) ;; Lint issues. ,(if (null? lint-issues) "" - `((h3 "Lint issues") - (p - ,(issue-count->shtml (length lint-issues)) ". " - "See " (a (@ (href "#")) "package definition") - " in Guix source code.") + (G_ `(,(G_ `(h3 "Lint issues")) + ,(G_ + `(p + "" + ,(issue-count->shtml + (length lint-issues)) + ". " + "See " ,(G_ `(a (@ (href "#")) "package definition")) + " in Guix source code.")) - ,@(map lint-issue->shtml lint-issues)))))))) + ,@(map lint-issue->shtml lint-issues))))))))) diff --git a/website/po/guix-website.pot b/website/po/guix-website.pot new file mode 100644 index 0000000..350ca1b --- /dev/null +++ b/website/po/guix-website.pot @@ -0,0 +1,1216 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Ludovic Courtès +# This file is distributed under the same license as the guix-website package. +# FIRST AUTHOR