Skip to content

Commit 39317bb

Browse files
solving issue The Pl_() translation macro was not recognized by
issue no-6794. solving this issue
1 parent 72fc307 commit 39317bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/po.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#ifdef ENABLE_NLS
22
#include <libintl.h>
33
#define _(String) dgettext("data.table", String)
4-
// NB: flip argument order to match that of R's ngettext()
54
#define Pl_(n, String1, StringPlural) dngettext("data.table", String1, StringPlural, n)
5+
#define Pl_Extract(String1, StringPlural) (String1 "\0" StringPlural) // Helps extract both strings
66
#else
77
#define _(String) (String)
88
#define Pl_(n, String1, StringPlural) ((n) == 1 ? (String1) : (StringPlural))
9+
#define Pl_Extract(String1, StringPlural) (String1 "\0" StringPlural) // Consistent behavior
910
#endif

0 commit comments

Comments
 (0)