From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christopher Lemmer Webber Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: Website translations with Haunt Date: Thu, 14 Dec 2017 21:48:40 -0600 Message-ID: <87y3m4bqhz.fsf@dustycloud.org> References: <20171209180619.GA10254@floriannotebook.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1513311687 7158 195.159.176.226 (15 Dec 2017 04:21:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 15 Dec 2017 04:21:27 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.3.1 Cc: Guile User , guile-devel To: "pelzflorian \(Florian Pelz\)" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Dec 15 05:21:23 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePhUx-0001eU-6v for guile-devel@m.gmane.org; Fri, 15 Dec 2017 05:21:23 +0100 Original-Received: from localhost ([::1]:44399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePhV4-00020X-7V for guile-devel@m.gmane.org; Thu, 14 Dec 2017 23:21:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePh03-0001y6-8L for guile-devel@gnu.org; Thu, 14 Dec 2017 22:49:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePgzz-0002JE-1R for guile-devel@gnu.org; Thu, 14 Dec 2017 22:49:26 -0500 Original-Received: from dustycloud.org ([50.116.34.160]:33356) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ePgzy-0002IX-TI; Thu, 14 Dec 2017 22:49:22 -0500 Original-Received: from oolong (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 579092675F; Thu, 14 Dec 2017 22:49:21 -0500 (EST) In-reply-to: <20171209180619.GA10254@floriannotebook.localdomain> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 50.116.34.160 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19432 gmane.lisp.guile.user:14356 Archived-At: pelzflorian (Florian Pelz) writes: > I want to ask for your thoughts on my new solution since translations > are probably important to many Haunt users. In particular, I believe > there was some discussion on Website translation on the Guile or Guix > lists as well. And not just important to Haunt... many sxml using projects! At one point Mark Weaver and I were talking about something like a special quasiquote that could be used for translations with gettext, since many translations are very tricky in situations like: `(p "Download from " (a (@ (href ,link)) "this webpage") ".") The naive approach would be to have different translations for "Download from " and "this webpage" and (egads) "." However this is called "lego translations" and unfortunately is nowhere near as elegant as lego... different languages have different word order so there is no safe way to "break apart" a translation like this into bits. The right way to do it using a special gettext quasiquote would probably be like: #_(p "Download from " (a (@ (href #_,link)) "this webpage") ".") or some such thing, which could then produce a string for translation that looks like: "(p \"Download from \" (a (@ (href #_,$1)) \"this webpage\") \".\")" or some such thing. What do you think about this direction? It would require some new tooling, but I think it's the best way forward probably?