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

Missed/partial translations in setops/fread #6536

Merged
merged 4 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion R/fread.R
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ yaml=FALSE, autostart=NA, tmpdir=tempdir(), tz="UTC")
methods::as(v, new_class))
},
warning = fun <- function(e) {
warningf("Column '%s' was requested to be '%s' but fread encountered the following %s:\n\t%s\nso the column has been left as type '%s'", names(ans)[j], new_class, if (inherits(e, "error")) "error" else "warning", e$message, typeof(v))
warningf("Column '%s' was requested to be '%s' but fread encountered the following %s:\n\t%s\nso the column has been left as type '%s'", names(ans)[j], new_class, if (inherits(e, "error")) gettext("error") else gettext("warning"), e$message, typeof(v))
MichaelChirico marked this conversation as resolved.
Show resolved Hide resolved
v
},
error = fun)
Expand Down
12 changes: 6 additions & 6 deletions R/setops.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ all.equal.data.table = function(target, current, trim.levels=TRUE, check.attribu
k1 = key(target)
k2 = key(current)
if (!identical(k1, k2)) {
return(gettextf(
"Datasets have different %s. 'target': %s. 'current': %s.",
"keys",
return(sprintf(
"%s. 'target': %s. 'current': %s.",
gettext("Datasets have different keys"),
if(length(k1)) brackify(k1) else gettextf("has no key"),
if(length(k2)) brackify(k2) else gettextf("has no key")
))
Expand All @@ -168,9 +168,9 @@ all.equal.data.table = function(target, current, trim.levels=TRUE, check.attribu
i1 = indices(target)
i2 = indices(current)
if (!identical(i1, i2)) {
return(gettextf(
"Datasets have different %s. 'target': %s. 'current': %s.",
"indices",
return(sprintf(
"%s. 'target': %s. 'current': %s.",
gettext("Datasets have different indices"),
if(length(i1)) brackify(i1) else gettextf("has no index"),
if(length(i2)) brackify(i2) else gettextf("has no index")
))
Expand Down
Loading