From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Website translation Date: Thu, 22 Aug 2019 23:13:53 +0200 Message-ID: <874l28lx7y.fsf@gnu.org> References: <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> <20190726111155.qospxvrw7rnuwtok@pelzflorian.localdomain> <20190805130827.thp3zzw5ljo6g3h2@pelzflorian.localdomain> <20190807223310.yiwzodu7fwjhvrm6@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36981) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0uP8-0000Iv-1V for guix-devel@gnu.org; Thu, 22 Aug 2019 17:13:58 -0400 In-Reply-To: <20190807223310.yiwzodu7fwjhvrm6@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Thu, 8 Aug 2019 00:33:10 +0200") 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: "pelzflorian (Florian Pelz)" Cc: guix-devel@gnu.org, sirgazil , matias_jose_seco@autoproduzioni.net, julien lepiller Hi Florian, "pelzflorian (Florian Pelz)" skribis: > On Mon, Aug 05, 2019 at 03:08:28PM +0200, pelzflorian (Florian Pelz) wrot= e: >> I have implemented a working translation tool. Sexp-xgettext >> generates from an SHTML or other Scheme file with marked s-expressions >> a POT file which can be translated and turned into an MO file from >> which the code generates a localized HTML builder. The advantage is >> that existing SHTML will just have to be marked with G_ and no format >> string has to be written, although sometimes the SHTML should be >> adapted to produce a less complicated message in the POT file. Find >> attached an example of a marked Scheme file home.scm generating >> guix-website.pot, which after manual translation generates the >> attached guix.de_DE.html. Very clever! [...] > Find attached patches that add internationalization support, mark the > home and about pages for translation and add a sample German > translation. Feedback welcome. > > To use them, generate an MO file and run Haunt by following the > instructions in i18n-howto.txt. I have *not* written a Makefile to > automate these steps. It would be great to add the right steps to website/.guix.scm (in guix-artwork.git). > Sending these patches took longer because new bugs kept appearing. > Probably new bugs will show up when marking more files for > translation. I will add more markings in the coming days if the > patches are OK. > > I am unsure but I believe the URLs in href links should be marked with > G_ as well so translators can change them to the URL of the respective > translation of gnu.org, for example. I will make these changes later > if you agree. > > If this internationalization is to be deployed, the NGINX server > offering guix.gnu.org would need to redirect according to > Accept-Language headers. I do not know if nginx alone can do this > properly by now, otherwise there are Lua programs for nginx to handle > Accept-Language or a custom Guile webserver could be written. The nginx config is in guix-maintenance.git, but yeah, and I suspect nginx alone can handle it. We=E2=80=99ll see! I haven=E2=80=99t reviewed in detail but the approach LGTM, so I=E2=80=99d = be willing to move forward on this. Julien, sirgazil, Ricardo: WDYT? We should make sure existing URLs are preserved. Do you know if that=E2=80= =99s the case? Also, I suppose we don=E2=80=99t translate URI paths themselves, right? Th= at=E2=80=99s probably OK, at least as a first version. Thanks for your work! Ludo=E2=80=99.