Skip to content

.checkTypos relies on literal messages in English #4989

@MichaelChirico

Description

@MichaelChirico

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalstranslationissues/PRs related to message translation projects

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions