From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Website translation Date: Mon, 15 Jul 2019 14:33:25 +0200 Message-ID: <87ims3o4tm.fsf@gnu.org> 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> 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]:37099) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn0Ab-0008B6-Vg for guix-devel@gnu.org; Mon, 15 Jul 2019 08:33:31 -0400 In-Reply-To: <20190714142625.my2n7ypimctk3vbd@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Sun, 14 Jul 2019 16:26:25 +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, matias_jose_seco@autoproduzioni.net "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_ do = because it gives >> translators fragments of sentences, which does not allow them to >> correctly translate text. >> > > Format strings are something we can try. 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. Yes. 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 . lst)) lst))) `(div ,@(X_ "This is a link.")) --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"). Maybe we=E2=80=99ll need a combination of format strings and stuff like tha= t. Thanks, Ludo=E2=80=99.