From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: Re: Website translation Date: Fri, 12 Jul 2019 07:35:39 +0200 Message-ID: <20190712053539.htszj5w2b2sxws64@pelzflorian.localdomain> References: <82379e4b458703ebd2a0b000b2acc46c@autoproduzioni.net> <87sgri9b90.fsf@gnu.org> <20190707165722.we3q5jne7a3wnvq4@pelzflorian.localdomain> <878st932e4.fsf@dustycloud.org> <877e8owqkg.fsf@gnu.org> 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]:34557) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hloDg-0004eY-KB for guix-devel@gnu.org; Fri, 12 Jul 2019 01:35:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hloDf-00066h-CU for guix-devel@gnu.org; Fri, 12 Jul 2019 01:35:44 -0400 Content-Disposition: inline In-Reply-To: <877e8owqkg.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org, matias_jose_seco@autoproduzioni.net On Thu, Jul 11, 2019 at 05:15:11PM +0200, Ludovic Court=C3=A8s wrote: > Ah yes, I believe the issue you raised in that message (=E2=80=9Clego > translations=E2=80=9D) is not addressed by Florian=E2=80=99s approach. >=20 > However, the #_ form you propose doesn=E2=80=99t quite work either beca= use > xgettext in its current form wouldn=E2=80=99t be able to extract it. >=20 > sirgazil proposed a solution that=E2=80=99s similar to format strings t= o address > that: >=20 > https://lists.gnu.org/archive/html/guile-user/2017-12/msg00071.html >=20 > Worth a try! >=20 So: 1) We could put everything in a single string, which works with xgettext and is somewhat easy to use for translators but not quite Scheme-like. 2) We could use something like sirgazil=E2=80=99s format string solution.= It works with xgettext, but is not nice for translators. I wrote in : > This interleaving is like a format string and is common in > applications, but it separates the value of ~SPORT~ from the context > in which it should be translated. 3) We could write our own PO file writer and MO file reader and use it with either Christopher=E2=80=99s lego translation and sirgazil=E2=80=99s= format strings to use whatever format we want for developers and translators. sirgazil=E2=80=99s format strings could probably be used now and improved= with a custom PO/MO reader/writer later on. The MO file format is well documented at but =E2=80=9Cit is expectable that MO file format will evolve or change o= ver time=E2=80=9D. Such a custom reader/writer could be part of Gettext or could be a separate library. I am not going to write it though. Regards, Florian