all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: luis.felipe.la@protonmail.com, 48637@debbugs.gnu.org,
	pelzflorian@pelzflorian.de
Subject: [bug#48637] [PATCH] website: Add publications page
Date: Tue, 25 May 2021 15:58:04 -0400	[thread overview]
Message-ID: <02EED264-0509-453A-A016-2AD05353370B@lepiller.eu> (raw)
In-Reply-To: <0aOCO-8AZ9biZ9iIxwrbB509xigLvoEfiOHOXiC_hfm1YqdAKMuCftahFz-8Ix2Ikdlt8akHkyoRsH6OvV0gOzlFrcw3xdyeE2IPF5TchB0=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 3789 bytes --]

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. Even in English, you'd need an "and" for the last element, unless there's one author. Giving the full list of authors to translate gives the most freedom to translators.

Also, please give context/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.org> a écrit :
>On Tuesday, May 25, 2021 6:21 PM, pelzflorian (Florian Pelz)
><pelzflorian@pelzflorian.de> 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’m not motivated enough to make it go back to parse the nested
>> C_ because nesting is seldom needed.)
>>
>> The "" at the end is needed so (string-join …) 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:
>> > […]
>> > ,(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 、 or と or whatever; I don’t know 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 of a let:
>
>(define (publication->shtml publication)
>  "Return an SHTML representation of the given publication object.
>
>   PUBLICATION (<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?

[-- Attachment #2: Type: text/html, Size: 4756 bytes --]

  reply	other threads:[~2021-05-25 19:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 23:35 [bug#48637] [PATCH] website: Add publications page Luis Felipe via Guix-patches via
2021-05-25 13:44 ` pelzflorian (Florian Pelz)
2021-05-25 14:37   ` Luis Felipe via Guix-patches via
2021-05-25 18:21     ` pelzflorian (Florian Pelz)
2021-05-25 19:46       ` Luis Felipe via Guix-patches via
2021-05-25 19:58         ` Julien Lepiller [this message]
2021-05-25 20:16           ` Luis Felipe via Guix-patches via
2021-05-26  2:03             ` Julien Lepiller
2021-05-26 10:00               ` pelzflorian (Florian Pelz)
2021-05-26 14:06                 ` Luis Felipe via Guix-patches via
2021-05-26 17:41                   ` Julien Lepiller
2021-05-26 18:25                     ` Luis Felipe via Guix-patches via
2021-05-26 18:42                       ` Julien Lepiller
2021-05-26 19:05                         ` Luis Felipe via Guix-patches via
2021-05-25 18:35     ` pelzflorian (Florian Pelz)
2021-05-25 19:14       ` Luis Felipe via Guix-patches via
2021-05-28 11:06 ` Ludovic Courtès
2021-05-28 15:20   ` Luis Felipe via Guix-patches via
2021-05-29 10:25     ` Ludovic Courtès
2021-06-02 19:31   ` Luis Felipe via Guix-patches via
2021-06-02 20:28     ` Julien Lepiller
2021-06-02 21:52       ` Luis Felipe via Guix-patches via
2021-06-02 23:28         ` Julien Lepiller
2021-06-03  9:40     ` Ludovic Courtès
2021-06-03 10:37       ` Julien Lepiller
2021-06-03 13:39         ` Luis Felipe via Guix-patches via
2021-06-03 19:50           ` Luis Felipe via Guix-patches via
2021-06-03 20:37           ` Ludovic Courtès
2021-06-03 21:50             ` Luis Felipe via Guix-patches via
2021-06-04 15:38               ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02EED264-0509-453A-A016-2AD05353370B@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=48637@debbugs.gnu.org \
    --cc=luis.felipe.la@protonmail.com \
    --cc=pelzflorian@pelzflorian.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.