You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rprintf(_("RHS for item %d has been duplicated because MAYBE_REFERENCED==%d MAYBE_SHARED==%d, but then is being plonked. length(values)==%d; length(cols)==%d)\n"),
I would also like to replace the use of ngettext for strings that don't format the count as a number because that prevents proper translation with plurals in some languages, but that can be a separate issue. For your example, that would be
stop_msg=if (length(tt) ==1) {
gettext("The item in the 'by' or 'keyby' list is length %s. Each must be length %d; the same length as there are rows in x (after subsetting if i is provided).")
} else {
gettext("The items in the 'by' or 'keyby' list have lengths %s. Each must be length %d; the same length as there are rows in x (after subsetting if i is provided).")
}
stopf(stop_msg, brackify(tt), xnrow, domain=NA)
See this discussion in #6786. There's a proposed patch there but it needs to be paired with some improvements to {potools}, I think. Tabling for now until after release.
The text was updated successfully, but these errors were encountered:
Can I proceed with making the changes for Issue #6796 now, or would you prefer to revisit this after the release?
I’d like to work on replacing ngettext() with gettext() where necessary to ensure correct pluralization. Specifically, I will:
Identify and change occurrences of ngettext() where the count is not explicitly formatted as a number (e.g., in error
messages).
Replace these with gettext() and manually handle pluralization.
Files I will modify:
R/utils.R ,R/fmelt.R ,R/data.table.R
These files use ngettext() incorrectly and need manual pluralization adjustments.
Files I will NOT modify:
R/bmerge.R ,R/setops.R ,R/fread.R ,R/print.data.table.R ,R/test.data.table.R ,R/data.table.R
These files already use ngettext() correctly, as they properly format the count using %d.
Let me know your preference. Thanks!
Thanks @venom1204. This will definitely happen after release. Actually, the most important work for this issue needs to happen not in {data.table}, but in {potools}:
The linked PR here on {data.table} has a patch that will do the bulk of the work on our side; what remains is to ensure that this patch works well with the related tooling (i.e., {potools})
Originally posted by @aitap in #6787
See this discussion in #6786. There's a proposed patch there but it needs to be paired with some improvements to {potools}, I think. Tabling for now until after release.
The text was updated successfully, but these errors were encountered: