Skip to content

Invalid fallback ngettext() implementation in i18n.h

An excerpt from man 3 ngettext:

In the "C" locale, or if none of the used catalogs contain a translation for msgid, the ngettext, dngettext and dcngettext functions return msgid if n == 1, or msgid_plural if n != 1.

But, instead, Xfce's i18n.h file compares n with 0:

#define ngettext(msgid, msgid_plural, n) (((n) > 0) ? (msgid) : (msgid_plural))

The invalid ngettext() macro implementation has been introduced by commit ba4f507f in year 2005.

Suggested course of action: Remove lines 40-68 from libxfce4util/xfce-i18n.h.