From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cLaIGUJUrWCWDAAAgWs5BA (envelope-from ) for ; Tue, 25 May 2021 21:47:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yHZHFUJUrWANCQAA1q6Kng (envelope-from ) for ; Tue, 25 May 2021 19:47:14 +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 1053618EE7 for ; Tue, 25 May 2021 21:47:14 +0200 (CEST) Received: from localhost ([::1]:55604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lld1F-0007Bk-07 for larch@yhetil.org; Tue, 25 May 2021 15:47:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lld14-00077u-CO for guix-patches@gnu.org; Tue, 25 May 2021 15:47:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35388) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lld14-0007Mu-3p for guix-patches@gnu.org; Tue, 25 May 2021 15:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lld14-00085y-0v for guix-patches@gnu.org; Tue, 25 May 2021 15:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48637] [PATCH] website: Add publications page Resent-From: Luis Felipe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 May 2021 19:47:01 +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: "pelzflorian (Florian Pelz)" Cc: "48637@debbugs.gnu.org" <48637@debbugs.gnu.org> Received: via spool by 48637-submit@debbugs.gnu.org id=B48637.162197199729911 (code B ref 48637); Tue, 25 May 2021 19:47:01 +0000 Received: (at 48637) by debbugs.gnu.org; 25 May 2021 19:46:37 +0000 Received: from localhost ([127.0.0.1]:46934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lld0e-0007m9-Gx for submit@debbugs.gnu.org; Tue, 25 May 2021 15:46:36 -0400 Received: from mail-40140.protonmail.ch ([185.70.40.140]:53494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lld0b-0007fI-OI for 48637@debbugs.gnu.org; Tue, 25 May 2021 15:46:35 -0400 Date: Tue, 25 May 2021 19:46:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1621971986; bh=mcEmOV6fHVJo1HvIGB2U9MFK4XfxVke2rquChymnDxo=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=iRGw0GOQB6VbHv3iTREZQTNQlSBufRZja/bVNYLBgQPDVizVgpRxvDWZGs55Ray08 0BsDQAxqF8slTn8ZtOuOB4qrvno5oaxwIJYQGwplxQ6M9EhCBueGUwDYJ667TmzQKs DOirTqQuiauSwi1Dz44ncHCVGMMDRqoutHaVAkvg= Message-ID: <0aOCO-8AZ9biZ9iIxwrbB509xigLvoEfiOHOXiC_hfm1YqdAKMuCftahFz-8Ix2Ikdlt8akHkyoRsH6OvV0gOzlFrcw3xdyeE2IPF5TchB0=@protonmail.com> In-Reply-To: <20210525182123.a5l4d6t3xt3qn437@pelzflorian.localdomain> References: <4BtcqLwBY7LgeYhUd41lhUUAcT5n2Zn9OTJUzGswTuBpLla8nBHyrQ3kJzwEMI9E7MPEnr6wBqSeCMqByldZ6i5jPR8B7ZtEi0XhwextyQo=@protonmail.com> <20210525134405.hmevensj5m42iluo@pelzflorian.localdomain> <3mZyc8pra0TLSyJS6RlWIrQGBnje7dT_EMRBeOdFC_Z2wsZGoaI1rVNVtoiI57KEOvolEiahl6j7M4UBsoO0NsuieAfDPIkZQ-MR8C5UhAE=@protonmail.com> <20210525182123.a5l4d6t3xt3qn437@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" Reply-to: Luis Felipe X-ACL-Warn: , Luis Felipe via Guix-patches From: Luis Felipe via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621972034; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=mcEmOV6fHVJo1HvIGB2U9MFK4XfxVke2rquChymnDxo=; b=pGzkDBS9kox90d+QHTPxnn/jW18L8eAPBwJwKunn9ZEwkMZX90Ofl26pC6QutD6U79WmzM wyZTb6JldPoNbIVlZY1p7ILAp5p2RfbOIWCj5O7lbq3dWL/wOszu/w8cwZMbINstqxSu2v vTJYUW2VNfdqMGS+4qRWTszmY21pqxbGFTwuS8WU8VeI+FvJTfUwH3cDi3HTsLv7PpxpLI DVqAsWD6JtMagHLPgvF012dbdRTKXQ0zlhL4h4tsJQtMbIwYvs4slc953Zhi1uQuhL51Jw edHE6p24TS0QJqyvTT5weX5FFeMynzGkx5TC4cnRF/pcPx7eXdZxE3mN2UGswg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621972034; a=rsa-sha256; cv=none; b=UNSIF42lgIB9+sBoThMTSoRJpc+L19xwSI6nwoSpYS8mAB1ZKkLKMKOp/jm329iPAxdERf ZORXDmle6BTAR2a0yMhY6pFtmX+188LfJKvAxNf19afyd7Mon9Ku6r5ROi1YMGtB9r0qzC BNLmqIgf+oWT8dPQEOXLIF78cPH5oLyQ26cyyzCKVDEyHI+QUfkBBE5GLlmhppP44+eHiE ZPvGX6QZmNdInpCHaiJ2W9hwFApLgUUNhvgAIlPs7R3HLDY9cihAf6rZtUD7J5QslEGZYE JI4+r8T4VSKbpeq5joZCAYQguCkerQGIGKjWcj3sT9UnfjHIBpX184lkVrbbRw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=iRGw0GOQ; 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: -1.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=iRGw0GOQ; dmarc=pass (policy=none) header.from=gnu.org; 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: 1053618EE7 X-Spam-Score: -1.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: VHdchKbTIMLw 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. 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. > (And I=E2=80=99m not motivated enough to make it go back to parse the nes= ted > C_ because nesting is seldom needed.) > > The "" at the end is needed so (string-join =E2=80=A6) gets its own XML > element that can be moved by translators. > > 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. 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. > Then it can become =E3=80=81 or =E3=81=A8 or whatever; I don=E2=80=99t kn= ow what is common > in Japan. > > > I'm still unsure about when I should use a context and when a > > TRANSLATORS comment... > > A msgctxt should be used if another ", " string with different > translations might be added. I would use a context, I think, but > maybe it is an abundance of caution. Ok, so I moved both the date and the list authors to the definitions part o= f a let: (define (publication->shtml publication) "Return an SHTML representation of the given publication object. PUBLICATION () A publication object as defined in (apps media types)." (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?