GNU bug report logs - #48637
[PATCH] website: Add publications page

Previous Next

Package: guix-patches;

Reported by: Luis Felipe <luis.felipe.la <at> protonmail.com>

Date: Mon, 24 May 2021 23:36:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Luis Felipe <luis.felipe.la <at> protonmail.com>
Cc: "48637 <at> debbugs.gnu.org" <48637 <at> debbugs.gnu.org>
Subject: [bug#48637] [PATCH] website: Add publications page
Date: Tue, 25 May 2021 20:21:23 +0200
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/>"



> 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.

Regards,
Florian




This bug report was last modified 3 years and 348 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.