From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Translating to Chinese, Spanish and Japanese (and more) Date: Mon, 05 Feb 2018 18:21:18 +0100 Message-ID: <87zi4n5ql3.fsf@elephly.net> References: <20180205090716.GB10165@thebird.nl> <30df6bb24a385c945d261feb5f2f99d2@lepiller.eu> <20180205094129.efgxn7nucoj3kwsf@floriannotebook> <87po5jd3mr.fsf@elephly.net> <20180205144750.qfuvhpzg3dqtbsop@floriannotebook> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eikhX-0002GU-2A for guix-devel@gnu.org; Mon, 05 Feb 2018 12:37:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eikhT-00053R-Tr for guix-devel@gnu.org; Mon, 05 Feb 2018 12:37:07 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21083) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eikhT-0004rf-MN for guix-devel@gnu.org; Mon, 05 Feb 2018 12:37:03 -0500 In-reply-to: <20180205144750.qfuvhpzg3dqtbsop@floriannotebook> 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 pelzflorian (Florian Pelz) writes: > On Mon, Feb 05, 2018 at 01:26:04PM +0100, Ricardo Wurmus wrote: >> Simple XML might be a better candidate for a DSL. Translators would get >> a string like =E2=80=9CInstallation instructions.=E2=80=9D = and give us back >> a translated string such as =E2=80=9C=E5=AE=89=E8=A3=85=E8=AF=B4= =E6=98=8E=E3=80=82=E2=80=9D On the haunt side >> we would have a procedure that parses the XML to SXML and we could >> operate on the S-expression. So instead of this: >> > > Ah, that is what you mean by XML. I used "link|Installation > instructions" for that, but yes, maybe XML is easier to understand / > more familiar for translators. What=E2=80=99s good about using XML is that we already have parser and tool= ing support for it. It can even be nested (though you shouldn=E2=80=99t go overboard with it), which may sometimes be necessary, and we can easily and programmatically access individual parts of the XML tree with sxpath and the like. > I believe this Gettext support should be separate from Haunt so it can > be reused e.g. for Web servers written in Guile. Yes, I agree. After playing with it for a while on the train it looks like it could be implemented without modifying Haunt at all. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net