[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #66648] xgettext fails to detect plurals
From: |
Bruno Haible |
Subject: |
[bug #66648] xgettext fails to detect plurals |
Date: |
Thu, 9 Jan 2025 17:48:15 -0500 (EST) |
Update of bug #66648 (group gettext):
Status: None => Answer Provided
Assigned to: None => haible
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
> the first attempt via e-mail seems to have been lost...
Your mail was stuck for 12 minutes at lists.gnu.org and then processed
normally, archived at
https://lists.gnu.org/archive/html/bug-gettext/2025-01/msg00023.html .
> doesn't detect that txt_s and txt_p are plural forms of the same
message.
That's because you declare their contents with the N_ macro, which takes only
1 argument. xgettext processes one declaration at a time; it extracts the
strings when it sees
const char txt_s[] = N_("single");
and
const char txt_p[] = N_("plural");
At this point, xgettext cannot know how the program will use txt_s and txt_p.
> Is there any option/way to tell xgettext to "resolve" the indirection?
You could write
#define ngettext_noop(sing,plur) { sing, plur }
const char *txt[2] = ngettext_noop ("single", "plural");
and invoke xgettext with the option --keyword=ngettext_noop:1,2 .
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66648>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature