forked from Rdatatable/data.table
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtranslation.R
21 lines (16 loc) · 838 Bytes
/
translation.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# templated warning/error functions to smooth translation & development
catf = function(fmt, ..., sep=" ", domain="R-data.table") {
cat(gettextf(fmt, ..., domain=domain), sep=sep)
}
stopf = function(fmt, ..., domain="R-data.table") {
stop(gettextf(fmt, ..., domain=domain), domain=NA, call. = FALSE)
}
warningf = function(fmt, ..., immediate.=FALSE, noBreaks.=FALSE, domain="R-data.table") {
warning(gettextf(fmt, ..., domain=domain), domain=NA, call.=FALSE, immediate.=immediate., noBreaks.=noBreaks.)
}
messagef = function(fmt, ..., appendLF=TRUE, domain="R-data.table") {
message(gettextf(fmt, ..., domain=domain), domain=NA, appendLF=appendLF)
}
packageStartupMessagef = function(fmt, ..., appendLF=TRUE, domain="R-data.table") {
packageStartupMessage(gettextf(fmt, ..., domain=domain), domain=NA, appendLF=appendLF)
}