From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: Re: Website translation Date: Fri, 26 Jul 2019 13:11:56 +0200 Message-ID: <20190726111155.qospxvrw7rnuwtok@pelzflorian.localdomain> References: <20190712053539.htszj5w2b2sxws64@pelzflorian.localdomain> <875zo43dt2.fsf@gnu.org> <20190714142625.my2n7ypimctk3vbd@pelzflorian.localdomain> <87ims3o4tm.fsf@gnu.org> <20190715155414.y6lv45rv55ihvzs5@pelzflorian.localdomain> <87muhc8iqi.fsf@gnu.org> <20190718150836.kzf2tmbtng5l42ta@pelzflorian.localdomain> <87h87jffd7.fsf@elephly.net> <20190718202831.4vavgrmogrkpdote@pelzflorian.localdomain> <20190719122952.an6yr6azie4x3xjg@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ifowlwrbqzqklseo" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34498) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqy8t-0004Lx-5O for guix-devel@gnu.org; Fri, 26 Jul 2019 07:12:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqy8m-00013A-Ty for guix-devel@gnu.org; Fri, 26 Jul 2019 07:12:06 -0400 Received: from pelzflorian.de ([5.45.111.108]:46448 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hqy8l-0000gV-Rx for guix-devel@gnu.org; Fri, 26 Jul 2019 07:12:00 -0400 Content-Disposition: inline In-Reply-To: <20190719122952.an6yr6azie4x3xjg@pelzflorian.localdomain> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org, sirgazil , matias_jose_seco@autoproduzioni.net --ifowlwrbqzqklseo Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 19, 2019 at 02:29:52PM +0200, pelzflorian (Florian Pelz) wrot= e: > I will try writing a custom xgettext that combines > nested=C2=B7s-expressions=C2=B7that are marked for translation with G_ > to=C2=B7a=C2=B7single=C2=B7msgstr that gets written to the=C2=B7PO=C2=B7= file. This combined > string will not be part of the source code but will be generated from > a nested sexp. The PO file containing the combined strings can then > be translated as usual. For reading the translation, the combined > msgstr will be constructed again by the marking procedure G_ and > looked up by reading from an MO file. >=20 > It will take me a few days and a MO file reader will still be missing. > I suppose it would be easier to use for the sxml=E2=80=99s author who w= ould > not need to write special code to internationalize the sxml. >=20 Find attached a work-in-progress patch to guix-artwork that constructs PO entries from nested sexps. Also attached is a file marked for translation and the POT file generated from it. No custom MO reader is needed because gettext is a fine MO reader, the problem is only xgettext that cannot extract sexps. Currently missing though is a procedure or macro for deconstructing the msgstr to an sexp, so the patch can only generate unusable POT files at the moment. I will take a look at it now, but it may again take a week. Please tell me if you think this is the wrong approach. Regards, Florian --ifowlwrbqzqklseo Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-wip-website-Use-custom-xgettext-implementation-that-.patch" Content-Transfer-Encoding: quoted-printable >From 1f126de9d16f1eb78d1d8846ddfad7d3e84bb1d4 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Fri, 26 Jul 2019 12:58:18 +0200 Subject: [PATCH] [wip] website: Use custom xgettext implementation that c= an extract from nested sexps. * website/scripts/sexp-xgettext.scm: New file for generating a PO file. * website/sexp-xgettext.scm: New file with module for looking up translations. * website/apps/base/templates/home.scm (home-t): Mark for translation for testing. * website/po/POTFILES: New file; list the above file here. * website/po/guix-website.pot: New file; generated from the above. * website/po/de.po: New file. * website/po/LINGUAS: New file. Add linguas for testing. Currently their country code has to be specified too. * website/apps/i18n.scm: New file. Add utility functions. * website/haunt.scm: Load linguas and call each builder with each. * website/wip-howto-test-translation: New file with unfinished instructions. --- website/apps/base/templates/home.scm | 231 +++++------ website/apps/i18n.scm | 96 +++++ website/haunt.scm | 24 +- website/po/LINGUAS | 2 + website/po/POTFILES | 1 + website/po/de.po | 30 ++ website/po/guix-website.pot | 78 ++++ website/scripts/sexp-xgettext.scm | 575 +++++++++++++++++++++++++++ website/sexp-xgettext.scm | 31 ++ website/wip-howto-test-translation | 27 ++ 10 files changed, 978 insertions(+), 117 deletions(-) create mode 100644 website/apps/i18n.scm create mode 100644 website/po/LINGUAS create mode 100644 website/po/POTFILES create mode 100644 website/po/de.po create mode 100644 website/po/guix-website.pot create mode 100644 website/scripts/sexp-xgettext.scm create mode 100644 website/sexp-xgettext.scm create mode 100644 website/wip-howto-test-translation diff --git a/website/apps/base/templates/home.scm b/website/apps/base/tem= plates/home.scm index 5cb3bf5..09e24ba 100644 --- a/website/apps/base/templates/home.scm +++ b/website/apps/base/templates/home.scm @@ -14,17 +14,18 @@ (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 (list (G_ "GNU's advanced distro and transactional package ma= nager")) #: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." + 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") + (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 "Overview" #:css (list (guix-url "static/base/css/item-preview.css") @@ -34,83 +35,88 @@ ;; 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)) - "=E2=80=94which 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))) + "=E2=80=94which respects the " + ,(G_ (link-yellow + #:label "freedom of computer users" + #:url (gnu-url "distros/free-system-distribution-\ +guidelines.html"))) + ". ")) + + (G_ + `(li + ,(G_ `(b "Dependable.")) + " Guix " + ,(G_ (link-yellow + #:label "supports" + #:url (manual-url "Package-Management.html"))) + " transactional upgrades and roll-backs, unprivileged \ +package management, " + ,(G_ (link-yellow + #:label "and more" + #:url (manual-url "Features.html"))) + ". When used as a standalone distribution, Guix supports " + ,(G_ (link-yellow + #:label "declarative system configuration" + #:url (manual-url "Using-the-Configuration-System.html")= )) + " for transparent and reproducible operating systems.")) + + (G_ + `(li + ,(G_ `(b "Hackable.")) + " It provides " + ,(G_ (link-yellow + #:label "Guile Scheme" + #:url (gnu-url "software/guile/"))) + " APIs, including high-level embedded domain-specific \ +languages (EDSLs) to " + ,(G_ (link-yellow + #:label "define packages" + #:url (manual-url "Defining-Packages.html"))) + " and " + ,(G_ (link-yellow + #:label "whole-system configurations" + #:url (manual-url "System-Configuration.html"))) + "."))) =20 (div (@ (class "action-box centered-text")) ,(button-big - #:label (string-append "DOWNLOAD v" (latest-guix-version)) + #:label (C_ (string-append "DOWNLOAD v" (latest-guix-version)) + "button") #:url (guix-url "download/") #:light #true) " " ; A space for readability in non-CSS browsers. ,(button-big - #:label "CONTRIBUTE" + #:label (C_ "CONTRIBUTE" "button") #:url (guix-url "contribute/") #:light #true))) =20 ;; Discover Guix. (section (@ (class "discovery-box")) - (h2 "Discover Guix") + (G_ `(h2 "Discover Guix")) =20 - (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_ + `(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 "#guix-in-other-dis= tros")) + " package manager.")) =20 (div (@ (class "screenshots-box")) @@ -119,55 +125,57 @@ (div (@ (class "action-box centered-text")) ,(button-big - #:label "ALL PACKAGES" + #:label (C_ "ALL PACKAGES" "button") #:url (guix-url "packages/") #:light #true)) =20 ,(horizontal-separator #:light #true) =20 ;; Guix in different fields. - (h3 "GNU Guix in your field") + (G_ `(h3 "GNU Guix in your field")) =20 - (p - (@ (class "limit-width centered-block")) - "Read some stories about how people are using GNU=C2=A0Guix in th= eir daily - lives.") + (G_ + `(p + (@ (class "limit-width centered-block")) + "Read some stories about how people are using GNU=C2=A0Guix in +their daily lives.")) =20 (div (@ (class "fields-box")) =20 " " ; 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_ "SOFTWARE DEVELOPMENT" "button") + #:url (guix-url "blog/tags/software-development/") + #:light #true) " " ,(button-big - #:label "BIOINFORMATICS" - #:url (guix-url "blog/tags/bioinformatics/") - #:light #true) + #:label (C_ "BIOINFORMATICS" "button") + #: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_ "HIGH PERFORMANCE COMPUTING" "button") + #:url (guix-url "blog/tags/high-performance-computing/") + #:light #true) " " ,(button-big - #:label "RESEARCH" - #:url (guix-url "blog/tags/research/") - #:light #true) + #:label (C_ "RESEARCH" "button") + #:url (guix-url "blog/tags/research/") + #:light #true) " " ,(button-big - #:label "ALL FIELDS..." - #:url (guix-url "blog/") - #:light #true)) + #:label (C_ "ALL FIELDS..." "button") + #:url (guix-url "blog/") + #:light #true)) =20 ,(horizontal-separator #:light #true) =20 ;; 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")) =20 (div (@ (class "info-box")) @@ -176,54 +184,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).")))) =20 (div (@ (class "info-box justify-left")) - (p - "If you don't use GNU=C2=A0Guix 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=C2=A0Guix 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 convenien= ces.")) =20 - (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."))) =20 (div (@ (class "action-box centered-text")) ,(button-big - #:label "TRY IT OUT!" + #:label (C_ "TRY IT OUT!" "button") #:url (guix-url "download/") #:light #true))) =20 ;; Latest Blog posts. (section (@ (class "centered-text")) - (h2 "Blog") + (G_ `(h2 "Blog")) =20 ,@(map post-preview (context-datum context "posts")) =20 (div (@ (class "action-box centered-text")) ,(button-big - #:label "ALL POSTS" + #:label (C_ "ALL POSTS" "button") #:url (guix-url "blog/")))) =20 ;; Contact info. (section (@ (class "contact-box centered-text")) - (h2 "Contact") + (G_ (h2 "Contact")) =20 ,@(map contact-preview (context-datum context "contact-media")) =20 (div (@ (class "action-box centered-text")) ,(button-big - #:label "ALL CONTACT MEDIA" + #:label (C_ "ALL CONTACT MEDIA" "button") #:url (guix-url "contact/"))))))) diff --git a/website/apps/i18n.scm b/website/apps/i18n.scm new file mode 100644 index 0000000..53fb963 --- /dev/null +++ b/website/apps/i18n.scm @@ -0,0 +1,96 @@ +;;; GNU Guix web site +;;; Copyright =C2=A9 2019 Florian Pelz +;;; +;;; This file is part of the GNU Guix web site. +;;; +;;; The GNU Guix web site is free software; you can redistribute it and/= or modify it +;;; under the terms of the GNU Affero General Public License as publishe= d by +;;; the Free Software Foundation; either version 3 of the License, or (a= t +;;; your option) any later version. +;;; +;;; The GNU Guix web site is distributed in the hope that it will be use= ful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU Affero General Public License for more details. +;;; +;;; You should have received a copy of the GNU Affero General Public Lic= ense +;;; along with the GNU Guix web site. If not, see . + +(define-module (apps i18n) + #:use-module (haunt page) + #:use-module (haunt utils) + #:use-module (ice-9 match) + #:use-module (sexp-xgettext) + #:use-module (srfi srfi-1) + #:export (G_ + N_ + C_ + %current-lingua + builder->localized-builder + builders->localized-builders)) + +(define %gettext-domain + "guix-website") + +(bindtextdomain %gettext-domain (getcwd)) +(bind-textdomain-codeset %gettext-domain "UTF-8") +(textdomain %gettext-domain) + +;; TODO deconstruct an sexp instead of directly receiving a msg +(define* (G_ msg) ;like gettext + (gettext msg %gettext-domain)) + +(define* (N_ msg msgplural n) ;like ngettext + (ngettext msg msgplural %gettext-domain)) + +(define* (C_ msg msgctxt) ;like pgettext + msg);TODO + +(define + (@@ (haunt page) )) + +(define %current-lingua + (make-parameter "en_US")) + +(define (first-value arg) + "For some reason the builder returned by static-directory returns +multiple values. This procedure is used to retain only the first +return value. TODO THIS SHOULD NOT BE NECESSARY I THINK" + arg) + +(define (builder->localized-builder builder lingua) + (compose + (lambda (pages) + (map + (lambda (page) + (match page + (($ file-name contents writer) + (if (string-suffix? ".html" file-name) + (let* ((base (string-drop-right + file-name + (string-length ".html"))) + (new-name (string-append base + "." + lingua + ".html"))) + (make-page new-name contents writer)) + page)) + (else page))) + pages)) + (lambda (site posts) + (begin + (setlocale LC_ALL (string-append lingua ".utf8")) + (parameterize ((%current-lingua lingua)) + (lambda _ + (begin + (first-value (builder site posts))))))))) + +(define (builders->localized-builders builders linguas) + (flatten + (map-in-order + (lambda (builder) + (map-in-order + (lambda (lingua) + (builder->localized-builder builder lingua)) + linguas)) + builders))) diff --git a/website/haunt.scm b/website/haunt.scm index d29c0d4..eb0eafe 100644 --- a/website/haunt.scm +++ b/website/haunt.scm @@ -5,13 +5,23 @@ (use-modules ((apps base builder) #:prefix base:) ((apps blog builder) #:prefix blog:) ((apps download builder) #:prefix download:) + (apps i18n) ((apps packages builder) #:prefix packages:) (haunt asset) (haunt builder assets) (haunt reader) (haunt reader commonmark) - (haunt site)) + (haunt site) + (ice-9 rdelim) + (srfi srfi-1)) =20 +(define linguas + (with-input-from-file "po/LINGUAS" + (lambda _ + (let loop ((line (read-line))) + (if (eof-object? line) + '() + (cons line (loop (read-line)))))))) =20 (site #:title "GNU=C2=A0Guix" #:domain (if (getenv "GUIX_WEB_SITE_INFO") @@ -19,8 +29,10 @@ "https://gnu.org/software/guix") #:build-directory "/tmp/gnu.org/software/guix" #:readers (list sxml-reader html-reader commonmark-reader) - #:builders (list base:builder - blog:builder - download:builder - packages:builder - (static-directory "static"))) + #:builders (builders->localized-builders + (list base:builder + blog:builder + download:builder + packages:builder + (static-directory "static")) + linguas)) diff --git a/website/po/LINGUAS b/website/po/LINGUAS new file mode 100644 index 0000000..782116d --- /dev/null +++ b/website/po/LINGUAS @@ -0,0 +1,2 @@ +de_DE +en_US diff --git a/website/po/POTFILES b/website/po/POTFILES new file mode 100644 index 0000000..0007797 --- /dev/null +++ b/website/po/POTFILES @@ -0,0 +1 @@ +apps/base/templates/home.scm diff --git a/website/po/de.po b/website/po/de.po new file mode 100644 index 0000000..3add92e --- /dev/null +++ b/website/po/de.po @@ -0,0 +1,30 @@ +# German translations for guix-website package. +# Copyright (C) 2019 Ludovic Court=C3=A8s +# This file is distributed under the same license as the guix-website pa= ckage. +# Automatically generated, 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: guix-website\n" +"Report-Msgid-Bugs-To: ludo@gnu.org\n" +"POT-Creation-Date: 2019-07-18 16:31+0200\n" +"PO-Revision-Date: 2019-07-18 16:33+0200\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3D2; plural=3D(n !=3D 1);\n" + +#: apps/base/templates/home.scm:41 +msgctxt "featured content" +msgid "Liberating." +msgstr "Befreiend." + +#: apps/base/templates/home.scm:42 +msgctxt "featured content" +msgid "" +" Guix is an advanced\n" +" distribution of the " +msgstr "Guix ist eine fortgeschrittene Distribution des " diff --git a/website/po/guix-website.pot b/website/po/guix-website.pot new file mode 100644 index 0000000..0c180fe --- /dev/null +++ b/website/po/guix-website.pot @@ -0,0 +1,78 @@ + +msgid "GNU's advanced distro and transactional package manager" +msgstr "" + +msgid "Guix is an advanced distribution of the GNU operating system.\n = Guix is technology that respects the freedom of computer users.\n You = are free to run the system for any purpose, study how it works,\n impro= ve it, and share it with the whole world." +msgstr "" + +msgid "GNU|Linux|Unix|Free software|Libre software|Operating system|GNU = Hurd|GNU Guix package manager|GNU Guile|Guile Scheme|Transactional upgrad= es|Functional package management|Reproducibility" +msgstr "" + +msgid "<1/>Summary" +msgstr "" + +msgid "<1/> Guix is an advanced\n distribution of the developed = by the =E2=80=94which respects the . " +msgstr "" + +msgid "<1/> Guix transactional upgrades and roll-backs, unprivileged\n = package management, . When used as a standalone distribution, Gui= x supports for transparent and reproducible operating systems." +msgstr "" + +msgid "<1/> It provides APIs, including high-level embedded domain-spec= ific\n languages (EDSLs) to and ." +msgstr "" + +msgid "<1/>DOWNLOAD v" +msgstr "" + +msgid "CONTRIBUTE" +msgstr "" + +msgid "<1/>Discover Guix" +msgstr "" + +msgid "<1/>Guix comes with thousands of packages which include\n a= pplications, system tools, documentation, fonts, and other\n digita= l goods readily available for installing with the package manager." +msgstr "" + +msgid "ALL PACKAGES" +msgstr "" + +msgid "<1/>GNU Guix in your field" +msgstr "" + +msgid "<1/>Read some stories about how people are using GNU\xa0Guix in t= heir daily\n lives." +msgstr "" + +msgid "BIOINFORMATICS" +msgstr "" + +msgid "HIGH PERFORMANCE COMPUTING" +msgstr "" + +msgid "RESEARCH" +msgstr "" + +msgid "ALL FIELDS..." +msgstr "" + +msgid "<1/>GNU Guix in other GNU/Linux distros" +msgstr "" + +msgid "<1/>Video: (1 minute, 30 seconds)." +msgstr "" + +msgid "<1/>" +msgstr "" + +msgid "TRY IT OUT!" +msgstr "" + +msgid "<1/>Blog" +msgstr "" + +msgid "ALL POSTS" +msgstr "" + +msgid "<1/>Contact" +msgstr "" + +msgid "ALL CONTACT MEDIA" +msgstr "" diff --git a/website/scripts/sexp-xgettext.scm b/website/scripts/sexp-xge= ttext.scm new file mode 100644 index 0000000..c069507 --- /dev/null +++ b/website/scripts/sexp-xgettext.scm @@ -0,0 +1,575 @@ +;;; GNU Guix web site +;;; Copyright =C2=A9 2019 Florian Pelz +;;; +;;; This file is part of the GNU Guix web site. +;;; +;;; The GNU Guix web site is free software; you can redistribute it and/= or modify it +;;; under the terms of the GNU Affero General Public License as publishe= d by +;;; the Free Software Foundation; either version 3 of the License, or (a= t +;;; your option) any later version. +;;; +;;; The GNU Guix web site is distributed in the hope that it will be use= ful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU Affero General Public License for more details. +;;; +;;; You should have received a copy of the GNU Affero General Public Lic= ense +;;; along with the GNU Guix web site. If not, see . + +(use-modules (ice-9 getopt-long) + (ice-9 match) + (ice-9 peg) + (ice-9 receive) + (ice-9 regex) + (ice-9 textual-ports) + (srfi srfi-1) ;lists + (srfi srfi-9)) ;records + +;;; This script imitates xgettext, but combines nested s-expressions +;;; in the input Scheme files to a single msgstr in the PO file. It +;;; works by first reading the keywords specified on the command-line, +;;; then dealing with the remaining options using (ice-9 getopt-long). +;;; Then, it parses each Scheme file in the POTFILES file specified +;;; with --files-from and constructs po entries from it. For parsing, +;;; a PEG is used instead of Scheme=E2=80=99s read, because we can extra= ct +;;; comments with it. The po entries are written to the PO file +;;; specified with the --output option. Scheme code can then use the +;;; (sexp-xgettext) module to deconstruct the msgids looked up in the +;;; PO file via gettext. + +(define (pk a) + (begin + (write a) + (newline) + a)) + +(define-record-type + (make-keyword-spec id sg pl c total xcomment) + keyword-spec? + (id keyword-spec-id) ;identifier + (sg keyword-spec-sg) ;arg with singular + (pl keyword-spec-pl) ;arg with plural + (c keyword-spec-c) ;arg with msgctxt or 'mixed if sg is mixed msgctxt|= singular + (total keyword-spec-total) ;total number of args + (xcomment keyword-spec-xcomment)) + +(define (complex-keyword-spec? keyword-spec) + (match keyword-spec + (($ _ _ #f #f _ #f) #f) + (else #t))) + +(define %keyword-specs + ;; List of valid keywords. + (let loop ((opts (cdr (command-line)));command-line options from + ;which to extract --keyword + ;options + (remaining-opts '()) ;unhandled opts + (specs '())) + ;; Read keywords from command-line options. + (define (string->integer str) + (if (string-match "[0-9]+" str) + (string->number str) + (error "Not a decimal integer."))) + (define* (argnums->spec id #:optional (argnums '())) + (let loop ((sg #f) + (pl #f) + (c #f) + (total #f) + (xcomment #f) + (argnums argnums)) + (match argnums + (() (make-keyword-spec id + (if sg sg 1) + pl + c + total + xcomment)) + ((arg . argnums) + (cond + ((string-suffix? "c" arg) + (cond (c (error "c suffix clashes")) + (else + (let* ((number-str (string-drop-right arg 1)) + (number (string->integer number-str))) + (loop sg pl number total xcomment argnums))))) + ((string-suffix? "g" arg) + (cond + (sg (error "Only first argnum can have g suffix.")) + (c (error "g suffix clashes.")) + (else + (let* ((number-str (string-drop-right arg 1)) + (number (string->integer number-str))) + (loop number #f 'mixed total xcomment argnums))))) + ((string-suffix? "t" arg) + (cond (total (error "t suffix clashes")) + (else + (let* ((number-str (string-drop-right arg 1)) + (number (string->integer number-str))) + (loop sg pl c number xcomment argnums))))) + ((string-suffix? "\"" arg) + (cond (xcomment (error "xcomment clashes")) + (else + (let* ((comment (substring arg + 1 + (- (string-length arg) 1)= ))) + (loop sg pl c total comment argnums))))) + (else + (let* ((number (string->integer arg))) + (if sg + (if pl + (error "Too many argnums.") + (loop sg number c total xcomment argnums)) + (loop number #f c total xcomment argnums))))))))) + + (define (string->spec str) ;see `info xgettext` + (match (string-split str #\:) + ((id) (argnums->spec id)) + ((id argnums) + (argnums->spec id (string-split argnums #\,))))) + (match opts + (() (begin + ;; remove recognized --keyword command-line options: + (set-program-arguments (cons (car (command-line)) + (reverse remaining-opts))) + specs)) + ((current-opt . rest) + (cond + ((string=3D? "--" current-opt) specs) + ((string-prefix? "--keyword=3D" current-opt) + (let ((keyword (string-drop current-opt (string-length "--keywo= rd=3D")))) + (loop rest remaining-opts (cons (string->spec keyword) specs)= ))) + ((or (string=3D? "--keyword" current-opt) + (string=3D? "-k" current-opt)) + (let ((next-opt (car rest))) + (loop (cdr rest) + remaining-opts + (cons (string->spec next-opt) specs)))) + (else (loop rest (cons current-opt remaining-opts) specs))))))) + +;;; Other options are not repeated, so we can use getopt-long: + +(define %options ;; Corresponds to what is documented at `info xgettext`= . + (let ((option-spec + `((files (single-char #\f) (value #t)) + (directory (single-char #\D) (value #t)) + (default-domain (single-char #\d) (value #t)) + (output (single-char #\o) (value #t)) + (output-dir (single-char #\p) (value #t)) + (from-code (value #t)) + (join-existing (single-char #\j) (value #f)) + (exclude-file (single-char #\x) (value #t)) + (add-comments (single-char #\c) (value #t)) + + ;; Because getopt-long does not support repeated options, + ;; we took care of --keyword options further up. + ;; (keyword (single-char #\k) (value #t)) + + (flag (value #t)) + (force-po (value #f)) + (indent (single-char #\i) (value #f)) + (no-location (value #f)) + (add-location (single-char #\n) (value #t)) + (width (single-char #\w) (value #t)) + (no-wrap (value #f)) + (sort-output (single-char #\s) (value #f)) + (sort-by-file (single-char #\F) (value #f)) + (omit-header (value #f)) + (copyright-holder (value #t)) + (foreign-user (value #f)) + (package-name (value #t)) + (package-version (value #t)) + (msgid-bugs-address (value #t)) + (msgstr-prefix (single-char #\m) (value #t)) + (msgstr-suffix (single-char #\m) (value #t)) + (help (value #f)) + (pack (value #f))))) + (getopt-long (command-line) option-spec))) + + +;; implemented similar to guix/build/po.scm +(define parse-scheme-file + ;; This procedure parses FILE and returns a parse tree. + (let () + ;;TODO: OPTIONALLY IGNORE CASE: + (define-peg-pattern comment all (and ";" + (* (and peg-any + (not-followed-by "\n"))= ) + (and peg-any (followed-by "\n")= ))) + (define-peg-pattern whitespace none (or " " "\t" "\n")) + (define-peg-pattern quotation body (or "'" "`" "," ",@")) ;TODO ALLO= W USER TO SPECIFY OTHER QUOTE CHARACTERS + (define-peg-pattern open body (and (? quotation) + (or "(" "[" "{"))) + (define-peg-pattern close body (or ")" "]" "}")) + (define-peg-pattern string body (and (followed-by "\"") + (* (or "\\\"" + (and peg-any + (not-followed-by "\= "")))) + (and peg-any (followed-by "\"")= ) + "\"")) + (define-peg-pattern token all (or string + (and + (not-followed-by open) + (not-followed-by close) + (not-followed-by comment) + (* (and peg-any + (not-followed-by open) + (not-followed-by close) + (not-followed-by comment) + (not-followed-by string) + (not-followed-by whitespa= ce))) + (or + (and peg-any (followed-by open)) + (and peg-any (followed-by close)= ) + (and peg-any (followed-by commen= t)) + (and peg-any (followed-by string= )) + (and peg-any (followed-by whites= pace)) + (not-followed-by peg-any))))) + (define-peg-pattern sexp all (or (and (? quotation) "(" program ")") + (and (? quotation) "[" program "]") + (and (? quotation) "{" program "}")= )) + (define-peg-pattern t-or-s body (or token sexp)) + (define-peg-pattern program all (* (or whitespace + comment + t-or-s))) + (lambda (file) + (call-with-input-file file + (lambda (port) + ;; it would be nice to match port directly without + ;; converting to a string first + (let ((string (get-string-all port))) + (peg:tree (match-pattern program string)))))))) + + +(define-record-type + (make-po-entry ecomments ref flags ctxt id idpl) + po-entry? +;;; irrelevant: (tcomments po-entry-tcomments) ;translator-comments + (ecomments po-entry-ecomments) ;extracted-comments + (ref po-entry-ref) ;reference + (flags po-entry-flags) +;;; irrelevant: (prevctxt po-entry-prevctxt) ;previous-ctxt +;;; irrelevant: (prev po-entry-prev) ;previous-translation + (ctxt po-entry-ctxt) ;msgctxt + (id po-entry-id) ;msgid + (idpl po-entry-idpl) ;msgid-plural +;;; irrelevant: (str po-entry-str) ;msgstr string or association list +;;; ;integer to string + ) + +(define (write-po-entry po-entry) + (define* (write-component c prefix #:optional (out display)) + (when c + (begin (display prefix) + (display " ") + (out c) + (newline)))) + (match po-entry + (($ ecomments ref flags ctxt id idpl) + (write-component ecomments "#.") + (write-component ref "#:") + (write-component flags "#,") + (write-component ctxt "msgctxt" write) + (write-component id "msgid" write) + (write-component idpl "msgid_plural" write) + (display "msgstr \"\"") + (newline)))) + +(define %ecomments-string + (make-parameter #f)) + +(define (update-ecomments-string! str) + "Sets the value of the parameter object %ecomments-string if str is +an ecomments string. An ecomments string is extracted from a comment +because it starts with TRANSLATORS or a key specified with +--add-comments." ;TODO NOT IMPLEMENTED YET + (when (string-prefix? "TRANSLATORS" str) + (%ecomments-string str))) ;TODO NOT THE WHOLE STRING + +(define %line-number + (make-parameter #f)) + +(define (update-line-number! number) + "Sets the value of the parameter object %line-number to NUMBER." + (%line-number number)) + +(define (incr-line-number!) + "Increments the value of the parameter object %line-number by 1." + (%line-number (1+ %line-number))) + +(define (make-simple-po-entry msgid) + (make-po-entry + (%ecomments-string) + (%line-number) + #f ;TODO use scheme-format for format strings? + #f ;no ctxt + msgid + #f)) + + +(define (matching-keyword id) + "Returns the keyword-spec whose identifier is the same as ID, or #f +if ID is no string or no such keyword-spec exists." + (and (symbol? id) + (let ((found (member (symbol->string id) + %keyword-specs + (lambda (id spec) + (string=3D? id (keyword-spec-id spec)))))) + (and found (car found))))) + +(define (nth-exp program n) + "Returns the nth 'token or 'sexp inside the PROGRAM parse tree or #f +if no tokens or sexps exist." + (let loop ((i 0) + (rest program)) + (define (on-hit exp) + (if (=3D i n) exp + ;; else: + (loop (1+ i) (cdr rest)))) + (match rest + (() #f) + ((('token exp) . _) (on-hit (car rest))) + ((('sexp open-paren exp close-paren) . _) (on-hit (car rest))) + ((_ . _) (loop i (cdr rest))) + (else #f)))) + +(define (more-than-one-exp? program) + "Returns true if PROGRAM consiste of more than one expression." + (if (matching-keyword (token->string-or-symbol (nth-exp program 0))) + (nth-exp program 2) ;if there is third element, keyword does not c= ount + (nth-exp program 1))) + +(define (token->string-or-symbol tok) + "For a parse tree TOK, if it is a 'token parse tree, returns its +value as a string or symbol, otherwise returns #f." + (match tok + (('token exp) + (with-input-from-string exp + (lambda () + (read)))) + (else #f))) + +(define (complex-marked-sexp->po-entries parse-tree) + "Checks if PARSE-TREE is marked by a keyword. If yes, for a complex +keyword spec, returns a list of po-entries for it. For a simple +keyword spec, returns the argument number of its singular form. +Otherwise returns #f." + (let* ((first (nth-exp parse-tree 0)) + (spec (matching-keyword (token->string-or-symbol first)))) + (if spec + (if ;if the identifier of a complex keyword occurs first + (complex-keyword-spec? spec) + ;; then make po entries for it + (match spec + (($ id sg pl c total xcomment) + (if (eq? c 'mixed) ; if msgctxt and singular msgid are in on= e string + (let* ((exp (nth-exp parse-tree sg)) + (val (token->string-or-symbol exp)) + (idx (if (string? val) (string-rindex val #\|)))) + (list (make-po-entry + (%ecomments-string) + (%line-number) + #f ;TODO use scheme-format for format strings? + (string-take val idx) + (string-drop val (1+ idx)) + #f))) ;plural forms are not supported + ;; else construct msgids + (receive (pl-id pl-entries) + (match pl + (#t (construct-msgid-and-po-entries + (nth-exp parse-tree pl))) + (#f (values #f '()))) + (receive (sg-id sg-entries) + (construct-msgid-and-po-entries + (nth-exp parse-tree sg)) + (cons + (make-po-entry + (%ecomments-string) + (%line-number) + #f ;TODO use scheme-format for format strings? + (and c (token->string-or-symbol (nth-exp parse-tre= e c))) + sg-id + pl-id) + (append sg-entries pl-entries))))))) + ;; else if it is a simple keyword, return the argnum: + (keyword-spec-sg spec)) + ;; if no keyword occurs, then false + #f))) + +(define (construct-po-entries parse-tree) + "Converts a PARSE-TREE resulting from a call to parse-scheme-file to +a list of po-entry records. Unlike construct-msgid-and-po-entries, +strings are not collected to a msgid. The list of po-entry records is +the return value." + (let ((entries (complex-marked-sexp->po-entries parse-tree))) + (cond + ((list? entries) entries) + ((number? entries) ;parse-tree yields a single, simple po entry + (receive (id entries) + (construct-msgid-and-po-entries + (nth-exp parse-tree entries)) + (cons (make-simple-po-entry id) + entries))) + (else ;search for marked translations in parse-tree + (match parse-tree + (() '()) + (('comment str) (begin + (update-ecomments-string! str) + '())) + ;; TODO UPDATE %line-number ON NL + (('token str) '()) + (('sexp open-paren program close-paren) + (construct-po-entries program)) + (('program . components) + (append-map construct-po-entries components))))))) + +(define* (tag counter prefix #:key (flavor 'start)) + "Formats the number COUNTER as a tag according to FLAVOR, which is +either 'start, 'end or 'empty for a start, end or empty tag, +respectively." + (string-append "<" + (if (eq? flavor 'end) "/" "") + prefix + (number->string counter) + (if (eq? flavor 'empty) "/" "") + ">")) + +(define-record-type + (make-construct-fold-state msgid-string counter po-entries) + construct-fold-state? + (msgid-string construct-fold-state-msgid-string) + (counter construct-fold-state-counter) + (po-entries construct-fold-state-po-entries)) + +(define* (construct-msgid-and-po-entries parse-tree + #:optional + (prefix "")) + "Like construct-po-entries, but with two return values. The first +is an accumulated msgid constructed from all components in PARSE-TREE +for use in make-po-entry. Non-strings are replaced by tags containing +PREFIX. The second return value is a list of po entries for +subexpressions marked with a complex keyword spec." + (match parse-tree + (() (values "" '())) + (('comment str) (begin + (update-ecomments-string! str) + (values "" '()))) + ;; TODO UPDATE %line-number ON NL + (('token exp) + (let ((maybe-string (token->string-or-symbol parse-tree))) + (if (string? maybe-string) + (values maybe-string '()) + (error "Single symbol marked for translation." maybe-string))= )) + (('sexp open-paren program close-paren) + ;; parse program instead + (construct-msgid-and-po-entries program prefix)) + (('program . components) + ;; Concatenate strings in parse-tree to a new msgid and add an + ;; tag for each sexp in between. + (match + (fold + (lambda (component prev-state) + (match prev-state + (($ msgid-string counter po-entries= ) + (match component + (('comment str) (begin (update-ecomments-string! str) + prev-state)) + ;; TODO INCREASE %line-number ON NL + (('token exp) + (let ((maybe-string (token->string-or-symbol component= ))) + (cond + ((string? maybe-string) + ;; if string, append maybe-string to previous msgi= d + (make-construct-fold-state + (string-append msgid-string maybe-string) + counter + po-entries)) + ((and (more-than-one-exp? components) ;not the only= symbol + (or (string-null? msgid-string) ;no string so= far + (string-suffix? ">" msgid-string))) ;tag = before + prev-state) ;then ignore + ((matching-keyword maybe-string) + prev-state) ;ignore keyword token) + (else ;append tag representing the token + (make-construct-fold-state + (string-append msgid-string + (tag counter prefix + #:flavor 'empty)) + (1+ counter) + po-entries))))) + (('sexp open-paren program close-paren) + (let ((first (nth-exp program 0))) + (match (complex-marked-sexp->po-entries program) + ((? list? result) + (make-construct-fold-state + (string-append msgid-string + (tag counter prefix #:flavor 'emp= ty)) + (1+ counter) + (append result po-entries))) + (result + (if (or (number? result) + (not (more-than-one-exp? components))) + (receive (id entries) + (construct-msgid-and-po-entries + program + (string-append prefix (number->string co= unter) + ".")) + (make-construct-fold-state + (string-append msgid-string + (tag counter prefix + #:flavor 'start) + id + (tag counter prefix + #:flavor 'end)) + (1+ counter) + (append entries po-entries))) + ;; else ignore unmarked sexp + prev-state))))))))) + (make-construct-fold-state "" 1 '()) + components) + (($ msgid-string counter po-entries) + (values msgid-string po-entries)))))) + +(define scheme-file->po-entries + (compose construct-po-entries + parse-scheme-file)) + +(define %files-from-port + (let ((files-from (option-ref %options 'files #f))) + (if files-from + (open-input-file files-from) + (current-input-port)))) + +(define %scheme-files + (let loop ((line (get-line %files-from-port)) + (scheme-files '())) + (if (eof-object? line) + (begin + (close-port %files-from-port) + scheme-files) + ;; else read file names before comment + (let ((before-comment (car (string-split line #\#)))) + (loop (get-line %files-from-port) + (append + (map match:substring (list-matches "[^ \t]+" line)) + scheme-files)))))) + +(define %output-po-entries + (fold (lambda (scheme-file po-entries) + (append (scheme-file->po-entries scheme-file) + po-entries)) + '() + %scheme-files)) + +(define %output-port + (let ((output (option-ref %options 'output #f))) + (if output + (open-output-file output) + (current-output-port)))) + +(with-output-to-port %output-port + (lambda () + (for-each (lambda (po-entry) + (begin + (newline) + (write-po-entry po-entry))) + %output-po-entries))) diff --git a/website/sexp-xgettext.scm b/website/sexp-xgettext.scm new file mode 100644 index 0000000..2378d3f --- /dev/null +++ b/website/sexp-xgettext.scm @@ -0,0 +1,31 @@ +;;; GNU Guix web site +;;; Copyright =C2=A9 2019 Florian Pelz +;;; +;;; This file is part of the GNU Guix web site. +;;; +;;; The GNU Guix web site is free software; you can redistribute it and/= or modify it +;;; under the terms of the GNU Affero General Public License as publishe= d by +;;; the Free Software Foundation; either version 3 of the License, or (a= t +;;; your option) any later version. +;;; +;;; The GNU Guix web site is distributed in the hope that it will be use= ful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU Affero General Public License for more details. +;;; +;;; You should have received a copy of the GNU Affero General Public Lic= ense +;;; along with the GNU Guix web site. If not, see . + +(define-module (sexp-xgettext) + #:export (%current-mo-file + mo-lookup)) + +(define %current-mo-file + (make-parameter #f)) + +(define (mo-lookup msg #:key number msgctxt) + "Return the translation of MSG from the %CURRENT-MO-FILE for +NUMBER (like n in ngettext) that has the specified MSGCTXT (like +pgettext)." + ;; TODO CURRENTLY THIS FUNCTION USES guix/build/po.scm TO LOOK UP + ;; TRANSLATIONS FROM A PO FILE AND NOT FROM AN MO FILE diff --git a/website/wip-howto-test-translation b/website/wip-howto-test-= translation new file mode 100644 index 0000000..362ef08 --- /dev/null +++ b/website/wip-howto-test-translation @@ -0,0 +1,27 @@ +To create a pot file: + +guile scripts/sexp-xgettext.scm -f po/POTFILES -o po/guix-website.pot --= from-code=3DUTF-8 --copyright-holder=3D"Ludovic Court=C3=A8s" --package-n= ame=3D"guix-website" --msgid-bugs-address=3D"ludo@gnu.org" --keyword=3DG_= --keyword=3DN_:1,2 --keyword=3DC_:1,2c + +To create a po file from a pot file, do the usual: + +cd po +msginit -l de --no-translator + +To merge an existing po file with a new pot file: + +cd po +msgmerge -U de.po guix-website.pot + +To update mo files: + +mkdir -p de/LC_MESSAGES +cd po +msgfmt de.po +cd .. +mv po/messages.mo de/LC_MESSAGES/guix-website.mo + +To test: + +guix environment --ad-hoc haunt +GUILE_LOAD_PATH=3D$(guix build guile-syntax-highlight)/share/guile/site/= 2.2:$GUILE_LOAD_PATH GUIX_WEB_SITE_LOCAL=3Dyes haunt build +GUILE_LOAD_PATH=3D$(guix build guile-syntax-highlight)/share/guile/site/= 2.2:$GUILE_LOAD_PATH haunt serve --=20 2.22.0 --ifowlwrbqzqklseo Content-Type: application/vnd.lotus-screencam Content-Disposition: attachment; filename="home.scm" Content-Transfer-Encoding: quoted-printable ;;; GNU Guix web site=0A;;; Initially written by sirgazil who waves all=0A;= ;; copyright interest on this file.=0A=0A(define-module (apps base template= s home)=0A #:use-module (apps base templates components)=0A #:use-module = (apps base templates theme)=0A #:use-module (apps base types)=0A #:use-mo= dule (apps base utils)=0A #:use-module (apps blog templates components)=0A= #:export (home-t))=0A=0A=0A(define (home-t context)=0A "Return the Home = page in SHTML using the data in CONTEXT."=0A (theme=0A #:title (list (G_= "GNU's advanced distro and transactional package manager"))=0A #:descrip= tion=0A (G_ "Guix is an advanced distribution of the GNU operating system= =2E=0A Guix is technology that respects the freedom of computer users.=0A= You are free to run the system for any purpose, study how it works,=0A = improve it, and share it with the whole world.")=0A #:keywords=0A (str= ing-split ;TRANSLATORS: |-separated list of webpage keywords=0A (G_ "GNU= |Linux|Unix|Free software|Libre software|Operating \=0Asystem|GNU Hurd|GNU = Guix package manager|GNU Guile|Guile \=0AScheme|Transactional upgrades|Func= tional package \=0Amanagement|Reproducibility"))=0A #:active-menu-item "O= verview"=0A #:css (list=0A (guix-url "static/base/css/item-preview.css"= )=0A (guix-url "static/base/css/index.css"))=0A #:content=0A `(main= =0A ;; Featured content.=0A (section=0A (@ (class "featured-co= ntent"))=0A (G_ `(h2 (@ (class "a11y-offset")) "Summary"))=0A (ul= =0A ,(G_=0A `(li=0A ,(G_ `(b "Liberating."))=0A = " Guix is an advanced distribution of the "=0A ,(G_ (link-= yellow=0A #:label "GNU operating system"=0A = #:url (gnu-url "gnu/about-gnu.html")))=0A " developed by the "= =0A ,(G_ (link-yellow=0A #:label "GNU Project"=0A= #:url (gnu-url)))=0A "=E2=80=94which respects th= e "=0A ,(G_ (link-yellow=0A #:label "freedom of c= omputer users"=0A #:url (gnu-url "distros/free-system-distr= ibution-\=0Aguidelines.html")))=0A ". "))=0A=0A (G_=0A = `(li=0A ,(G_ `(b "Dependable."))=0A " Guix "=0A = ,(G_ (link-yellow=0A #:label "supports"=0A = #:url (manual-url "Package-Management.html")))=0A " transactional= upgrades and roll-backs, unprivileged \=0Apackage management, "=0A = ,(G_ (link-yellow=0A #:label "and more"=0A = #:url (manual-url "Features.html")))=0A ". When used as a standal= one distribution, Guix supports "=0A ,(G_ (link-yellow=0A = #:label "declarative system configuration"=0A #:url (= manual-url "Using-the-Configuration-System.html")))=0A " for trans= parent and reproducible operating systems."))=0A=0A (G_=0A `(l= i=0A ,(G_ `(b "Hackable."))=0A " It provides "=0A = ,(G_ (link-yellow=0A #:label "Guile Scheme"=0A = #:url (gnu-url "software/guile/")))=0A " APIs, including high-= level embedded domain-specific \=0Alanguages (EDSLs) to "=0A ,(G_ (= link-yellow=0A #:label "define packages"=0A #:u= rl (manual-url "Defining-Packages.html")))=0A " and "=0A ,(= G_ (link-yellow=0A #:label "whole-system configurations"=0A = #:url (manual-url "System-Configuration.html")))=0A ".= ")))=0A=0A (div=0A (@ (class "action-box centered-text"))=0A = ,(button-big=0A #:label (C_ (string-append "DOWNLOAD v" (latest-= guix-version))=0A "button")=0A #:url (guix-url "downlo= ad/")=0A #:light #true)=0A " " ; A space for readability in non-CSS = browsers.=0A ,(button-big=0A #:label (C_ "CONTRIBUTE" "button= ")=0A #:url (guix-url "contribute/")=0A #:light #true)))=0A=0A ;; Dis= cover Guix.=0A (section=0A (@ (class "discovery-box"))=0A (G_= `(h2 "Discover Guix"))=0A=0A (G_=0A `(p=0A (@ (class "l= imit-width centered-block"))=0A "Guix comes with thousands of packa= ges which include \=0Aapplications, system tools, documentation, fonts, and= other digital \=0Agoods readily available for installing with the "=0A = ,(G_ `(link-yellow #:label "GNU Guix" #:url "#guix-in-other-distros"))= =0A " package manager."))=0A=0A (div=0A (@ (class "scree= nshots-box"))=0A ,@(map screenshot->shtml (context-datum context "scr= eenshots")))=0A=0A (div=0A (@ (class "action-box centered-text")= )=0A ,(button-big=0A #:label (C_ "ALL PACKAGES" "button")=0A = #:url (guix-url "packages/")=0A #:light #true))=0A=0A ,(horizontal-s= eparator #:light #true)=0A=0A ;; Guix in different fields.=0A (G_= `(h3 "GNU Guix in your field"))=0A=0A (G_=0A `(p=0A (@ = (class "limit-width centered-block"))=0A "Read some stories about h= ow people are using GNU=C2=A0Guix in=0Atheir daily lives."))=0A=0A (di= v=0A (@ (class "fields-box"))=0A=0A " " ; A space for readabili= ty in non-CSS browsers (same below).=0A ,(button-big=0A #:lab= el (C_ "SOFTWARE DEVELOPMENT" "button")=0A #:url (guix-url "blog/ta= gs/software-development/")=0A #:light #true)=0A " "=0A = ,(button-big=0A #:label (C_ "BIOINFORMATICS" "button")=0A #= :url (guix-url "blog/tags/bioinformatics/")=0A #:light #true)=0A = " "=0A ,(button-big=0A #:label (C_ "HIGH PERFORMANCE COMP= UTING" "button")=0A #:url (guix-url "blog/tags/high-performance-com= puting/")=0A #:light #true)=0A " "=0A ,(button-big=0A = #:label (C_ "RESEARCH" "button")=0A #:url (guix-url "blog/ta= gs/research/")=0A #:light #true)=0A " "=0A ,(button-big= =0A #:label (C_ "ALL FIELDS..." "button")=0A #:url (guix-ur= l "blog/")=0A #:light #true))=0A=0A ,(horizontal-separator #:l= ight #true)=0A=0A ;; Using Guix in other distros.=0A (G_=0A = `(h3=0A (@ (id "guix-in-other-distros"))=0A "GNU Guix in o= ther GNU/Linux distros"))=0A=0A (div=0A (@ (class "info-box"))= =0A (video=0A (@ (class "video-preview")=0A (src "https://audio-vi= deo.gnu.org/video/misc/2016-07__GNU_Guix_Demo_2.webm")=0A (poster ,(guix= -url "static/media/img/guix-demo.png"))=0A (controls "controls"))=0A = (G_=0A `(p=0A "Video: "=0A ,(G_ (link-yello= w=0A #:label "Demo of Guix in another GNU/Linux distributio= n"=0A #:url "https://audio-video.gnu.org/video/misc/\=0A201= 6-07__GNU_Guix_Demo_2.webm"))=0A " (1 minute, 30 seconds)."))))= =0A=0A (div=0A (@ (class "info-box justify-left"))=0A ,(G_= `(p=0A "If you don't use GNU=C2=A0Guix as a standalone GNU/Li= nux \=0Adistribution, you still can use it as a package manager on top of a= ny \=0AGNU/Linux distribution. This way, you can benefit from all its conve= niences."))=0A=0A ,(G_ `(p=0A "Guix won't interfere with= the package manager that comes \=0Awith your distribution. They can live t= ogether.")))=0A=0A (div=0A (@ (class "action-box centered-text")= )=0A ,(button-big=0A #:label (C_ "TRY IT OUT!" "button")=0A = #:url (guix-url "download/")=0A #:light #true)))=0A=0A ;; Latest Blog = posts.=0A (section=0A (@ (class "centered-text"))=0A (G_ `(h2= "Blog"))=0A=0A ,@(map post-preview (context-datum context "posts"))= =0A=0A (div=0A (@ (class "action-box centered-text"))=0A ,= (button-big=0A #:label (C_ "ALL POSTS" "button")=0A #:url (guix-ur= l "blog/"))))=0A=0A ;; Contact info.=0A (section=0A (@ (class = "contact-box centered-text"))=0A (G_ (h2 "Contact"))=0A=0A ,@(map= contact-preview (context-datum context "contact-media"))=0A=0A (div= =0A (@ (class "action-box centered-text"))=0A ,(button-big=0A = #:label (C_ "ALL CONTACT MEDIA" "button")=0A #:url (guix-url "conta= ct/")))))))=0A --ifowlwrbqzqklseo Content-Type: application/vnd.ms-powerpoint Content-Disposition: attachment; filename="guix-website.pot" Content-Transfer-Encoding: quoted-printable =0Amsgid "GNU's advanced distro and transactional package manager"=0Amsgstr= ""=0A=0Amsgid "Guix is an advanced distribution of the GNU operating syste= m.\n Guix is technology that respects the freedom of computer users.\n = You are free to run the system for any purpose, study how it works,\n imp= rove it, and share it with the whole world."=0Amsgstr ""=0A=0Amsgid "GNU|Li= nux|Unix|Free software|Libre software|Operating system|GNU Hurd|GNU Guix pa= ckage manager|GNU Guile|Guile Scheme|Transactional upgrades|Functional pack= age management|Reproducibility"=0Amsgstr ""=0A=0Amsgid "<1/>Summary"=0Amsgs= tr ""=0A=0Amsgid "<1/> Guix is an advanced\n distribution of the de= veloped by the =E2=80=94which respects the . "=0Amsgstr ""=0A=0Amsgid "<1/>= Guix transactional upgrades and roll-backs, unprivileged\n package= management, . When used as a standalone distribution, Guix supports for = transparent and reproducible operating systems."=0Amsgstr ""=0A=0Amsgid "<1= /> It provides APIs, including high-level embedded domain-specific\n = languages (EDSLs) to and ."=0Amsgstr ""=0A=0Amsgid "<1/>DOWNLOAD v"=0Ams= gstr ""=0A=0Amsgid "CONTRIBUTE"=0Amsgstr ""=0A=0Amsgid "<1/>Discover Guix"= =0Amsgstr ""=0A=0Amsgid "<1/>Guix comes with thousands of packages which in= clude\n applications, system tools, documentation, fonts, and other\n= digital goods readily available for installing with the package man= ager."=0Amsgstr ""=0A=0Amsgid "ALL PACKAGES"=0Amsgstr ""=0A=0Amsgid "<1/>GN= U Guix in your field"=0Amsgstr ""=0A=0Amsgid "<1/>Read some stories about h= ow people are using GNU\xa0Guix in their daily\n lives."=0Amsgstr ""= =0A=0Amsgid "BIOINFORMATICS"=0Amsgstr ""=0A=0Amsgid "HIGH PERFORMANCE COMPU= TING"=0Amsgstr ""=0A=0Amsgid "RESEARCH"=0Amsgstr ""=0A=0Amsgid "ALL FIELDS.= =2E."=0Amsgstr ""=0A=0Amsgid "<1/>GNU Guix in other GNU/Linux distros"=0Ams= gstr ""=0A=0Amsgid "<1/>Video: (1 minute, 30 seconds)."=0Amsgstr ""=0A=0Am= sgid "<1/>"=0Amsgstr ""=0A=0Amsgid "TRY IT OUT!"=0Amsgstr ""=0A=0Amsgid "<1= />Blog"=0Amsgstr ""=0A=0Amsgid "ALL POSTS"=0Amsgstr ""=0A=0Amsgid "<1/>Cont= act"=0Amsgstr ""=0A=0Amsgid "ALL CONTACT MEDIA"=0Amsgstr ""=0A --ifowlwrbqzqklseo--