bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [WIP-PATCHES] Lisp (and Scheme) jump format specifier and ngettext


From: Bruno Haible
Subject: Re: [WIP-PATCHES] Lisp (and Scheme) jump format specifier and ngettext
Date: Sat, 28 Nov 2020 01:59:38 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-193-generic; KDE/5.18.0; x86_64; ; )

Hi Miguel,

I wrote:
> Omitting a ~d format directive should be valid:
> 
>   # Valid: omitting an integer-typed variable
>   msgid "~d thing"
>   msgid_plural "~d things"
>   msgstr[0] "the thing"
>   msgstr[1] "the ~d things"
> 
> Whereas omitting a ~a or ~s format directive should be invalid:
> 
>   # Invalid: omitting an object-typed variable
>   msgid "~a's ~d thing"
>   msgid_plural "~a's ~d things"
>   msgstr[0] "the ~d thing"
I meant: msgstr[0] "the ~*~d thing"
>   msgstr[1] "the ~a's ~d things"
> 
>   # Invalid: omitting an object-typed variable
>   msgid "~s ~d thing"
>   msgid_plural "~s ~d things"
>   msgstr[0] "the ~d thing"
I meant: msgstr[0] "the ~*~d thing"
>   msgstr[1] "the ~s ~d things"

This applies also to the other types of format strings: Omitting a
variable in msgid_plural that is not of type integer should be invalid,
i.e. produce an error in 'msgfmt -c'. For example in C:

  # Invalid: omitting a string-typed variable
  msgid "%s's %u thing"
  msgid_plural "%s's %u things"
  msgstr[0] "the %2$u thing"
  msgstr[1] "the %s's %u things"

Right?

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]