HenrikBengtsson / listenv

R package: listenv - Environments Behaving As Lists
https://listenv.futureverse.org
30 stars 2 forks source link

I18N: potools issues #48

Closed HenrikBengtsson closed 3 years ago

HenrikBengtsson commented 3 years ago
> potools::translate_package()
Found 21 R messaging calls that might be better suited for gettextf for ease of translation:

Problematic call:
stop("Length of argument 'perm' does not match the dimension of 'a': ", length(perm), " != ", ndim)
< File:aperm.R, Line:41 >
Potential replacement:
stop(domain=NA, gettextf("Length of argument 'perm' does not match the dimension of 'a': %s != %s", length(perm), ndim))

Problematic call:
stop("Subscript must be a name or an index: ", mode(name), call. = FALSE)
< File:get_variable.R, Line:24 >
Potential replacement:
stop(domain=NA, gettextf("Subscript must be a name or an index: %s%s", mode(name), FALSE))

Problematic call:
stop("Subscript must be a scalar: ", length(name), call. = FALSE)
< File:get_variable.R, Line:30 >
Potential replacement:
stop(domain=NA, gettextf("Subscript must be a scalar: %s%s", length(name), FALSE))

Problematic call:
stop("Argument 'value' may only have one NA: ", sprintf("c(%s)", paste(value, collapse = ", ")))
< File:listenv,dims.R, Line:56 >
Potential replacement:
stop(domain=NA, gettextf("Argument 'value' may only have one NA: %s", sprintf("c(%s)", paste(value, collapse = ", "))))

Problematic call:
stop("Subsetting of more than one element at the time is not allowed for listenv's: ", length(i))
< File:listenv.R, Line:459 >
Potential replacement:
stop(domain=NA, gettextf("Subsetting of more than one element at the time is not allowed for listenv's: %s", length(i)))

Problematic call:
stop("Cannot assign value. More than one name specified: ", hpaste(sQuote(name)), call. = FALSE)
< File:listenv.R, Line:629 >
Potential replacement:
stop(domain=NA, gettextf("Cannot assign value. More than one name specified: %s%s", hpaste(sQuote(name)), FALSE))

Problematic call:
stop("Cannot assign value. Empty name specific: ", sQuote(name), call. = FALSE)
< File:listenv.R, Line:632 >
Potential replacement:
stop(domain=NA, gettextf("Cannot assign value. Empty name specific: %s%s", sQuote(name), FALSE))

Problematic call:
stop("Cannot assign value. More than one index specified: ", hpaste(i), call. = FALSE)
< File:listenv.R, Line:671 >
Potential replacement:
stop(domain=NA, gettextf("Cannot assign value. More than one index specified: %s%s", hpaste(i), FALSE))

Problematic call:
stop("Cannot assign value. Non-finite index: ", i, call. = FALSE)
< File:listenv.R, Line:674 >
Potential replacement:
stop(domain=NA, gettextf("Cannot assign value. Non-finite index: %s%s", i, FALSE))

Problematic call:
stop("Cannot assign value. Non-positive index: ", i, call. = FALSE)
< File:listenv.R, Line:676 >
Potential replacement:
stop(domain=NA, gettextf("Cannot assign value. Non-positive index: %s%s", i, FALSE))

Problematic call:
stop("Cannot remove element. More than one name specified: ", hpaste(sQuote(name)), call. = FALSE)
< File:listenv.R, Line:711 >
Potential replacement:
stop(domain=NA, gettextf("Cannot remove element. More than one name specified: %s%s", hpaste(sQuote(name)), FALSE))

Problematic call:
stop("Cannot remove element. Empty name specific: ", sQuote(name), call. = FALSE)
< File:listenv.R, Line:714 >
Potential replacement:
stop(domain=NA, gettextf("Cannot remove element. Empty name specific: %s%s", sQuote(name), FALSE))

Problematic call:
stop("Cannot remove element. More than one index specified: ", hpaste(i), call. = FALSE)
< File:listenv.R, Line:747 >
Potential replacement:
stop(domain=NA, gettextf("Cannot remove element. More than one index specified: %s%s", hpaste(i), FALSE))

Problematic call:
stop("Cannot remove element. Non-finite index: ", i, call. = FALSE)
< File:listenv.R, Line:750 >
Potential replacement:
stop(domain=NA, gettextf("Cannot remove element. Non-finite index: %s%s", i, FALSE))

Problematic call:
stop("Cannot remove element. Non-positive index: ", i, call. = FALSE)
< File:listenv.R, Line:752 >
Potential replacement:
stop(domain=NA, gettextf("Cannot remove element. Non-positive index: %s%s", i, FALSE))

Problematic call:
stop("Invalid syntax: ", sQuote(code), call. = FALSE)
< File:parse_env_subset.R, Line:61 >
Potential replacement:
stop(domain=NA, gettextf("Invalid syntax: %s%s", sQuote(code), FALSE))

Problematic call:
stop("Not a valid variable name: ", sQuote(name), call. = FALSE)
< File:parse_env_subset.R, Line:122 >
Potential replacement:
stop(domain=NA, gettextf("Not a valid variable name: %s%s", sQuote(name), FALSE))

Problematic call:
stop("Multi-dimensional subsetting on list environment without dimensions: ", sQuote(code), call. = TRUE)
< File:parse_env_subset.R, Line:172 >
Potential replacement:
stop(domain=NA, gettextf("Multi-dimensional subsetting on list environment without dimensions: %s%s", sQuote(code), TRUE))

Problematic call:
stop("Invalid (negative) indices: ", hpaste(i))
< File:parse_env_subset.R, Line:244 >
Potential replacement:
stop(domain=NA, gettextf("Invalid (negative) indices: %s", hpaste(i)))

Problematic call:
stop("Invalid (zero) indices: ", hpaste(i))
< File:parse_env_subset.R, Line:254 >
Potential replacement:
stop(domain=NA, gettextf("Invalid (zero) indices: %s", hpaste(i)))

Problematic call:
stop("Invalid subset: ", sQuote(code), call. = TRUE)
< File:parse_env_subset.R, Line:270 >
Potential replacement:
stop(domain=NA, gettextf("Invalid subset: %s%s", sQuote(code), TRUE))
Exit now to repair any of these? [y/N]
y