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: Sat, 16 Dec 2017 13:37:36 +0100 Message-ID: <20171216123736.yyw7qm6cth5a7qj7@floriannotebook> References: <20171209180619.GA10254@floriannotebook.localdomain> <87y3m4bqhz.fsf@dustycloud.org> <20171215120628.6u3yfwndme6kl2ua@abyayala> <87k1xnngl4.fsf@elephly.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="t7pzm7fcc32v6qoa" X-Trace: blaine.gmane.org 1513427861 4724 195.159.176.226 (16 Dec 2017 12:37:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 16 Dec 2017 12:37:41 +0000 (UTC) User-Agent: NeoMutt/20171208 Cc: Guile User , guile-devel , ng0 To: Ricardo Wurmus Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Dec 16 13:37:36 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 1eQBii-0000qC-Aw for guile-devel@m.gmane.org; Sat, 16 Dec 2017 13:37:36 +0100 Original-Received: from localhost ([::1]:50418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQBin-0001tF-He for guile-devel@m.gmane.org; Sat, 16 Dec 2017 07:37:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQBig-0001r1-G9 for guile-devel@gnu.org; Sat, 16 Dec 2017 07:37:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQBid-0002w6-Ae for guile-devel@gnu.org; Sat, 16 Dec 2017 07:37:34 -0500 Original-Received: from pelzflorian.de ([5.45.111.108]:42750 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 1eQBic-0002ss-Sj; Sat, 16 Dec 2017 07:37:31 -0500 Original-Received: from floriannotebook (ip5b431f77.dynamic.kabel-deutschland.de [91.67.31.119]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 4E6BE360007; Sat, 16 Dec 2017 13:37:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1513427848; bh=32CtWZxE+Zq3sVXkHwjW0Kk9eTH2WTcxnm61vINodcU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=t+R/LI3mqBVg3Y8d+5LPpmakmtH8rNkeDRw1Zj18zfJ87rOUdacEfDnXLJmuIePwX PQV9USYEPBgLFl7sHs887B/KXdi0GIC/UZEvaZ0d80Eq5XB+pZSQSMwc1bUB3Pu/1F gNoKy5u1zFgpZtJ07PmYGSFmgcJ/G5EFPeYRnYuE= Content-Disposition: inline In-Reply-To: <87k1xnngl4.fsf@elephly.net> 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:19440 gmane.lisp.guile.user:14372 Archived-At: --t7pzm7fcc32v6qoa Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable For me personally, my preference is still on manually marking what goes into the Gettext pot file and I believe my idea for its syntax is suitable. For example, this is a multi-part internationalized paragraph from my website: (p ,@(__ "=E2=80=9CDon=E2=80=99t Hang=E2=80=9D by default uses the words fr= om \ the ||ic_|/usr/share/dict|| directory, but it can deal with any list of \ expressions in a text file with one expression per line. ||samplelink_|Here= || \ is an example word list file compiled with words from \ ||wiktionarylink_|Wiktionary=E2=80=99s list of 1000 basic English words|| w= hich you \ can use if you want simpler words. This sample word list is available under= \ the terms of ||ccbysalink_|the CC-BY-SA 3.0 Unported license||, because \ Wiktionary uses this license and the words are taken from there." `(("ic_" . ,(lambda (text) `(span (@ (class "inline-code")) ,text))) ("samplelink_" . ,(lambda (text) (a-href "sample-word-lists/english-words.txt" text))) ("wiktionarylink_" . ,(lambda (text) (a-href "https://en.wiktionary.org/wiki/Appendix: 1000_b\ asic_English_words" text))) ("ccbysalink_" . ,(lambda (text) (a-href "sample-word-lists/CCBYSA-3.0-UNPORTED.txt" text)))))) But since there seems to be a demand for automatic extraction without marking each piece of translatable text, maybe Haunt should offer that as well. This would involve deciding which parts of a Scheme file are SHTML code and which parts are just Scheme. Maybe that can mostly be deduced from context but some false positives may need to be dealt with. Also in SHTML code there is the issue of whether e.g. URLs should go into the pot file or not. I will take a look at Haunt and upstreaming next week. Currently my main concern is build system integration. I want to just run =E2=80=9Eninja mywebsite-pot=E2=80=9C to build the pot file. But GNU Autotools are complicated, Meson/Ninja depend on Python and probably Haunt should integrate with each of them eventually=E2=80=A6 Regards, Florian --t7pzm7fcc32v6qoa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEwRjGsqAMqXB4uw3y3T6EbElHBVsFAlo1E4sACgkQ3T6EbElH BVvH3BAAroyMOtXL2peus1BHfE0iCVXLm7YMIzoVZf5u2fTCHiB7Mg0s4uEp/knl cPygRuiMB7Cw4lq0eBXluvrW4uOACZg+mP0kDSqmqKOQnS39L8L9Ppyyb8YUq04J d0vneaG5ek3xzNumvY4j+n605YZgBz94H9p5F+YkjI8TWhH/7tiN/7KoLAukTlHr mShildA7NeQG/BS5H2ck36Yki1OEB/tRCenNqE0W96MJUDqMaP/wZLt4yc3IA1mo UiFUiP6NCUzh3Z3rcoBD/FiBxhBPxXVPN/F7oW1uPG9Ig99ERRWzyTwx18YG2f8S FjYjH6Yc2IZs7c5FdzzqUq8FOdJkeT8fNI/hWbsBygluyAZqM6ZG5a4nla5WmsZ0 fxXCc190jufLGWYAf0nEGCwPSZ8h2yQXpG3h8h9zHoM4kCQm00nuH4dsnVHOg0ZX FRxDW14ktByDbvrSRaiuMBlKrLWP8q4qQjZKh12HCKvIcNzSb/E3y5WLY3Mw+LeZ 1L7rYANAfjem74HZEojAy5OyYijtyNA3ph3aUCAUJTXNcuX+WtSLpC4m3Yao5C+x mIwmDjND+rI4DwilYq8wuTD8I+WYZDR8osndxA7U79c9/zLWbYQjuyvyeazlMb1i +V9h+s+E2sL8ooL2BIrKm2btsJZJ9BFofJh9A8Ug0R1+VoJsKLY= =fape -----END PGP SIGNATURE----- --t7pzm7fcc32v6qoa--