From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ArE3J+SAKV9bPwAA0tVLHw (envelope-from ) for ; Tue, 04 Aug 2020 15:38:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2DTGIuSAKV8DUAAAB5/wlQ (envelope-from ) for ; Tue, 04 Aug 2020 15:38:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CD1459400C7 for ; Tue, 4 Aug 2020 15:38:11 +0000 (UTC) Received: from localhost ([::1]:53408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2z0z-00027L-FJ for larch@yhetil.org; Tue, 04 Aug 2020 11:38:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2z0s-000278-BW for bug-guix@gnu.org; Tue, 04 Aug 2020 11:38:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2z0s-00007J-2R for bug-guix@gnu.org; Tue, 04 Aug 2020 11:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k2z0s-0008ER-0R for bug-guix@gnu.org; Tue, 04 Aug 2020 11:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26302: Multilingual web site is on-line! Resent-From: "pelzflorian (Florian Pelz)" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 04 Aug 2020 15:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26302 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 26302-submit@debbugs.gnu.org id=B26302.159655545031602 (code B ref 26302); Tue, 04 Aug 2020 15:38:01 +0000 Received: (at 26302) by debbugs.gnu.org; 4 Aug 2020 15:37:30 +0000 Received: from localhost ([127.0.0.1]:48886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2z0F-0008DV-16 for submit@debbugs.gnu.org; Tue, 04 Aug 2020 11:37:30 -0400 Received: from pelzflorian.de ([5.45.111.108]:43196 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2z0C-0008DM-PQ for 26302@debbugs.gnu.org; Tue, 04 Aug 2020 11:37:22 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 2D15A3602A4; Tue, 4 Aug 2020 17:37:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1596555439; bh=FXzmxx7pqXZYz3sUGgfLRIgpp8k2SrE6sNgSGoOTbYM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=WSzMbjE9QE7l2XJST9TkIZccExXjZ8SyZMdkKgH36lqTRAqhkRzktFf3G0P0aMlS3 cz6igKXrjUghQcJ9UJvre2kOl/E+GmvqOkilb6pd9UrNH6nfXNi6+XlKK/h2aCAqFf 5iHjzmgYJCS6Ui94ykf0d8Aq1R69Q45BnebpJuD0= Date: Tue, 4 Aug 2020 17:37:10 +0200 From: "pelzflorian (Florian Pelz)" Message-ID: <20200804153554.6vosez3tn3fa3tlk@pelzflorian.localdomain> References: <87d054bzru.fsf@gnu.org> <20200709144524.fjri2znqer2dzn7a@pelzflorian.localdomain> <20200710172732.7a2tm7hcqt4mmhlo@pelzflorian.localdomain> <20200712061927.uoubuabreji4dw54@pelzflorian.localdomain> <87d04i2mpc.fsf_-_@gnu.org> <20200726185740.p2cobbqpyevywpkl@pelzflorian.localdomain> <20200727160101.nsznenkv75wcsuoe@pelzflorian.localdomain> <87k0yns416.fsf@gnu.org> <20200729192103.2fug7t6to2tuiwew@pelzflorian.localdomain> <874kpnu4j8.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="wvhxrlscuggwwcba" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <874kpnu4j8.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniela Lura , sirgazil , 26302 <26302@debbugs.gnu.org> Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=pelzflorian.de header.s=mail header.b=WSzMbjE9; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: UZdqKwpJhr/v --wvhxrlscuggwwcba Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Fri, Jul 31, 2020 at 04:45:31PM +0200, Ludovic Courtès wrote: > "pelzflorian (Florian Pelz)" skribis: > > On Tue, Jul 28, 2020 at 11:50:13PM +0200, Ludovic Courtès wrote: > >> I wonder if we should link to more practical step-by-step instructions > >> on how to get started translating, to lower the barrier for those who > >> want to get started without engaging in possibly open-ended discussions > >> with the fabulous Guix team. :-) > > I don’t know how best to integrate step-by-step instructions. While > > the TP has instructions > > , they seem more > > intimidating to me than, as a first step, talking to the helpful > > people at the TP. A few steps also describe how to disclaim > > copyright, which Guix does not ask for anyway. > Yeah, dunno. In the post you could duplicate/filter those steps just so > it’s more directly understandable what it takes to translate pages. > Your call! I rewrote the part for translators that comes before the first source code in the post and changed it again and again while a not-yet-Guix-using friend gave helpful feedback. I attach the current draft blog post, but currently you can also read it at: https://pelzflorian.de/adding-translations-to-guix-website/index.html Regards, Florian --wvhxrlscuggwwcba Content-Type: text/markdown; charset=utf-8 Content-Disposition: attachment; filename="3rd-draft-adding-translations-to-guix-website.md" Content-Transfer-Encoding: 8bit title: Adding translations to Guix’ website date: 2020-08-01 15:00 author: Florian Pelz tags: Community --- As part of [GNU](https://www.gnu.org), Guix aims to bring freedom to computer users all over the world, no matter the languages they (prefer to) speak. For example, Guix users asking for [help](https://guix.gnu.org/help) can expect an answer even if they do so in languages other than English. We also offer translated software for people more comfortable with a language other than English. Thanks to many people who contribute translations, GNU Guix and the packages it distributes can be used in various languages, which we value greatly. We are happy to announce that Guix’ website can now be translated in the same manner. If you want to get a glimpse on how the translation process works, first from a translator’s, then from a programmer’s perspective, read on. The process for translators is kept simple. Like lots of other free software packages, Guix uses [GNU Gettext](https://www.gnu.org/software/gettext) for its translations, with which translatable strings are extracted from the source code to so-called PO files. If this is new to you, the magic behind the translation process is best understood by taking a look at one of them. Download a PO file from [your language’s team at the Translation Project (TP)](https://translationproject.org/team). Even though PO files are text files, changes should not be made with a text editor but with PO editing software. Translators can use any of various free-software tools for filling in translations, of which [Poedit](https://poedit.net) is one example. There also is a [special PO editing mode](https://www.emacswiki.org/emacs/PoMode) for users of [GNU Emacs](https://www.gnu.org/software/emacs). Over time translators find out what software they are happy with and what features they need. Help with translations is much appreciated. If you intend to become a translator, before you begin with serious editing of a PO file, you should learn about how your TP team is organized. You need to talk to [your team](https://translationproject.org/team) at the Translation Project, which also helps avoid duplicate work. The TP also hosts a [list of steps](https://translationproject.org/html/translators.html) to help new translators getting started, though not all are needed for Guix — we at Guix do not require a copyright disclaimer — and it may be easier to talk to the helpful people at your TP team. So much for the translation of ordinary source code. With [Po4a](https://po4a.org), we can also use Gettext’s tooling to translate Guix’ [manual](https://guix.gnu.org/manual/) and [cookbook](https://guix.gnu.org/cookbook/). But all this was not true of its web presence. That’s why after a [lengthy process,](https://issues.guix.info/issue/26302) the website of GNU Guix has undergone an update. It now supports translation into other languages. Such support is known as internationalization (“i18n”). Guix’ website is written in a variant of HTML (in which web pages are usually written) that integrates better with the [Scheme programming language](https://schemers.org). Instead of XML tags, we use [SXML](https://www.gnu.org/software/guile/manual/html_node/SXML.html). This allows web authors to mix code and text. It looks like this: ```scheme `(section (h2 "On packaging") (p "Packages are " (a (@ (href ,(manual-url "Defining-Packages.html"))) "defined") " as native " (a (@ (href ,(gnu-url "software/guile"))) "Guile") " modules.")) ``` However, this mixing makes it more difficult to extract the strings to be translated. We therefore cannot take the same approach as [gnu.org](https://www.gnu.org), which uses a software package called [GNUnited Nations](https://www.gnu.org/software/gnun) to extract from pure HTML mark-up. Translators are not always coders and we would prefer to show them only the textual part, like this: ``` msgid "Packages are <1>defined as native <2>Guile modules." ``` Our new, custom i18n system does this. The website authors need to mark translatable expressions in the same way ordinary strings are [usually marked in Guile Scheme programs:](https://www.gnu.org/software/guile/manual/html_node/Gettext-Support.html#Gettext-Support) ```scheme `(section ,(G_ `(h2 "On packaging")) ;; TRANSLATORS: Defining Packages is a section name ;; in the English (en) manual. ,(G_ `(p "Packages are " ,(G_ (manual-href "defined" (G_ "en") (G_ "Defining-Packages.html"))) " as native " ,(G_ `(a (@ (href ,(gnu-url "software/guile"))) "Guile")) " modules."))) ``` Translators can arbitrarily change the ordering: ``` #. TRANSLATORS: Defining Packages is a section name #. in the English (en) manual. #: apps/base/templates/about.scm:64 msgid "Packages are <1>defined<1.1>en<1.2>Defining-Packages.html as native <2>Guile modules." msgstr "Pakete werden als reine <2>Guile-Module <1>definiert<1.1>de<1.2>Pakete-definieren.html." ``` Details are [documented here](https://git.savannah.gnu.org/cgit/guix/guix-artwork.git/tree/website/i18n-howto.txt). We hope it strikes the right balance between simplicity for the website’s developers and translator comfort. Still missing is a way to translate blog posts like the one you are reading here. With ideas for and by a more diverse community, we can look forward to a bright multi-lingual future. Please get in touch with [your language’s team](https://translationproject.org/team) or [us Guix developers](https://guix.gnu.org/contact) if you want to help make Guix’ website available in your language as well! #### About GNU Guix [GNU Guix](https://guix.gnu.org) is a transactional package manager and an advanced distribution of the GNU system that [respects user freedom](https://www.gnu.org/distros/free-system-distribution-guidelines.html). Guix can be used on top of any system running the kernel Linux, or it can be used as a standalone operating system distribution for i686, x86_64, ARMv7, and AArch64 machines. In addition to standard package management features, Guix supports transactional upgrades and roll-backs, unprivileged package management, per-user profiles, and garbage collection. When used as a standalone GNU/Linux distribution, Guix offers a declarative, stateless approach to operating system configuration management. Guix is highly customizable and hackable through [Guile](https://www.gnu.org/software/guile) programming interfaces and extensions to the [Scheme](https://schemers.org) language. --wvhxrlscuggwwcba--