From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: Re: Website translation Date: Thu, 18 Jul 2019 22:28:31 +0200 Message-ID: <20190718202831.4vavgrmogrkpdote@pelzflorian.localdomain> References: <878st932e4.fsf@dustycloud.org> <877e8owqkg.fsf@gnu.org> <20190712053539.htszj5w2b2sxws64@pelzflorian.localdomain> <875zo43dt2.fsf@gnu.org> <20190714142625.my2n7ypimctk3vbd@pelzflorian.localdomain> <87ims3o4tm.fsf@gnu.org> <20190715155414.y6lv45rv55ihvzs5@pelzflorian.localdomain> <87muhc8iqi.fsf@gnu.org> <20190718150836.kzf2tmbtng5l42ta@pelzflorian.localdomain> <87h87jffd7.fsf@elephly.net> 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]:35124) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoFIm-0007nF-EC for guix-devel@gnu.org; Thu, 18 Jul 2019 18:55:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hoFIl-0003VB-7k for guix-devel@gnu.org; Thu, 18 Jul 2019 18:55:04 -0400 Content-Disposition: inline In-Reply-To: <87h87jffd7.fsf@elephly.net> 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: Ricardo Wurmus Cc: guix-devel@gnu.org, sirgazil , matias_jose_seco@autoproduzioni.net On Thu, Jul 18, 2019 at 06:59:32PM +0200, Ricardo Wurmus wrote: >=20 > pelzflorian (Florian Pelz) writes: >=20 > > I think msgctxts could help with fragmentation, as I would > > prefer format strings with msgctxt over HTML-that-is-not-SHTML with > > itstool (I may misunderstand itstool though). >=20 > I don=E2=80=99t understand. itstool operates on plain old XML fragment= s. >=20 At first I thought of plain HTML strings, but it surely was a misunderstanding. I now get the impression itstool is something like Glade=E2=80=99s . I suppose it is a wrong impression again? > What=E2=80=99s the desired workflow? Something like (li (b "Liberating.") " Guix is an advanced distribution of the " ,(link-yellow #:label "GNU operating system" #:url (gnu-url "gnu/about-gnu.html")) " developed by the " ,(link-yellow #:label "GNU Project" #:url (gnu-url)) "=E2=80=94which respects the " ,(link-yellow #:label "freedom of computer users" #:url (gnu-url "distros/free-system-distribution-guidelines.html")) ". ") could be something like (li (b ,(G_ "Liberating.")) ,(I_ " Guix is an advanced distribution of the GNU operating system developed by the GNU Project =E2=80=94which respects the freedom of computer users. " `(gnu-url-link . ,(lambda* (content #:key (path "")) (link-yellow #:label content #:url (gnu-url path)))))) or could be format strings like sirgazil=E2=80=99s code (li (b ,(G_ "Liberating.")) ,(I_ " Guix is an advanced distribution of the ~GNU OS~ developed by the ~PROJECT~=E2=80=94which respects the ~FREEDOM~. " (link-yellow #:label (G_ "GNU operating system") #:url (gnu-url "gnu/about-gnu.html")) (link-yellow #:label (G_ "GNU Project") #:url (gnu-url)) (link-yellow #:label (G_ "freedom of computer users") #:url (gnu-url "distros/free-system-distribution-guidelines.html")= ))) with the po file containing #: apps/base/templates/home.scm:42 msgid "" " Guix is an advanced\n" "distribution of the ~GNU OS~ developed\n" "by the ~PROJECT~=E2=80=94which respects the\n" "~FREEDOM~. " msgstr "" "Guix ist eine vom ~PROJECT~ entwickelte," "fortgeschrittene Distribution des ~GNU OS~" " =E2=80=94 die die ~FREEDOM~ respektiert." #: apps/base/templates/home.scm:47 msgid "GNU operating system" msgstr "GNU-Betriebssystems" #: apps/base/templates/home.scm:50 msgid "GNU Project" msgstr "GNU-Projekt" #: apps/base/templates/home.scm:50 msgid "freedom of computer users" msgstr "Freiheit, wie man seinen Rechner benutzt," Format strings yield fragmented PO files, which is why it might be better to use them with a msgctxt/pgettext. For example, "GNU operating system" may need different translations and grammatical cases in different places on the website. Without pgettext, this approach does not work, it seems. Another option I would like the most is using a custom PO file writer and MO file reader that generates a single msgid directly from the original nested s-expression. Such a procedure seems nice to use, but complicated to implement. Regards, Florian