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

.checkTypos relies on literal messages in English #4989

Closed
MichaelChirico opened this issue May 11, 2021 · 0 comments · Fixed by #4990
Closed

.checkTypos relies on literal messages in English #4989

MichaelChirico opened this issue May 11, 2021 · 0 comments · Fixed by #4990
Labels
internals translation issues/PRs related to message translation projects
Milestone

Comments

@MichaelChirico
Copy link
Member

data.table/R/data.table.R

Lines 110 to 122 in 19c61c0

.checkTypos = function(err, ref) {
if (grepl('object.*not found', err$message)) {
used = gsub(".*object '([^']+)'.*", "\\1", err$message)
found = agrep(used, ref, value=TRUE, ignore.case=TRUE, fixed=TRUE)
if (length(found)) {
stop("Object '", used, "' not found. Perhaps you intended ", brackify(found))
} else {
stop("Object '", used, "' not found amongst ", brackify(ref))
}
} else {
stop(err$message, call.=FALSE)
}
}

Not ideal. I think I have a decent workaround.

@MichaelChirico MichaelChirico added internals translation issues/PRs related to message translation projects labels May 11, 2021
@mattdowle mattdowle added this to the 1.14.1 milestone May 14, 2021
@jangorecki jangorecki modified the milestones: 1.14.9, 1.15.0 Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internals translation issues/PRs related to message translation projects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants