From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4CZHJRhXrWABDwAAgWs5BA (envelope-from ) for ; Tue, 25 May 2021 21:59:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SObiIBhXrWCuSAAAbx9fmQ (envelope-from ) for ; Tue, 25 May 2021 19:59:20 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B9F5A1B71E for ; Tue, 25 May 2021 21:59:19 +0200 (CEST) Received: from localhost ([::1]:46404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lldCv-0003nT-Rc for larch@yhetil.org; Tue, 25 May 2021 15:59:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lldCh-0003n5-7G for guix-patches@gnu.org; Tue, 25 May 2021 15:59:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35416) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lldCg-0006Uz-P3 for guix-patches@gnu.org; Tue, 25 May 2021 15:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lldCg-0000Tv-OZ for guix-patches@gnu.org; Tue, 25 May 2021 15:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48637] [PATCH] website: Add publications page Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 May 2021 19:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48637 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: luis.felipe.la@protonmail.com, 48637@debbugs.gnu.org, pelzflorian@pelzflorian.de X-Debbugs-Original-To: Luis Felipe , Luis Felipe via Guix-patches via , "pelzflorian (Florian Pelz)" X-Debbugs-Original-Cc: "48637@debbugs.gnu.org" <48637@debbugs.gnu.org> Received: via spool by 48637-submit@debbugs.gnu.org id=B48637.16219727061784 (code B ref 48637); Tue, 25 May 2021 19:59:02 +0000 Received: (at 48637) by debbugs.gnu.org; 25 May 2021 19:58:26 +0000 Received: from localhost ([127.0.0.1]:46958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lldC6-0000Sh-6c for submit@debbugs.gnu.org; Tue, 25 May 2021 15:58:26 -0400 Received: from lepiller.eu ([89.234.186.109]:38346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lldC3-0000SW-2R for 48637@debbugs.gnu.org; Tue, 25 May 2021 15:58:25 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 7259b3c9; Tue, 25 May 2021 19:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date :in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:cc:from:message-id; s= dkim; bh=6wN3DAPfaPxKluOBU7Pgv/Bfl4aogbfEltX7HoMOx8Y=; b=Rnd+lgA P5z3ReuBMLVd4ldThU0fYwidDI5FLyYo6Jl3u0zLBBLIHNkkjoUxH0pU2N0siNX8 ZLVs6R2WKdLyjXFX6Jck8uKKgc7EmCAIqjdubFvp3ZTLtlU7Z//axuHZeMM5tn1v gu9ocbIIQlEB/sTWt+3687kxQnCYgncmoVkF/lW9NVZTqADqY3AlVRLsjMJGTGU+ plVwAclV9f14Pj00TQ+TJmhXVzhryNvZ4Dd4LaWSYj1MIy4PYAlDJnDZExoYFX0f ebGPv0s85hHWdfUdzE+S68QePeWJ5nDIQafR/h9ODbeiP/MgZU0UlxoAZNWpKLKx 4UNc2RnR+KlL2Ew== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id a0c3918d (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 25 May 2021 19:58:20 +0000 (UTC) Date: Tue, 25 May 2021 15:58:04 -0400 User-Agent: K-9 Mail for Android In-Reply-To: <0aOCO-8AZ9biZ9iIxwrbB509xigLvoEfiOHOXiC_hfm1YqdAKMuCftahFz-8Ix2Ikdlt8akHkyoRsH6OvV0gOzlFrcw3xdyeE2IPF5TchB0=@protonmail.com> References: <4BtcqLwBY7LgeYhUd41lhUUAcT5n2Zn9OTJUzGswTuBpLla8nBHyrQ3kJzwEMI9E7MPEnr6wBqSeCMqByldZ6i5jPR8B7ZtEi0XhwextyQo=@protonmail.com> <20210525134405.hmevensj5m42iluo@pelzflorian.localdomain> <3mZyc8pra0TLSyJS6RlWIrQGBnje7dT_EMRBeOdFC_Z2wsZGoaI1rVNVtoiI57KEOvolEiahl6j7M4UBsoO0NsuieAfDPIkZQ-MR8C5UhAE=@protonmail.com> <20210525182123.a5l4d6t3xt3qn437@pelzflorian.localdomain> <0aOCO-8AZ9biZ9iIxwrbB509xigLvoEfiOHOXiC_hfm1YqdAKMuCftahFz-8Ix2Ikdlt8akHkyoRsH6OvV0gOzlFrcw3xdyeE2IPF5TchB0=@protonmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----QG3UJ5IZL4E9FTPVJPNSLG9VNJEYON" Content-Transfer-Encoding: 7bit From: Julien Lepiller Message-ID: <02EED264-0509-453A-A016-2AD05353370B@lepiller.eu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621972760; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=8MPIDajm7SY9b2+alIHxYcHELaVtkz+g0vX8X4MAq1U=; b=FxiRSIUnde/YS+AobDY8PfmR6CE7MhZ63tJAyYlLsr/DtsLQVHZYzA3//Fs3igMdBe/Gon Zkrv9B0AsBOSzZgl625Sd1hr+MkxYGeoXcgXKFz+c/FKR1kcjmRQRZegG2c60AHpWIpxDt F4upEOE/8EB4hJkKoOERg12McePu/B1yKlW1O+hWqmjXcOXMdYVggVccdZZ2aPy941IHQa d7m2tx5tOeOrTDB7Ai1+11Y21ufH2ibvBd7hgBpMiQgNYbclVCViB9riEg9mzaJap+1/3T zKrPIgh24izEIjQ3fn/CtfjGAso9jkEOXSd7cXmVodznSLMM7UVG7x47uWSlAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621972760; a=rsa-sha256; cv=none; b=IAeDoXwXGHx3XEmrWE3BQH06qgX0qhADJd4j0+hG8vb4/PqQdfd8XDqfLc/IavYlSHrpic oOv7t+iS6UnXfWjj9cCbiepPs4ePKupbs2FjudPS0Ubn6SuZ542OmlvZYStHLNcotdAyNq vO74kb2zci+llwY2qFeVw5VFZI8nnl4WmLIvdtQMrMVUuTeNDvMRvugdpjxrZB9e8QpU09 0thzfP6cD6W8IzV09OiTYKrpC+M2HZW3Ix0HSME2fZ4B/0k/M6KbXkUxmeNfVIFIF4x5Te XN5GbVS+R5XmT+yWoxsF9c03YTjW8VthCrsaRel2l5wHze1d030ea6a9uCR8lQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b="Rnd+lgA "; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b="Rnd+lgA "; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: B9F5A1B71E X-Spam-Score: 0.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: ivusxutqy/Bd ------QG3UJ5IZL4E9FTPVJPNSLG9VNJEYON Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Do we need to have a list for authors? Couldn't we have a single translatab= le string with all the authors, so it's easier to translate than having to = translate a separator? I mean you could have weird rujes on separators=2E E= ven in English, you'd need an "and" for the last element, unless there's on= e author=2E Giving the full list of authors to translate gives the most fre= edom to translators=2E Also, please give context/comment to the last one, because it's not easy t= o guess what <1> in "Published <1> by <2>" would be :) Le 25 mai 2021 15:46:17 GMT-04:00, Luis Felipe via Guix-patches via a =C3=A9crit : >On Tuesday, May 25, 2021 6:21 PM, pelzflorian (Florian Pelz) > wrote: > >> On Tue, May 25, 2021 at 02:37:03PM +0000, Luis Felipe wrote: >> >> > Yeah=2E Would it as follows? (I still struggle with i18n): >> > (p >> > (@ (class "publication-info")) >> > ,(G_ `("Published " >> > ,(date->string (publication-date publication) >> > (C_ "SRFI-19 date->string format" "~b ~d, ~Y")) >> > " by " >> > ,(string-join (publication-authors publication) ", ")))) >> >> It would need to be >> >> (p >> (@ (class "publication-info")) >> ,(let ((format (C_ "SRFI-19 date->string format" "~b ~d, ~Y"))) >> >> (G_ `("Published " >> ,(date->string (publication-date publication) format) >> >> " by " >> ,(string-join (publication-authors publication) ", ") >> "")))) >> >> >> The let is needed because C_ cannot be nested inside G_ because the >> sexp-xgettext script parses Scheme files in only one pass currently=2E >> (And I=E2=80=99m not motivated enough to make it go back to parse the n= ested >> C_ because nesting is seldom needed=2E) >> >> The "" at the end is needed so (string-join =E2=80=A6) gets its own XML >> element that can be moved by translators=2E >> >> Without "": >> >> msgid "Published <1/> by " >> >> With "": >> >> msgid "Published <1/> by <2/>" > >You told me that before but I forgot :P > > >> > Also, I think the delimiter for "string-join" in the list of >authors >> > should be translated because that comma is not used in Japanese, >for >> > example=2E So would it be ok like this: >> > [=E2=80=A6] >> > ,(string-join (publication-authors publication) >> > (C_ "Separator of items in a list" ", "))))) >> >> Yes, you are very right, although as above please move it to the let=2E >> Then it can become =E3=80=81 or =E3=81=A8 or whatever; I don=E2=80=99t = know what is common >> in Japan=2E >> >> > I'm still unsure about when I should use a context and when a >> > TRANSLATORS comment=2E=2E=2E >> >> A msgctxt should be used if another ", " string with different >> translations might be added=2E I would use a context, I think, but >> maybe it is an abundance of caution=2E > >Ok, so I moved both the date and the list authors to the definitions >part of a let: > >(define (publication->shtml publication) > "Return an SHTML representation of the given publication object=2E > > PUBLICATION () > A publication object as defined in (apps media types)=2E" > (let ((date > (date->string (publication-date publication) > (C_ "SRFI-19 date->string format" "~b ~d, ~Y"))) > (authors > (string-join (publication-authors publication) > (C_ "Separator for authors in a list" ", ")))) > > `(a > (@ (class "publication-preview") > (href ,(publication-url publication))) > > (h3 > (@ (lang ,(publication-language publication)) > (class "publication-title")) > ,(publication-title publication)) > > (p > (@ (class "publication-info")) > ,(G_ `("Published " ,date " by " ,authors "")))))) > >Does it look right? ------QG3UJ5IZL4E9FTPVJPNSLG9VNJEYON Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Do we need to have a list for authors? Couldn't we= have a single translatable string with all the authors, so it's easier to = translate than having to translate a separator? I mean you could have weird= rujes on separators=2E Even in English, you'd need an "and" for the last e= lement, unless there's one author=2E Giving the full list of authors to tra= nslate gives the most freedom to translators=2E

Also, please give co= ntext/comment to the last one, because it's not easy to guess what <1>= ; in "Published <1> by <2>" would be :)

Le 25 mai 2021 15:46:17 GMT-04:00, Luis Felipe via Guix-patches = via <guix-patches@gnu=2Eorg> a =C3=A9crit :
On Tuesday, May 25, 2021 6:21 PM, pelzflorian (Flori=
an Pelz) <pelzflorian@pelzflorian=2Ede> wrote:

On Tue, May 25, 2021 at 02:37:03PM +0000= , Luis Felipe wrote:

,(G_ `("Published "
,(date->string (publ= ication-date publication)
(C_ "SRFI-19 date->string format" "~b ~d, ~= Y"))
" by "
,(string-join (publication-authors publication) ", "))))<= br>

It would need to be

(p
(@ (class "publicat= ion-info"))
,(let ((format (C_ "SRFI-19 date->string format" "~b ~d,= ~Y")))

(G_ `("Published "
,(date->string (pub= lication-date publication) format)

" by "
,= (string-join (publication-authors publication) ", ")
""))))

The let is needed because C_ cannot be nested inside G_ because = the
sexp-xgettext script parses Scheme files in only one pass currently= =2E
(And I=E2=80=99m not motivated enough to make it go back to parse t= he nested
C_ because nesting is seldom needed=2E)

The "" at the= end is needed so (string-join =E2=80=A6) gets its own XML
element that= can be moved by translators=2E

Without "":

msgid "Publishe= d <1/> by "

With "":

msgid "Published <1/> by &= lt;2/>"

You told me that before but I forgot :P
<= br>
Also, I think the delimiter for "string-joi= n" in the list of authors
should be translated because that comma is not= used in Japanese, for
example=2E So would it be ok like this:
[=E2= =80=A6]
,(string-join (publication-authors publication)
(C_ "Separato= r of items in a list" ", ")))))

Yes, you are very righ= t, although as above please move it to the let=2E
Then it can become = =E3=80=81 or =E3=81=A8 or whatever; I don=E2=80=99t know what is common
= in Japan=2E

I'm st= ill unsure about when I should use a context and when a
TRANSLATORS comm= ent=2E=2E=2E

A msgctxt should be used if another ", " = string with different
translations might be added=2E I would use a cont= ext, I think, but
maybe it is an abundance of caution=2E

Ok, so I moved both the date and the list authors to the definitions = part of a let:

(define (publication->shtml publication)
"Ret= urn an SHTML representation of the given publication object=2E

PU= BLICATION (<publication>)
A publication object as defined in = (apps media types)=2E"
(let ((date
(date->string (publi= cation-date publication)
(C_ "SRFI-19 date->st= ring format" "~b ~d, ~Y")))
(authors
(string-join (p= ublication-authors publication)
(C_ "Separator for= authors in a list" ", "))))

`(a
(@ (class "publication= -preview")
(href ,(publication-url publication)))

= (h3
(@ (lang ,(publication-language publication))
(c= lass "publication-title"))
,(publication-title publication))
<= br> (p
(@ (class "publication-info"))
,(G_ `("Publ= ished " ,date " by " ,authors ""))))))

Does it look right?


------QG3UJ5IZL4E9FTPVJPNSLG9VNJEYON--