From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: Re: Website translation Date: Mon, 15 Jul 2019 16:57:34 +0200 Message-ID: <9297E48A-5CB8-46EB-88AE-A589477CA584@lepiller.eu> References: <82379e4b458703ebd2a0b000b2acc46c@autoproduzioni.net> <87sgri9b90.fsf@gnu.org> <20190707165722.we3q5jne7a3wnvq4@pelzflorian.localdomain> <878st932e4.fsf@dustycloud.org> <877e8owqkg.fsf@gnu.org> <20190712053539.htszj5w2b2sxws64@pelzflorian.localdomain> <875zo43dt2.fsf@gnu.org> <20190714142625.my2n7ypimctk3vbd@pelzflorian.localdomain> <87ims3o4tm.fsf@gnu.org> 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]:41485) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn2QE-0002ot-L0 for guix-devel@gnu.org; Mon, 15 Jul 2019 10:57:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn2QD-0005o9-E9 for guix-devel@gnu.org; Mon, 15 Jul 2019 10:57:46 -0400 In-Reply-To: <87ims3o4tm.fsf@gnu.org> 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: guix-devel@gnu.org, =?ISO-8859-1?Q?Ludovic_Court=E8s?= , "pelzflorian (Florian Pelz)" Cc: matias_jose_seco@autoproduzioni.net Le 15 juillet 2019 14:33:25 GMT+02:00, "Ludovic Court=C3=A8s" a =C3=A9crit : >"pelzflorian (Florian Pelz)" skribis: > >> On Sun, Jul 14, 2019 at 04:12:41PM +0200, Ludovic Court=C3=A8s wrote: >>> Note that =E2=80=9Clego translation=E2=80=9D is what we should _not_ d= o because it >gives >>> translators fragments of sentences, which does not allow them to >>> correctly translate text=2E >>> >> >> Format strings are something we can try=2E If they are too fragmented >> for translators, we can still use a custom tool to convert them and >> their fragments to a single string which gets passed to gettext=2E > >Yes=2E > >Another option would be to locally use XML in strings, along these >lines: > >--8<---------------cut here---------------start------------->8--- >(use-modules (sxml simple) > (ice-9 match)) > >(define (X_ str) > (match (xml->sxml (string-append "" > (gettext str) > "")) > (('*TOP* ('BODY =2E lst)) lst))) > >`(div > ,@(X_ "This is a link=2E")) >--8<---------------cut here---------------end--------------->8--- > >That would allow us to remain string-oriented while still enjoying the >benefits of SXML (info "(guile) Types and the Web")=2E > >Maybe we=E2=80=99ll need a combination of format strings and stuff like t= hat=2E > >Thanks, >Ludo=E2=80=99=2E Fyi, I sent a patch a few months ago to do exactly that, but I can't find = it anymore=E2=80=A6