From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GFqoEqr6Hl/8FQAA0tVLHw (envelope-from ) for ; Mon, 27 Jul 2020 16:02:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wLiCDqr6Hl9SDQAA1q6Kng (envelope-from ) for ; Mon, 27 Jul 2020 16:02:50 +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 98C659403AE for ; Mon, 27 Jul 2020 16:02:49 +0000 (UTC) Received: from localhost ([::1]:57370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k05aS-00026D-E1 for larch@yhetil.org; Mon, 27 Jul 2020 12:02:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k05Zi-0001V2-KQ for bug-guix@gnu.org; Mon, 27 Jul 2020 12:02:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43993) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k05Zi-0008Ei-7v for bug-guix@gnu.org; Mon, 27 Jul 2020 12:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k05Zi-0005vY-3v for bug-guix@gnu.org; Mon, 27 Jul 2020 12:02: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: Mon, 27 Jul 2020 16:02:02 +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.159586568322724 (code B ref 26302); Mon, 27 Jul 2020 16:02:02 +0000 Received: (at 26302) by debbugs.gnu.org; 27 Jul 2020 16:01:23 +0000 Received: from localhost ([127.0.0.1]:55539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k05Yy-0005uI-KW for submit@debbugs.gnu.org; Mon, 27 Jul 2020 12:01:23 -0400 Received: from pelzflorian.de ([5.45.111.108]:60472 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k05Yu-0005u4-Na for 26302@debbugs.gnu.org; Mon, 27 Jul 2020 12:01:15 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 912A03602A4; Mon, 27 Jul 2020 18:01:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1595865670; bh=umINjvEH5FXtQlkdNGs3SmAIvYMdwbcKkZANiJlOq+Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=t0kJSBG1upKfR0vtVNSMqoaM99VJ9QiHgcPd62TPlZ1vjt108N7+bAWfqHK5cmCpP qytgIElxsfQTkzDBu41Z2C+/CBK6e0bWDCW7Bft0cWUC6EskqGM2sFEfhv39l/UfMv 3q3vA3tZKwSU6VwxOdF+47ytrlwhtSRxOsrRCbCI= Date: Mon, 27 Jul 2020 18:01:01 +0200 From: "pelzflorian (Florian Pelz)" Message-ID: <20200727160101.nsznenkv75wcsuoe@pelzflorian.localdomain> References: <20200409145730.qd2nqg4gxrf4ofzw@pelzflorian.localdomain> <878sj43cja.fsf@gnu.org> <20200409173102.gaheruhtp7fg6cgg@pelzflorian.localdomain> <20200705090808.7c7ihjnymo6hv7ch@pelzflorian.localdomain> <87d054bzru.fsf@gnu.org> <20200709144524.fjri2znqer2dzn7a@pelzflorian.localdomain> <20200710172732.7a2tm7hcqt4mmhlo@pelzflorian.localdomain> <20200712061927.uoubuabreji4dw54@pelzflorian.localdomain> <87d04i2mpc.fsf_-_@gnu.org> <20200726185740.p2cobbqpyevywpkl@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ef7tz56xdbuqpfnq" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200726185740.p2cobbqpyevywpkl@pelzflorian.localdomain> 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=t0kJSBG1; 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: qP7nze+gdcNW --ef7tz56xdbuqpfnq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sun, Jul 26, 2020 at 08:58:11PM +0200, pelzflorian (Florian Pelz) wrote: > Ohh sorry, the manual disappeared. I suppose it is built in /srv/…/manual/? Thank you Ludo for fixing this! > > Should we publicize a process to contribute translations? It could be a > > page on the web site linked from the bottom of each page or something. > > Thoughts? > > One way would be to tar up the website and send it to the Translation > Project. I don’t know about the status of the Weblate plans. I would suggest sending a tar archive with the website directory of guix-artwork to the TP once more (ideally along with a current tarball of Guix proper). Also I think even if once we use different technology like Weblate instead of the TP, the TP should remain the go-to place for our translators, because it is where many other projects’ translators gather. > > It would also be nice to have a blog post mentioning this, perhaps > > explaining the tools behind it, and why we think it matters. I could > > contribute a paragraph on linguistic diversity. :-) > > > > Thanks! > > > > Ludo’. > > So far I think Guix always needs more users and translations help. > Also Scheme’s homoiconicity makes it easy to write translation macros. > I will think some more what I could say about this tomorrow. Please find attached a first draft blog post. Regards, Florian --ef7tz56xdbuqpfnq Content-Type: text/markdown; charset=utf-8 Content-Disposition: attachment; filename="1st-draft-blog-post-translatable-website.md" Content-Transfer-Encoding: 8bit title: Adding translations to Guix’ website date: 2020-07-28 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](/help) can expect an answer even if they do so in languages other than English. We also offer software translations 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. Guix uses GNU Gettext for its translations, with which translatable strings are extracted from the source code to so-called PO files. Translators can use any of various free-software tools, such as [GNU Emacs](https://www.gnu.org/software/emacs/) or [Poedit](https://poedit.net/), for filling in translations. With [Po4a](https://po4a.org/), we can also use Gettext’s tooling to translate Guix’ [manual](/manual) and [cookbook](/cookbook). But 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 [SHTML](https://www.nongnu.org/guile-lib/doc/ref/htmlprag/), which is a variant of HTML (in which web pages are usually written) that integrates well with the [Scheme programming language](https://schemers.org/). 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 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 strings [the way it is usually done 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>defineddefined<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 [the Translation Project](https://translationproject.org/team/) or [us Guix developers](/contact) if you want to help make Guix’ website available in your language as well! --ef7tz56xdbuqpfnq--