Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue - #6794 #6805

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions data.table.code-workspace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't commit extraneous files (produced by your editor?). When contributing to an open source project, try to minimise your changes as much as possible. This file should be removed from the pull request (but feel free to keep it locally, uncommitted).

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"folders": [
{
"path": "."
},
{
"path": "."
}
]
}
3 changes: 2 additions & 1 deletion src/po.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext("data.table", String)
// NB: flip argument order to match that of R's ngettext()
#define Pl_(n, String1, StringPlural) dngettext("data.table", String1, StringPlural, n)
#define Pl_Extract(String1, StringPlural) (String1 "\0" StringPlural) // Helps extract both strings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain your plan for making this work? As submitted, this doesn't help potools::po_extract actually find the strings marked using the Pl_ macro.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aitap Sorry for this mistake. I appreciate your feedback and will make the necessary improvements.

#else
#define _(String) (String)
#define Pl_(n, String1, StringPlural) ((n) == 1 ? (String1) : (StringPlural))
#define Pl_Extract(String1, StringPlural) (String1 "\0" StringPlural) // Consistent behavior
#endif
Loading