From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "pelzflorian (Florian Pelz)" Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: Website translations with Haunt Date: Fri, 15 Dec 2017 15:25:01 +0100 Message-ID: <20171215142500.2ja5lqskib2vb7v5@floriannotebook> References: <20171209180619.GA10254@floriannotebook.localdomain> <87y3m4bqhz.fsf@dustycloud.org> <20171215120628.6u3yfwndme6kl2ua@abyayala> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iid6hngiqxtk5y3g" X-Trace: blaine.gmane.org 1513347913 28575 195.159.176.226 (15 Dec 2017 14:25:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 15 Dec 2017 14:25:13 +0000 (UTC) User-Agent: NeoMutt/20171208 To: Guile User , guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Dec 15 15:25:03 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 1ePqv9-0006p6-2c for guile-devel@m.gmane.org; Fri, 15 Dec 2017 15:25:03 +0100 Original-Received: from localhost ([::1]:46847 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePqvF-0004u9-U3 for guile-devel@m.gmane.org; Fri, 15 Dec 2017 09:25:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePqv6-0004tq-KW for guile-devel@gnu.org; Fri, 15 Dec 2017 09:25:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePqv2-0004MC-Jp for guile-devel@gnu.org; Fri, 15 Dec 2017 09:25:00 -0500 Original-Received: from pelzflorian.de ([5.45.111.108]:42476 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ePqv2-0004L5-6q; Fri, 15 Dec 2017 09:24:56 -0500 Original-Received: from floriannotebook (eduroam-ipv4-4-0199.triple-a.uni-kl.de [131.246.176.199]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 15D2036001B; Fri, 15 Dec 2017 15:24:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1513347895; bh=Urwh9C6dNfQ8uWf4NnFcEjwKhzSp+hX/TBpQWMB5IxU=; h=Date:From:To:Subject:References:In-Reply-To; b=CfyS39q7941GKKWtUFYZlPrcVUC4oEk7mOJQsUKPVgB/cbOwSlbqB5aTkNhCP2p37 EzQT1N/Lx+Zu/NdVGvXTLSpzDBCUsekg8XasNbAoylu/DrBqtGqKXBMKO9dEcUU9Pk 7RM+iizseL6UMjJCQncQfoJXCGGdn+PC8vtgdd3M= Content-Disposition: inline In-Reply-To: <20171215120628.6u3yfwndme6kl2ua@abyayala> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 5.45.111.108 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:19437 gmane.lisp.guile.user:14367 Archived-At: --iid6hngiqxtk5y3g Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 15, 2017 at 12:06:28PM +0000, ng0 wrote: > Christopher Lemmer Webber transcribed 1.4K bytes: > > pelzflorian (Florian Pelz) writes: > >=20 > > > 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. > >=20 > > And not just important to Haunt... many sxml using projects! >=20 > What's the difference (except for the visible syntax/writing) between > SXML and XML? When I've looked into translations not just prep came to > my mind but XML has native translation support - just no one wants to > work with plain XML when it can be avoided ;) >=20 > Is there a chance that we can make use of this native translation ability > while staying user friendly? >=20 > It's been really long since I've looked into this, so excuse the gap of k= nowledge > and fuzzy "what if..."s. >=20 I found only this [1] for XML native translation support. IMHO it should be up to the SHTML author to specify the lang attribute etc. But the lang attribute and perhaps text direction should be used when writing example code or default styles. About the marking of translations: I prefer explicitly marking the strings that should be translated instead of including all of them in the Gettext pot file. Explicit markings are flexible which I believe is good when interleaving SHTML code with Scheme procedures. The w3 document [1] from above recommend extracting every element content that is not marked as its:translate=3D"no" by default. It is however difficult to automatically decide which parts of a Scheme file are (S)HTML and which parts are not, so I do not like this approach. Also often an element=E2=80=99s attributes need translation and sometimes t= he text content does not. In GTK+ UI files, which are XML, each tag can be marked with a translatable=3D"yes" attribute. Gettext then extracts each marked string into the pot file. (Although the Glade UI designer automatically adds translatable=3Dyes to all elements with text. As above, this would make autodetection difficult when other Scheme code is part of the file.) I also prefer the much shorter _ syntax that is common for Gettext rather than a translatable=3Dyes attribute because SHTML is usually written manually. tl;dr I would rather not use this =E2=80=9Cimplicit=E2=80=9D marking in Hau= nt. Regards, Florian [1] https://www.w3.org/TR/xml-i18n-bp/#AuthoringTime --iid6hngiqxtk5y3g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEwRjGsqAMqXB4uw3y3T6EbElHBVsFAloz2zcACgkQ3T6EbElH BVsotg//YWBiE6sCVkX2mvf0Ocp3auyPsMfvI0PCEE4cWzsAGhpa423n9GTkanK4 kOn0Y3zVhu+0yf7+GbQ+HHln9QpB/pALGY/R7AAlkW5MBomlohJseI53L7ku5zmF xAvR+qP6RebkjIlFAtazhRFN67QB3fOYUgjYKBJjH0aG3qMmDsWqe30km4p9fgwH 4Y3o/4cFu2u9PbaxFytR8ziWj/Asvlz9J8HBr8H53v+u9uB2PDK0sks8kUw+jcqc A+Img50banhTmV+phYNYI/0sdOEAIJcdVZjD0YiE7aBOwITpw4hjo0VDjBxyhZk5 isM4XOykgj4IOaZgs7taK9rQAT2qBjA4oqopyxHqH0c3XIHlf6XD36YCOTYQQzO2 PZqHGzTuyrIp1QR1Q1hEYLSKgC2NrOD5RS2mYj4YAjoWHc0FhCix9ZTslx0nFUxo GOUu7s03MDHSW7f0fue1iRkcKApHjGibxsP/KMF/ZBZ7hAjoKU7xA0SoJi2MlZjY uvOsU4sXwFiVqZXY6VNj77BdJbEseDLoOjqvo5Su/8d44A9wt86Xq1gySNGvkIo4 2Eg8R2sWwZMi6fJWR7kbWgHlUmoJ64Ex2lLOzNsicBPa+YSnPYsXXwOvwdmJG8I0 9laqvI/iUq9wO041FT9SOlEttKgbPCU5u+e2C2u8au4iQ0vnSZE= =B6MA -----END PGP SIGNATURE----- --iid6hngiqxtk5y3g--