diff --git a/R/data.table.R b/R/data.table.R index c05e7d0074..8cde3e3aee 100644 --- a/R/data.table.R +++ b/R/data.table.R @@ -820,7 +820,7 @@ replace_dot_alias = function(e) { if (!typeof(byval[[jj]]) %chin% ORDERING_TYPES) stop("column or expression ",jj," of 'by' or 'keyby' is type ",typeof(byval[[jj]]),". Do not quote column names. Usage: DT[,sum(colC),by=list(colA,month(colB))]") } tt = vapply_1i(byval,length) - if (any(tt!=xnrow)) stop("The items in the 'by' or 'keyby' list are length (",paste(tt,collapse=","),"). Each must be length ", xnrow, "; the same length as there are rows in x (after subsetting if i is provided).") + if (any(tt!=xnrow)) stop(gettextf("The items in the 'by' or 'keyby' list are length(s) (%s). Each must be length %d; the same length as there are rows in x (after subsetting if i is provided).", paste(tt, collapse=","), xnrow, domain='R-data.table')) if (is.null(bynames)) bynames = rep.int("",length(byval)) if (length(idx <- which(!nzchar(bynames))) && !bynull) { # TODO: improve this and unify auto-naming of jsub and bysub @@ -874,7 +874,7 @@ replace_dot_alias = function(e) { # attempt to auto-name unnamed columns for (jj in which(nm=="")) { thisq = q[[jj + 1L]] - if (missing(thisq)) stop("Item ", jj, " of the .() or list() passed to j is missing") #3507 + if (missing(thisq)) stop(gettextf("Item %d of the .() or list() passed to j is missing", jj, domain="R-data.table")) #3507 if (is.name(thisq)) nm[jj] = drop_dot(thisq) # TO DO: if call to a[1] for example, then call it 'a' too } diff --git a/R/devel.R b/R/devel.R index c82c62f136..8db74e47ce 100644 --- a/R/devel.R +++ b/R/devel.R @@ -13,7 +13,7 @@ dcf.repo = function(pkg, repo, field, type){ idx = file(file.path(contrib.url(repo, type=type),"PACKAGES")) on.exit(close(idx)) dcf = read.dcf(idx, fields=c("Package",field)) - if (!pkg %in% dcf[,"Package"]) stop("There is no ", pkg, " package in provided repository.") + if (!pkg %in% dcf[,"Package"]) stop(gettextf("There is no package %s in provided repository.", pkg, domain='R-data.table')) dcf[dcf[,"Package"]==pkg, field][[1L]] } diff --git a/R/last.R b/R/last.R index 8b26b92850..abf4050b40 100644 --- a/R/last.R +++ b/R/last.R @@ -35,7 +35,7 @@ last = function(x, n=1L, ...) { } } else { if (!requireNamespace("xts", quietly=TRUE)) - stop("'xts' class passed to data.table::last function but 'xts' is not available, you should have 'xts' installed already") # nocov + stop(gettextf("'xts' class passed to %s function but 'xts' is not available, you should have 'xts' installed already", "data.table::last", domain="R-data.table")) # nocov if (verbose) cat("last: using xts::last: is.xts(x)\n") xts::last(x, n=n, ...) @@ -76,7 +76,7 @@ first = function(x, n=1L, ...) { } } else { if (!requireNamespace("xts", quietly=TRUE)) - stop("'xts' class passed to data.table::first function but 'xts' is not available, you should have 'xts' installed already") # nocov + stop(gettextf("'xts' class passed to %s function but 'xts' is not available, you should have 'xts' installed already", "data.table::first", domain="R-data.table")) # nocov if (verbose) cat("first: using xts::first: is.xts(x)\n") xts::first(x, n=n, ...) diff --git a/R/setkey.R b/R/setkey.R index 5caefcf68f..fb8924b7a4 100644 --- a/R/setkey.R +++ b/R/setkey.R @@ -251,7 +251,7 @@ setorder = function(x, ..., na.last=FALSE) # na.last=FALSE here, to be consistent with data.table's default # as opposed to DT[order(.)] where na.last=TRUE, to be consistent with base { - if (!is.data.frame(x)) stop("x must be a data.frame or data.table.") + if (!is.data.frame(x)) stop("x must be a data.frame or data.table") cols = substitute(list(...))[-1L] if (identical(as.character(cols),"NULL")) return(x) if (length(cols)) { @@ -357,7 +357,7 @@ CJ = function(..., sorted = TRUE, unique = FALSE) } } nrow = prod( vapply_1i(l, length) ) # lengths(l) will work from R 3.2.0 - if (nrow > .Machine$integer.max) stop("Cross product of elements provided to CJ() would result in ",nrow," rows which exceeds .Machine$integer.max == ",.Machine$integer.max) + if (nrow > .Machine$integer.max) stop(gettextf("Cross product of elements provided to CJ() would result in %d rows which exceeds .Machine$integer.max == %d", nrow, Machine$integer.max, domain='R-data.table')) l = .Call(Ccj, l) setDT(l) l = setalloccol(l) # a tiny bit wasteful to over-allocate a fixed join table (column slots only), doing it anyway for consistency since diff --git a/R/test.data.table.R b/R/test.data.table.R index decf1c4b3c..33752545d5 100644 --- a/R/test.data.table.R +++ b/R/test.data.table.R @@ -43,7 +43,7 @@ test.data.table = function(script="tests.Rraw", verbose=FALSE, pkg=".", silent=F # nocov start fn2 = paste0(fn,".bz2") if (!file.exists(file.path(fulldir, fn2))) - stop("Neither ",fn," or ",fn2," exist in ",fulldir) + stop(gettextf("Neither %s nor %s exist in %s",fn, fn2, fulldir, domain="R-data.table")) fn = fn2 # nocov end # sys.source() below accepts .bz2 directly. diff --git a/inst/po/en@quot/LC_MESSAGES/R-data.table.mo b/inst/po/en@quot/LC_MESSAGES/R-data.table.mo index 858b4ec1be..e52bcf8faf 100644 Binary files a/inst/po/en@quot/LC_MESSAGES/R-data.table.mo and b/inst/po/en@quot/LC_MESSAGES/R-data.table.mo differ diff --git a/inst/po/en@quot/LC_MESSAGES/data.table.mo b/inst/po/en@quot/LC_MESSAGES/data.table.mo index 1d85d8380e..f88de8edf3 100644 Binary files a/inst/po/en@quot/LC_MESSAGES/data.table.mo and b/inst/po/en@quot/LC_MESSAGES/data.table.mo differ diff --git a/inst/po/zh_CN/LC_MESSAGES/R-data.table.mo b/inst/po/zh_CN/LC_MESSAGES/R-data.table.mo index f147769166..6e524b3588 100644 Binary files a/inst/po/zh_CN/LC_MESSAGES/R-data.table.mo and b/inst/po/zh_CN/LC_MESSAGES/R-data.table.mo differ diff --git a/inst/po/zh_CN/LC_MESSAGES/data.table.mo b/inst/po/zh_CN/LC_MESSAGES/data.table.mo index adb5351490..c5d63fb7d3 100644 Binary files a/inst/po/zh_CN/LC_MESSAGES/data.table.mo and b/inst/po/zh_CN/LC_MESSAGES/data.table.mo differ diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw index 1eec432dd0..bc0c7b3220 100644 --- a/inst/tests/tests.Rraw +++ b/inst/tests/tests.Rraw @@ -13889,7 +13889,7 @@ test(1984.05, DT[ , sum(b), keyby = c, verbose = TRUE], test(1984.06, DT[1:3, sum(a), by=b:c], data.table(b=10:8, c=1:3, V1=1:3)) test(1984.07, DT[, sum(a), by=call('sin',pi)], error='must evaluate to a vector or a list of vectors') test(1984.08, DT[, sum(a), by=as.raw(0)], error='column or expression.*type raw') -test(1984.09, DT[, sum(a), by=.(1,1:2)], error='The items.*list are length [(]1,2[)].*Each must be length 10; .*rows in x.*after subsetting') +test(1984.09, DT[, sum(a), by=.(1,1:2)], error='The items.*list are length[(]s[)] [(]1,2[)].*Each must be length 10; .*rows in x.*after subsetting') options('datatable.optimize' = Inf) test(1984.10, DT[ , 1, by = .(a %% 2), verbose = TRUE], data.table(a = c(1, 0), V1 = c(1, 1)), diff --git a/po/R-data.table.pot b/po/R-data.table.pot index caf1686ff2..10a5b19d45 100644 --- a/po/R-data.table.pot +++ b/po/R-data.table.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: data.table 1.12.9\n" -"POT-Creation-Date: 2019-12-22 23:59\n" +"POT-Creation-Date: 2019-12-29 22:35\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -403,13 +403,7 @@ msgstr "" msgid ". Do not quote column names. Usage: DT[,sum(colC),by=list(colA,month(colB))]" msgstr "" -msgid "The items in the 'by' or 'keyby' list are length (" -msgstr "" - -msgid "). Each must be length" -msgstr "" - -msgid "; the same length as there are rows in x (after subsetting if i is provided)." +msgid "The items in the 'by' or 'keyby' list are length(s) (%s). Each must be length %d; the same length as there are rows in x (after subsetting if i is provided)." msgstr "" msgid "Internal error: drop_dot passed" @@ -418,7 +412,7 @@ msgstr "" msgid "items" msgstr "" -msgid "of the .() or list() passed to j is missing" +msgid "Item %d of the .() or list() passed to j is missing" msgstr "" msgid "Different branches of j expression produced different auto-named columns:" @@ -853,10 +847,7 @@ msgstr "" msgid "." msgstr "" -msgid "There is no" -msgstr "" - -msgid "package in provided repository." +msgid "There is no package %s in provided repository." msgstr "" msgid "'fromLast' must be TRUE or FALSE" @@ -1324,10 +1315,7 @@ msgstr "" msgid "Using integer64 class columns require to have 'bit64' package installed." msgstr "" -msgid "'xts' class passed to data.table::last function but 'xts' is not available, you should have 'xts' installed already" -msgstr "" - -msgid "'xts' class passed to data.table::first function but 'xts' is not available, you should have 'xts' installed already" +msgid "'xts' class passed to %s function but 'xts' is not available, you should have 'xts' installed already" msgstr "" msgid "Argument 'sort' should be logical TRUE/FALSE" @@ -1549,9 +1537,6 @@ msgstr "" msgid "New parallel sort has not been implemented for vectors containing NA values so far. Using one thread." msgstr "" -msgid "x must be a data.frame or data.table." -msgstr "" - msgid "x must be a data.frame or data.table" msgstr "" @@ -1573,10 +1558,7 @@ msgstr "" msgid "is non-atomic, which can't be sorted; try setting sorted = FALSE" msgstr "" -msgid "Cross product of elements provided to CJ() would result in" -msgstr "" - -msgid "rows which exceeds .Machine$integer.max ==" +msgid "Cross product of elements provided to CJ() would result in %d rows which exceeds .Machine$integer.max == %d" msgstr "" msgid "x and y must both be data.tables" @@ -1669,10 +1651,7 @@ msgstr "" msgid "script must end with '.Rraw'. If a file ending '.Rraw.bz2' exists, that will be found and used." msgstr "" -msgid "Neither" -msgstr "" - -msgid "exist in" +msgid "Neither %s nor %s exist in %s" msgstr "" msgid "Failed after test" diff --git a/po/R-zh_CN.po b/po/R-zh_CN.po index 7afdcdae16..e74646eb14 100644 --- a/po/R-zh_CN.po +++ b/po/R-zh_CN.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: data.table 1.12.5\n" -"POT-Creation-Date: 2019-12-22 23:59\n" +"POT-Creation-Date: 2019-12-29 22:35\n" "PO-Revision-Date: 2019-11-16 18:37+0800\n" "Last-Translator: Xianying Tan \n" "Language-Team: Mandarin\n" @@ -9,6 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" msgid "data.table package loaded. When developing don't load package" msgstr "data.table包已载入, 开发时无需载入" @@ -153,7 +154,7 @@ msgid "; expecting length 2." msgstr ";其长度应为 2。" msgid "c" -msgstr "" +msgstr "c" msgid "Perhaps you meant %s?" msgstr "或许你想用的是 %s?" @@ -165,7 +166,7 @@ msgid "the second element should be the upper bound(s)." msgstr "第二个元素应为上界。" msgid "x." -msgstr "" +msgstr "x." msgid "is type" msgstr "的类型为" @@ -174,7 +175,7 @@ msgid "which is not supported by data.table join" msgstr ",该类型无法用于 data.table 的联接" msgid "i." -msgstr "" +msgstr "i." msgid "Attempting roll join on factor column when joining x." msgstr "试图滚动联接(roll join)因子类型(factor)的列,这发生于将 x." @@ -422,16 +423,16 @@ msgid "Attempting to do natural join but no common columns in provided tables" msgstr "尝试进行自然连接然而并没有找到表格中相同的列" msgid "Internal error. Cannot by=.EACHI when joining to a secondary key, yet" -msgstr "" +msgstr "内部错误:目前尚无法对次键使用by=.EACH命令" msgid "Internal error. irows has length in by=.EACHI" -msgstr "" +msgstr "内部错误:by=.EACHI 中 irows 有长度" msgid "logical error. i is not a data.table, but 'on' argument is provided." -msgstr "" +msgstr "逻辑错误。当 i 并非一个 data.table时,不应提供'on'参数" msgid "i has evaluated to type" -msgstr "" +msgstr "i 运算结果为类型" msgid ". Expecting logical, integer or double." msgstr "。期望布尔类型,整型或浮点型。" @@ -540,43 +541,35 @@ msgid "" ". Do not quote column names. Usage: DT[,sum(colC),by=list(colA,month(colB))]" msgstr "。请勿引用列名。用法:DT[,sum(colC),by=list(colA,month(colB))]" -msgid "The items in the 'by' or 'keyby' list are length (" -msgstr "'by' 或 'keyby' 列表中的元素长度为(" - -msgid "). Each must be length" -msgstr "" - msgid "" -"; the same length as there are rows in x (after subsetting if i is provided)." -msgstr "" +"The items in the 'by' or 'keyby' list are length(s) (%s). Each must be " +"length %d; the same length as there are rows in x (after subsetting if i is " +"provided)." +msgstr "在'by'或'keyby'列表中的项长度为 %s。每一项的长度须均为%d,即应与 x (或经 i 筛选后的子集)中所包含行数相同。" msgid "Internal error: drop_dot passed" -msgstr "" +msgstr "内部错误:drop_dot 传入的参数有" msgid "items" -msgstr "" +msgstr "项" -msgid "of the .() or list() passed to j is missing" -msgstr "" +msgid "Item %d of the .() or list() passed to j is missing" +msgstr "传递给j的 .() 或 list()中第%d项缺失" -msgid "" -"Different branches of j expression produced different auto-named columns:" -msgstr "" +msgid "Different branches of j expression produced different auto-named columns:" +msgstr "j表达式中的不同分支自动生成的列名不同:" msgid "%s!=%s" -msgstr "" +msgstr "%s!=%s" msgid "; using the most \"last\" names" -msgstr "" +msgstr ";将使用最晚生成的名字" -msgid "" -"When .SDcols is a function, it is applied to each column; the output of this " -"function must be a non-missing boolean scalar signalling inclusion/exclusion " -"of the column. However, these conditions were not met for:" -msgstr "" +msgid "When .SDcols is a function, it is applied to each column; the output of this function must be a non-missing boolean scalar signalling inclusion/exclusion of the column. However, these conditions were not met for:" +msgstr "当传入 .SDcols 的参数为一个方程时,该方程将应用于每一列,并须返回单个非缺失值的布尔值指示该列是否应当被包含/排除。然而上述条件对如下列并不满足:" msgid ".SDcols missing at the following indices:" -msgstr "" +msgstr ".SDcols 的如下位置为缺失值:" msgid ".SDcols is numeric but has both +ve and -ve indices" msgstr ".SDcols 为数值,但同时具有 +ve 和 -ve 索引" @@ -1061,7 +1054,7 @@ msgstr "" "(length):频率(frequency))是:" msgid "%s:%d" -msgstr "" +msgstr "%s:%d" msgid "The first entry with fewer than" msgstr "第一个长度少于" @@ -1139,94 +1132,79 @@ msgid ". Only allowed operators are" msgstr "。只有这些操作符是有效的" msgid "." -msgstr "" - -msgid "There is no" -msgstr "" +msgstr "." -msgid "package in provided repository." -msgstr "" +msgid "There is no package %s in provided repository." +msgstr "所提供的资料库中不含包%s" msgid "'fromLast' must be TRUE or FALSE" -msgstr "" +msgstr "'fromLast' 必须为 TRUE 或 FALSE" msgid "x must be an atomic vector or data.frames/data.tables" -msgstr "" +msgstr "x 必须是原子向量或data.frame/data.table" msgid "Using '" -msgstr "" +msgstr "使用 '" msgid "' as value column. Use 'value.var' to override" -msgstr "" +msgstr "' 作为 value 列。可使用 'value.var' 修改" msgid "The dcast generic in data.table has been passed a" -msgstr "" +msgstr "data.table 中的 dcast 泛型函数被传递了" -msgid "" -", but data.table::dcast currently only has a method for data.tables. Please " -"confirm your input is a data.table, with setDT(" -msgstr "" +msgid ", but data.table::dcast currently only has a method for data.tables. Please confirm your input is a data.table, with setDT(" +msgstr ",但目前 data.table::dcast 仅提供了针对 data.table 的方法。您可通过如下两种方法确保您的输入为一个 data.table对象,即setDT(" msgid ") or as.data.table(" -msgstr "" +msgstr ") 或 as.data.table(" -msgid "" -"). If you intend to use a reshape2::dcast, try installing that package " -"first, but do note that reshape2 is deprecated and you should be migrating " -"your code away from using it." -msgstr "" +msgid "). If you intend to use a reshape2::dcast, try installing that package first, but do note that reshape2 is deprecated and you should be migrating your code away from using it." +msgstr ")。若您想使用reshape2::dcast,尝试先安装reshape2。但请注意reshape2已经不推荐使用,您应修改您的代码以不再使用它。" -msgid "" -"and will attempt to redirect to the reshape2::dcast; please note that " -"reshape2 is deprecated, and this redirection is now deprecated as well. " -"Please do this redirection yourself like reshape2::dcast(" -msgstr "" +msgid "and will attempt to redirect to the reshape2::dcast; please note that reshape2 is deprecated, and this redirection is now deprecated as well. Please do this redirection yourself like reshape2::dcast(" +msgstr ",将尝试重定向到reshape2::dcast。请注意reshape2已经不推荐使用,故该重定向目前也不推荐使用。请手动执行该重定向,如reshape2::dcast(" msgid "). In the next version, this warning will become an error." -msgstr "" +msgstr ")。在下一个版本中,此警告将变成为错误。" -msgid "" -"Invalid formula. Cast formula should be of the form LHS ~ RHS, for e.g., a + " -"b ~ c." -msgstr "" +msgid "Invalid formula. Cast formula should be of the form LHS ~ RHS, for e.g., a + b ~ c." +msgstr "无效的公式。所转换的公式的形式应为LHS ~ RHS,如a + b ~ c。" msgid "data.table to cast must have unique column names" -msgstr "" +msgstr "要转换的data.table必须具有唯一的列名" msgid "value.var values [" -msgstr "" +msgstr "value.var 的值 [" msgid "] are not found in 'data'." -msgstr "" +msgstr "] 无法在 'data' 中找到" -msgid "" -"When 'fun.aggregate' and 'value.var' are both lists, 'value.var' must be " -"either of length =1 or =length(fun.aggregate)." -msgstr "" +msgid "When 'fun.aggregate' and 'value.var' are both lists, 'value.var' must be either of length =1 or =length(fun.aggregate)." +msgstr "当 'fun.aggregate' 和 'value.var' 同为 list时, 'value.var' 的长度必须为 1 或 length(fun.aggregate)。" msgid "'data' must be a data.table." -msgstr "" +msgstr "'data' 必须为 data.table" msgid "'drop' must be logical TRUE/FALSE" -msgstr "" +msgstr "'drop' 必须为逻辑 TRUE/FALSE" msgid "Column [" -msgstr "" +msgstr "列 [" msgid "] not found or of unknown type." -msgstr "" +msgstr "] 无法找到或其类型未知。" msgid "Columns specified in formula can not be of type list" -msgstr "" +msgstr "在formula中指定的列不应为列表类型" msgid "Can not cast an empty data.table" -msgstr "" +msgstr "无法转换一个空的data.table" msgid "Aggregate function missing, defaulting to 'length'" -msgstr "" +msgstr "聚合函数缺失,将默认采用'length'" msgid "Internal error -- empty rhsnames in dcast; please report" -msgstr "" +msgstr "内部错误:dcast 中 rhsnames 为空;请报告" msgid "The melt generic in data.table has been passed a" msgstr "data.table 中的 melt 泛型函数被传递了" @@ -1498,10 +1476,10 @@ msgid "' has size 0. Returning a NULL" msgstr "' 的大小为0. 返回一个NULL" msgid "data.table" -msgstr "" +msgstr "data.table" msgid "data.frame" -msgstr "" +msgstr "data.frame" msgid "" "To read gz and bz2 files directly, fread() requires 'R.utils' package which " @@ -1583,7 +1561,7 @@ msgid "Encountered <" msgstr "遇到 <" msgid "..." -msgstr "" +msgstr "..." msgid "> at the first" msgstr "> 在第一个" @@ -1674,7 +1652,7 @@ msgid "warning" msgstr "警告" msgid ":" -msgstr ":" +msgstr ":" msgid "so the column has been left as type '" msgstr "所以该列已经被保存为类型" @@ -1682,12 +1660,15 @@ msgstr "所以该列已经被保存为类型" msgid "" "key argument of data.table() must be a character vector naming columns (NB: " "col.names are applied before this)" -msgstr "data.table()的关键参数必须是字符向量命名的列(NB:col.names在这之前被使用过)" +msgstr "" +"data.table()的关键参数必须是字符向量命名的列(NB:col.names在这之前被使用过)" msgid "" "index argument of data.table() must be a character vector naming columns " "(NB: col.names are applied before this)" -msgstr "data.table()的index参数必须是字符向量命名的列(NB:参数col.names在这之前被使用过)" +msgstr "" +"data.table()的index参数必须是字符向量命名的列(NB:参数col.names在这之前被使用" +"过)" msgid "dateTimeAs must be a single string" msgstr "dataTimeAs 必须是单个字符串" @@ -1797,15 +1778,8 @@ msgid "" "Using integer64 class columns require to have 'bit64' package installed." msgstr "要在列中使用 integer64 类,需要先安装 'bit64' 包。" -msgid "" -"'xts' class passed to data.table::last function but 'xts' is not available, " -"you should have 'xts' installed already" -msgstr "" - -msgid "" -"'xts' class passed to data.table::first function but 'xts' is not available, " -"you should have 'xts' installed already" -msgstr "" +msgid "'xts' class passed to %s function but 'xts' is not available, you should have 'xts' installed already" +msgstr "'xts'类对象传递给了%s方程,但是'xts'包不可用。您应首先安装'xts'包" msgid "Argument 'sort' should be logical TRUE/FALSE" msgstr "参数 'sort' 应为逻辑值 TRUE 或 FALSE" @@ -2108,64 +2082,49 @@ msgstr "" "table或者data.frame" msgid "Internal code should not be being called on type double" -msgstr "" - -msgid "" -"Input is not a vector of type double. New parallel sort has only been done " -"for double vectors so far. Using one thread." -msgstr "" +msgstr "内部代码不应被调用给双精度类型" -msgid "" -"New parallel sort has not been implemented for decreasing=TRUE so far. Using " -"one thread." -msgstr "" +msgid "Input is not a vector of type double. New parallel sort has only been done for double vectors so far. Using one thread." +msgstr "输入一个并非双精度类型的向量。目前新的并行排序方法仅可应用于双精确度向量。将使用单线程进行计算" -msgid "" -"New parallel sort has not been implemented for vectors containing NA values " -"so far. Using one thread." -msgstr "" +msgid "New parallel sort has not been implemented for decreasing=TRUE so far. Using one thread." +msgstr "目前新的并行排序方法尚无法在decreasing=TRUE的条件下使用。将使用单线程进行计算。" -msgid "x must be a data.frame or data.table." -msgstr "" +msgid "New parallel sort has not been implemented for vectors containing NA values so far. Using one thread." +msgstr "目前新的并行排序方法尚无法用于包含缺失值的向量。将使用单线程。" msgid "x must be a data.frame or data.table" -msgstr "" +msgstr "x 必须为 data.frame 或 data.table" msgid "na.last must be logical TRUE/FALSE" -msgstr "" +msgstr "na.last 必须为逻辑 TRUE/FALSE" -msgid "" -"cols is not a character vector. Please see further information in ?setorder." -msgstr "" +msgid "cols is not a character vector. Please see further information in ?setorder." +msgstr "cols并非一个字符向量。请参考 ?setorder以获得更多信息。" -msgid "" -"cols is a character vector of zero length. Use NULL instead, or wrap with " -"suppressWarnings() to avoid this warning." -msgstr "" +msgid "cols is a character vector of zero length. Use NULL instead, or wrap with suppressWarnings() to avoid this warning." +msgstr "cols为一长度为零的字符向量。请使用NULL代替,或将本函数使用suppressWarnings()包裹以阻止该警告。" msgid "' which is not supported for ordering currently." -msgstr "" +msgstr "',该类型目前尚不支持排序。" msgid "'sorted' is TRUE but element" -msgstr "" +msgstr "'sorted' 为 TRUE 但元素" msgid "is non-atomic, which can't be sorted; try setting sorted = FALSE" -msgstr "" +msgstr "并非原子类型,无法排序。请尝试使用 sorted=FALSE" -msgid "Cross product of elements provided to CJ() would result in" -msgstr "" - -msgid "rows which exceeds .Machine$integer.max ==" -msgstr "" +msgid "Cross product of elements provided to CJ() would result in %d rows which exceeds .Machine$integer.max == %d" +msgstr "CJ()中元素的叉积将产生 %d 行,已超过 .Machine$integer.max == %d" msgid "x and y must both be data.tables" -msgstr "" +msgstr "x 和 y 均需为 data.table" msgid "length(by.x) != length(by.y)" -msgstr "" +msgstr "length(by.x) != length(by.y)" msgid "When x's column ('" -msgstr "" +msgstr "当 x 的列 ('" msgid "') is character, the corresponding column in y ('" msgstr "') 是字符,y 中相应的列 ('" @@ -2264,17 +2223,14 @@ msgstr "" "脚本文件名必须以 '.Rraw' 结尾。如果以 'Rraw.bz2' 结尾的文件存在,其也将被使" "用。" -msgid "Neither" -msgstr "" - -msgid "exist in" -msgstr "均不存在于文件夹" +msgid "Neither %s nor %s exist in %s" +msgstr "%3$s 中 %1$s 也 %2$s 不存在" msgid "Failed after test" -msgstr "" +msgstr "错误出现于测试" msgid "before the next test() call in" -msgstr "" +msgstr "后,先于下一调用test()于" msgid "out of" msgstr "总数为" @@ -2335,10 +2291,10 @@ msgid "l not type list" msgstr "l并非列表(list)类型" msgid "Argument 'nan' must be length 1" -msgstr "" +msgstr "参数 'nan' 的长度必须为 1" msgid "Argument 'nan' must be NA or NaN" -msgstr "" +msgstr "参数 'nan' 必须为 NA 或 NaN" msgid "x not boolean" msgstr "x并非布尔值" @@ -2380,14 +2336,4 @@ msgstr "以下的列并非数值类型,将被忽略:" msgid "%d variable not shown: %s\n" msgid_plural "%d variables not shown: %s\n" -msgstr[0] "" -msgstr[1] "" - -#~ msgid "in" -#~ msgstr "在" - -#~ msgid "on" -#~ msgstr "在" - -#~ msgid ". [" -#~ msgstr ". [" +msgstr[0] "%d变量没显示: %s\n" diff --git a/po/data.table.pot b/po/data.table.pot index 5041a04c94..a826bab881 100644 --- a/po/data.table.pot +++ b/po/data.table.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: data.table 1.12.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-12-23 00:00+0800\n" +"POT-Creation-Date: 2019-12-30 01:24+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1715,14 +1715,6 @@ msgstr "" msgid " 0/1 column will be read as %s\n" msgstr "" -#: fread.c:1158 -msgid "boolean" -msgstr "" - -#: fread.c:1158 -msgid "integer" -msgstr "" - #: fread.c:1166 #, c-format msgid "sep == quote ('%c') is not allowed" @@ -2159,14 +2151,6 @@ msgid "" "first and only row\n" msgstr "" -#: fread.c:1774 -msgid "true" -msgstr "" - -#: fread.c:1774 -msgid "false" -msgstr "" - #: fread.c:1774 msgid " no" msgstr "" @@ -3138,16 +3122,9 @@ msgstr "" msgid "env is not an environment" msgstr "" -#: gsumm.c:45 -msgid "o is not an integer vector" -msgstr "" - -#: gsumm.c:46 -msgid "f is not an integer vector" -msgstr "" - -#: gsumm.c:47 -msgid "l is not an integer vector" +#: gsumm.c:45 gsumm.c:46 gsumm.c:47 +#, c-format +msgid "%s is not an integer vector" msgstr "" #: gsumm.c:56 @@ -3218,9 +3195,10 @@ msgstr "" msgid "This gsum took (narm=%s) ... " msgstr "" -#: gsumm.c:350 gsumm.c:606 +#: gsumm.c:350 gsumm.c:606 gsumm.c:693 gsumm.c:812 gsumm.c:955 gsumm.c:1005 +#: gsumm.c:1085 gsumm.c:1176 gsumm.c:1266 gsumm.c:1409 #, c-format -msgid "nrow [%d] != length(x) [%d] in gsum" +msgid "nrow [%d] != length(x) [%d] in %s" msgstr "" #: gsumm.c:404 @@ -3291,11 +3269,6 @@ msgstr "" msgid "min is not meaningful for factors." msgstr "" -#: gsumm.c:693 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gmin" -msgstr "" - #: gsumm.c:717 gsumm.c:850 msgid "" "No non-missing values found in at least one group. Coercing to numeric type " @@ -3337,11 +3310,6 @@ msgstr "" msgid "max is not meaningful for factors." msgstr "" -#: gsumm.c:812 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gmax" -msgstr "" - #: gsumm.c:930 msgid "" "No non-missing values found in at least one group. Returning '-Inf' for such " @@ -3372,11 +3340,6 @@ msgstr "" msgid "median is not meaningful for factors." msgstr "" -#: gsumm.c:955 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gmedian" -msgstr "" - #: gsumm.c:992 #, c-format msgid "" @@ -3385,11 +3348,6 @@ msgid "" "optimize=1)" msgstr "" -#: gsumm.c:1005 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gtail" -msgstr "" - #: gsumm.c:1073 #, c-format msgid "" @@ -3397,11 +3355,6 @@ msgid "" "tail(.) or turn off GForce optimization using options(datatable.optimize=1)" msgstr "" -#: gsumm.c:1085 gsumm.c:1176 -#, c-format -msgid "nrow [%d] != length(x) [%d] in ghead" -msgstr "" - #: gsumm.c:1153 #, c-format msgid "" @@ -3450,11 +3403,6 @@ msgstr "" msgid "var/sd is not meaningful for factors." msgstr "" -#: gsumm.c:1266 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gvar" -msgstr "" - #: gsumm.c:1382 #, c-format msgid "" @@ -3481,11 +3429,6 @@ msgstr "" msgid "prod is not meaningful for factors." msgstr "" -#: gsumm.c:1409 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gprod" -msgstr "" - #: gsumm.c:1411 #, c-format msgid "Unable to allocate %d * %d bytes for gprod" diff --git a/po/zh_CN.po b/po/zh_CN.po index 3508a583f9..6a95727f07 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: data.table 1.12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-12-23 00:00+0800\n" +"POT-Creation-Date: 2019-12-30 01:24+0800\n" "PO-Revision-Date: 2019-11-18 00:26-04\n" "Last-Translator: Yuhang Chen \n" "Language-Team: Mandarin\n" @@ -181,7 +181,7 @@ msgstr "为所有的%d行赋值\n" msgid "" "Coerced i from numeric to integer. Please pass integer for efficiency; e.g., " "2L rather than 2" -msgstr "" +msgstr "将i由数值型强制转换为整数型。请直接传入整数以提高效率,如传入2L而非2" #: assign.c:323 #, c-format @@ -797,7 +797,7 @@ msgstr "内部错误: opArg 不是一个长度为 on 的整数向量" #: bmerge.c:96 msgid "Internal error: nqgrpArg must be an integer vector" -msgstr "" +msgstr "内部错误:nqgrpArg 必须为一个整数向量" #: bmerge.c:102 msgid "Intrnal error: nqmaxgrpArg is not a positive length-1 integer vector" @@ -1015,16 +1015,16 @@ msgstr "length(iSD)[%d] != length(jiscols)[%d]" #: dogroups.c:92 #, c-format msgid "length(xSD)[%d] != length(xjiscols)[%d]" -msgstr "" +msgstr "length(xSD)[%d] != length(xjiscols)[%d]" #: dogroups.c:155 dogroups.c:184 msgid "Internal error. Type of column should have been checked by now" -msgstr "" +msgstr "内部错误:至此列的类型应已经被检查完成" #: dogroups.c:273 #, c-format msgid "j evaluates to type '%s'. Must evaluate to atomic vector or list." -msgstr "" +msgstr "j的运算结果为'%s'类型。其运算结果必须为原子向量或列表。" #: dogroups.c:281 msgid "" @@ -1125,7 +1125,7 @@ msgstr "dogroups: 从 %d 列增加至 %d 列\n" #: dogroups.c:387 #, c-format msgid "dogroups: length(ans)[%d]!=ngrpcols[%d]+njval[%d]" -msgstr "" +msgstr "dogroups: length(ans)[%d]!=ngrpcols[%d]+njval[%d]" #: dogroups.c:420 #, c-format @@ -1612,7 +1612,7 @@ msgstr "" #: forder.c:561 #, c-format msgid "Column %d passed to [f]order is type '%s', not yet supported." -msgstr "" +msgstr "传递给 [f]order 的第%d列为 '%s'类型,目前尚不支持。" #: forder.c:714 msgid "Internal error: column not supported, not caught earlier" @@ -1621,7 +1621,7 @@ msgstr "内部错误:列有不支持类型,未被前置识别" #: forder.c:722 #, c-format msgid "nradix=%d\n" -msgstr "" +msgstr "nradix=%d\n" #: forder.c:728 #, c-format @@ -1641,7 +1641,7 @@ msgstr "定时块 %2d%s = %8.3f %8d\n" #: forder.c:797 #, c-format msgid "stat[%03d]==%20\n" -msgstr "" +msgstr "stat[%03d]==%20\n" #: forder.c:1053 #, c-format @@ -1740,7 +1740,7 @@ msgstr "内部错误:参数 'cols' 关于 CanyNA 是 '%s' 类型而不是'inte #, c-format msgid "" "Internal error in line %d of fread.c, please report on data.table GitHub: " -msgstr "" +msgstr "fread.c中%d行出现内部错误,请在 data.table 的 GitHub中提交报告:" #: fread.c:147 #, c-format @@ -1811,11 +1811,11 @@ msgstr "未提供 NAstrings \n" #: fread.c:1146 msgid " NAstrings = [" -msgstr "" +msgstr " NAstrings = [" #: fread.c:1149 msgid "]\n" -msgstr "" +msgstr "]\n" #: fread.c:1151 msgid " One or more of the NAstrings looks like a number.\n" @@ -1845,14 +1845,6 @@ msgstr "显示进程 %d\n" msgid " 0/1 column will be read as %s\n" msgstr " 0/1 列被读取为 %s\n" -#: fread.c:1158 -msgid "boolean" -msgstr "" - -#: fread.c:1158 -msgid "integer" -msgstr "" - #: fread.c:1166 #, c-format msgid "sep == quote ('%c') is not allowed" @@ -2199,11 +2191,11 @@ msgstr "采样跳点数 = %d 因为" #: fread.c:1649 #, c-format msgid "nrow limit (%) supplied\n" -msgstr "" +msgstr "指定了nrow 的最大值 (%) \n" #: fread.c:1650 msgid "jump0size==0\n" -msgstr "" +msgstr "jump0size==0\n" #: fread.c:1651 #, c-format @@ -2222,21 +2214,21 @@ msgstr "第%5$d个跳点所找到的第%4$d行,该行字段过于%1$s(%2$d/%3$ #: fread.c:1690 msgid "few" -msgstr "" +msgstr "少" #: fread.c:1690 msgid "many" -msgstr "" +msgstr "多" #: fread.c:1690 msgid "" "Most likely this jump landed awkwardly so type bumps here will be skipped." -msgstr "" +msgstr "很有可能这一跳点的位置并不合适,因此此处的类型转换将被跳过。" #: fread.c:1716 #, c-format msgid " Type codes (jump %03d) : %s Quote rule %d\n" -msgstr "" +msgstr " 类型码(跳点 %03d) : %s 引用规则 %d\n" #: fread.c:1729 #, c-format @@ -2282,10 +2274,12 @@ msgid "" "setnames() afterwards if this guess is not correct, or fix the file write " "command that created the file to create a valid file." msgstr "" +"作为第一列,并被用于猜测行名或索引。若上述猜测不正确,可在后续使用setnames()" +"进行修改,或修复用于生成该文件的文件写入命令以生成有效的文件。" #: fread.c:1747 msgid "s at the end." -msgstr "" +msgstr "到结尾处" #: fread.c:1749 msgid "" @@ -2314,17 +2308,9 @@ msgid "" "first and only row\n" msgstr " 参数'header' 被设置为%s, 因为唯一的一行包含 %s 个字段\n" -#: fread.c:1774 -msgid "true" -msgstr "" - -#: fread.c:1774 -msgid "false" -msgstr "" - #: fread.c:1774 msgid " no" -msgstr "" +msgstr "0" #: fread.c:1777 msgid "" @@ -2341,7 +2327,7 @@ msgstr "参数 'header' 被设置为false,因为部分字段的首行不为字 #: fread.c:1795 #, c-format msgid " Type codes (first row) : %s Quote rule %d\n" -msgstr "" +msgstr " 类型码(第一行) : %s 引用规则 %d\n" #: fread.c:1804 #, c-format @@ -2365,7 +2351,7 @@ msgstr " 已使用了 %2$d个跳点抽样 %1$ 行(处理了字段间的 #, c-format msgid "" " Bytes from first data row on line %d to the end of last row: %\n" -msgstr "" +msgstr " 从第一个数据行(%d)到最后一行的字节: %\n" #: fread.c:1819 #, c-format @@ -2383,6 +2369,8 @@ msgid "" " Initial alloc = % rows (% + %d%%) using bytes/" "max(mean-2*sd,min) clamped between [1.1*estn, 2.0*estn]\n" msgstr "" +"为 % 行 (% + %d%%)分配初始内存,大小为字节数/max(mean-2*sd," +"min),并确保该数值落于区间[1.1*estn, 2.0*estn]中\n" #: fread.c:1825 #, c-format @@ -2462,7 +2450,7 @@ msgstr " jumps=[%d..%d),chunk_size=%,total_size=%\n" #: fread.c:2005 #, c-format msgid "Internal error: Master thread is not thread 0 but thread %d.\n" -msgstr "" +msgstr "内部错误:主线程并非线程0而是线程%d\n" #: fread.c:2213 #, c-format @@ -2478,7 +2466,7 @@ msgstr "" msgid "" "Internal error: invalid head position. jump=%d, headPos=%p, thisJumpStart=" "%p, sof=%p" -msgstr "" +msgstr "内部错误:head 位置无效。jump=%d, headPos=%p, thisJumpStart=%p, sof=%p" #: fread.c:2335 #, c-format @@ -3104,7 +3092,7 @@ msgstr "x 目前必须是双精度 ('double') 类型的向量" #: fsort.c:122 #, c-format msgid "nth=%d, nBatch=%d\n" -msgstr "" +msgstr "nth=%d, nBatch=%d\n" #: fsort.c:156 #, c-format @@ -3127,12 +3115,15 @@ msgstr "无法分配工作内存" #: fsort.c:177 #, c-format msgid "" -"counts is %dMB (%d pages per nBatch=%d, batchSize=%, lastBatchSize=%)\n" -msgstr "counts为%dMB (每个nBatch中的%d页=%d, batchSize=%, lastBatchSize=%)\n" +"counts is %dMB (%d pages per nBatch=%d, batchSize=%, lastBatchSize=" +"%)\n" +msgstr "" +"counts为%dMB (每个nBatch中的%d页=%d, batchSize=%, lastBatchSize=" +"%)\n" #: fsort.c:231 msgid "Internal error: counts[nBatch-1][MSBsize-1] != length(x)" -msgstr "内部错误:counts[nBatch-1][MSBsize-1] 不等于 length(x)" +msgstr "内部错误:counts[nBatch-1][MSBsize-1] != length(x)" #: fsort.c:247 msgid "Top 5 MSB counts: " @@ -3190,11 +3181,12 @@ msgstr "... " #, c-format msgid "" "\n" -"args.doRowNames=%d args.rowNames=%d doQuote=%d args.nrow=% args.ncol=%d " -"eolLen=%d\n" -msgstr "\n" -"args.doRowNames=%d args.rowNames=%d doQuote=%d args.nrow=% args.ncol=%d " -"eolLen=%d\n" +"args.doRowNames=%d args.rowNames=%d doQuote=%d args.nrow=% args.ncol=" +"%d eolLen=%d\n" +msgstr "" +"\n" +"args.doRowNames=%d args.rowNames=%d doQuote=%d args.nrow=% args.ncol=" +"%d eolLen=%d\n" #: fwrite.c:664 #, c-format @@ -3212,8 +3204,9 @@ msgid "" "%s: '%s'. Failed to open existing file for writing. Do you have write " "permission to it? Is this Windows and does another process such as Excel " "have it open?" -msgstr "%s: '%s'. 无法打开一斤存在的文件进行写入.你是否对该文件有写入权限?" -"这是Windows系统?是否有Excel之类的进程已经打开了该文件?" +msgstr "" +"%s: '%s'. 无法打开一斤存在的文件进行写入.你是否对该文件有写入权限?这是" +"Windows系统?是否有Excel之类的进程已经打开了该文件?" #: fwrite.c:692 #, c-format @@ -3221,8 +3214,9 @@ msgid "" "%s: '%s'. Unable to create new file for writing (it does not exist already). " "Do you have permission to write here, is there space on the disk and does " "the path exist?" -msgstr "%s: '%s'. 无法创建新的文件进行写入(文件不存在)" -"你是否对此有写入权限?磁盘上是否有空间以及路径是否存在?" +msgstr "" +"%s: '%s'. 无法创建新的文件进行写入(文件不存在)你是否对此有写入权限?磁盘上" +"是否有空间以及路径是否存在?" #: fwrite.c:700 #, c-format @@ -3291,7 +3285,8 @@ msgstr "请将此消息上方和下方的全部输出结果一起提交到data.t msgid "" "Please retry fwrite() with verbose=TRUE and include the full output with " "your data.table bug report." -msgstr "请使用verbose=TRUE重试fwrite(),并将完整的输出提交到data.table的bug report中" +msgstr "" +"请使用verbose=TRUE重试fwrite(),并将完整的输出提交到data.table的bug report中" #: fwriteR.c:41 msgid "Internal error: col passed to getMaxCategLen is missing levels" @@ -3307,9 +3302,9 @@ msgid "" "Row %d of list column is type '%s' - not yet implemented. fwrite() can write " "list columns containing items which are atomic vectors of type logical, " "integer, integer64, double, complex and character." -msgstr "列表页行%d的类型是'%s' - 尚未实施. fwrite()可以写入" -"包含逻辑类型原子向量项目的列表页," -"整数,整数64,双精度,复数和字符" +msgstr "" +"列表页行%d的类型是'%s' - 尚未实施. fwrite()可以写入包含逻辑类型原子向量项目的" +"列表页,整数,整数64,双精度,复数和字符" #: fwriteR.c:103 #, c-format @@ -3340,7 +3335,9 @@ msgstr "列%d的类型是'%s' - 尚未在fwrite中实施" msgid "" "No list columns are present. Setting sep2='' otherwise quote='auto' would " "quote fields containing sep2.\n" -msgstr "当前没有列表页. 设置sep2=''否则quote='auto'会自动为所有包含sep2的字段加上引号.\n" +msgstr "" +"当前没有列表页. 设置sep2=''否则quote='auto'会自动为所有包含sep2的字段加上引" +"号.\n" #: fwriteR.c:266 #, c-format @@ -3363,17 +3360,10 @@ msgstr "sep ('%c'), sep2 ('%c') 和 dec ('%c') 必须都不相同. 列 %d 是一 msgid "env is not an environment" msgstr "env不是环境" -#: gsumm.c:45 -msgid "o is not an integer vector" -msgstr "o不是整数向量" - -#: gsumm.c:46 -msgid "f is not an integer vector" -msgstr "f不是一个整数向量" - -#: gsumm.c:47 -msgid "l is not an integer vector" -msgstr "l 不是整数向量" +#: gsumm.c:45 gsumm.c:46 gsumm.c:47 +#, c-format +msgid "%s is not an integer vector" +msgstr "%s不是整数向量" #: gsumm.c:56 msgid "irowsArg is neither an integer vector nor NULL" @@ -3382,7 +3372,7 @@ msgstr "irowsArg 既不是整数向量也不是 NULL" #: gsumm.c:58 #, c-format msgid "length(f)=%d != length(l)=%d" -msgstr "" +msgstr "length(f)=%d != length(l)=%d" #: gsumm.c:66 #, c-format @@ -3434,7 +3424,7 @@ msgstr "gather 已支持 INTSXP,REALSXP 和 CPLXSXP,但不支持 '%s'" #: gsumm.c:336 gsumm.c:568 #, c-format msgid "%.3fs\n" -msgstr "" +msgstr "%.3fs\n" #: gsumm.c:345 msgid "sum is not meaningful for factors." @@ -3445,10 +3435,11 @@ msgstr "因子的和没有意义。" msgid "This gsum took (narm=%s) ... " msgstr "gsum 占用了 (narm=%s) ..." -#: gsumm.c:350 gsumm.c:606 +#: gsumm.c:350 gsumm.c:606 gsumm.c:693 gsumm.c:812 gsumm.c:955 gsumm.c:1005 +#: gsumm.c:1085 gsumm.c:1176 gsumm.c:1266 gsumm.c:1409 #, c-format -msgid "nrow [%d] != length(x) [%d] in gsum" -msgstr "gsum 中 nrow [%d] != length(x) [%d]" +msgid "nrow [%d] != length(x) [%d] in %s" +msgstr "%3$s 中 nrow [%1$d] != length(x) [%2$d]" #: gsumm.c:404 msgid "" @@ -3530,11 +3521,6 @@ msgstr "" msgid "min is not meaningful for factors." msgstr "因子的最小值没有意义。" -#: gsumm.c:693 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gmin" -msgstr "gmin 中 nrow [%d] != length(x) [%d]" - #: gsumm.c:717 gsumm.c:850 msgid "" "No non-missing values found in at least one group. Coercing to numeric type " @@ -3586,11 +3572,6 @@ msgstr "" msgid "max is not meaningful for factors." msgstr "因子的最大值是没有意义的" -#: gsumm.c:812 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gmax" -msgstr "gmax检测到行数[%d]不等于x的长度[%d]" - #: gsumm.c:930 msgid "" "No non-missing values found in at least one group. Returning '-Inf' for such " @@ -3628,11 +3609,6 @@ msgstr "" msgid "median is not meaningful for factors." msgstr "因子的中位值没有意义。" -#: gsumm.c:955 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gmedian" -msgstr "gmedian函数检测到行数[%d]不等于x的长度[%d]" - #: gsumm.c:992 #, c-format msgid "" @@ -3643,11 +3619,6 @@ msgstr "" "GForce函数median (gmedian)不支持类型'%s'。请使用 stats::tail(.) 或者设置 " "options(datatable.optimize=1) 来关掉GForce优化。" -#: gsumm.c:1005 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gtail" -msgstr "gtail函数检测到行数[%d]不等于x的长度[%d]" - #: gsumm.c:1073 #, c-format msgid "" @@ -3657,11 +3628,6 @@ msgstr "" "GForce函数tail (gtail)不支持类型'%s'。请使用 utils::tail(.) 或者设置 " "options(datatable.optimize=1) 来关掉GForce优化。" -#: gsumm.c:1085 gsumm.c:1176 -#, c-format -msgid "nrow [%d] != length(x) [%d] in ghead" -msgstr "ghead函数检测到行数[%d]不等于x的长度[%d]" - #: gsumm.c:1153 #, c-format msgid "" @@ -3675,20 +3641,20 @@ msgstr "" msgid "" "Internal error, gtail is only implemented for n=1. This should have been " "caught before. please report to data.table issue tracker." -msgstr "" +msgstr "内部错误:gtail仅能应用于n=1的情况。此错误理应已被处理。请在 data.table 的 GitHub中提交报告。" #: gsumm.c:1166 msgid "" "Internal error, ghead is only implemented for n=1. This should have been " "caught before. please report to data.table issue tracker." -msgstr "" +msgstr "内部错误:ghead仅能应用于n=1的情况。此错误理应已被处理。请在 data.table 的 GitHub中提交报告。" #: gsumm.c:1172 msgid "" "Internal error, `g[` (gnthvalue) is only implemented single value subsets " "with positive index, e.g., .SD[2]. This should have been caught before. " "please report to data.table issue tracker." -msgstr "" +msgstr "内部错误:`g[` (gnthvalue) 仅能用于采用单个正数索引求取子集,如 .SD[2]。此错误理应已被处理。请在 data.table 的 GitHub中提交报告。" #: gsumm.c:1250 #, c-format @@ -3696,7 +3662,7 @@ msgid "" "Type '%s' not supported by GForce subset `[` (gnthvalue). Either add the " "prefix utils::head(.) or turn off GForce optimization using " "options(datatable.optimize=1)" -msgstr "" +msgstr "GForce取子集运算符`[` (gnthvalue)尚不支持'%s'类型。。请添加前缀stats::var(.),或使用options(datatable.optimize=1) 关闭 GForce优化" #: gsumm.c:1262 msgid "" @@ -3706,23 +3672,18 @@ msgid "" "using options(datatable.optimize=1). Alternatively, if you only need the " "diagonal elements, 'DT[,lapply(.SD,var),by=,.SDcols=]' is the optimized way " "to do this." -msgstr "" +msgstr "GForce var/sd 仅能应用于列,而非.SD或其他。若要求取某一列表,如.SD,所有元素的全协方差矩阵,请添加前缀stats::var(.SD)(或stats::sd(.SD)),或使用options(datatable.optimize=1) 关闭 GForce优化。另外,若仅需获得对角线元素,最佳的方式是使用'DT[,lapply(.SD,var),by=,.SDcols=]'。" #: gsumm.c:1263 msgid "var/sd is not meaningful for factors." -msgstr "" - -#: gsumm.c:1266 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gvar" -msgstr "" +msgstr "无法对因子类型使用 var/sd。" #: gsumm.c:1382 #, c-format msgid "" "Type '%s' not supported by GForce var (gvar). Either add the prefix stats::" "var(.) or turn off GForce optimization using options(datatable.optimize=1)" -msgstr "" +msgstr "GForce var (gvar) 尚不支持 '%s'类型。请添加前缀stats::var(.),或使用options(datatable.optimize=1) 关闭 GForce优化" #: gsumm.c:1384 #, c-format @@ -3748,11 +3709,6 @@ msgstr "" msgid "prod is not meaningful for factors." msgstr "prod对于因子是没有意义的" -#: gsumm.c:1409 -#, c-format -msgid "nrow [%d] != length(x) [%d] in gprod" -msgstr "在gprod中,nrow [%d] != length(x) [%d]" - #: gsumm.c:1411 #, c-format msgid "Unable to allocate %d * %d bytes for gprod" @@ -4340,12 +4296,12 @@ msgstr "" msgid "" "Failed to allocate working memory for %d factor levels of result column %d " "when reading item %d of item %d" -msgstr "" +msgstr "当读取第%4$d项的第%3$d个子项时,无法为第%2$d列的%1$d个因素水平分配工作内存" #: rbindlist.c:523 #, c-format msgid "Column %d of item %d: %s" -msgstr "" +msgstr "第 %2$d 项的第 %1$d 列: %3$s" #: reorder.c:17 #, c-format diff --git a/src/fread.c b/src/fread.c index bac355b913..69082c5d95 100644 --- a/src/fread.c +++ b/src/fread.c @@ -1155,7 +1155,7 @@ int freadMain(freadMainArgs _args) { if (args.skipNrow >= 0) DTPRINT(_(" skip num lines = %"PRId64"\n"), (int64_t)args.skipNrow); if (args.skipString) DTPRINT(_(" skip to string = <<%s>>\n"), args.skipString); DTPRINT(_(" show progress = %d\n"), args.showProgress); - DTPRINT(_(" 0/1 column will be read as %s\n"), args.logical01? _("boolean") : _("integer")); + DTPRINT(_(" 0/1 column will be read as %s\n"), args.logical01? "boolean" : "integer"); } stripWhite = args.stripWhite; @@ -1771,7 +1771,7 @@ int freadMain(freadMainArgs _args) { } if (verbose) { if (sampleLines==0) { - DTPRINT(_(" 'header' determined to be %s because there are%s number fields in the first and only row\n"), args.header?_("true"):_("false"), args.header?_(" no"):""); + DTPRINT(_(" 'header' determined to be %s because there are%s number fields in the first and only row\n"), args.header?"TRUE":"FALSE", args.header?_(" no"):""); } else { if (args.header) DTPRINT(_(" 'header' determined to be true because all columns are type string and a better guess is not possible\n")); diff --git a/src/gsumm.c b/src/gsumm.c index e106ddc336..210b6d7bf5 100644 --- a/src/gsumm.c +++ b/src/gsumm.c @@ -42,9 +42,9 @@ SEXP gforce(SEXP env, SEXP jsub, SEXP o, SEXP f, SEXP l, SEXP irowsArg) { const bool verbose = GetVerbose(); if (TYPEOF(env) != ENVSXP) error(_("env is not an environment")); // The type of jsub is pretty flexbile in R, so leave checking to eval() below. - if (!isInteger(o)) error(_("o is not an integer vector")); - if (!isInteger(f)) error(_("f is not an integer vector")); - if (!isInteger(l)) error(_("l is not an integer vector")); + if (!isInteger(o)) error(_("%s is not an integer vector"), "o"); + if (!isInteger(f)) error(_("%s is not an integer vector"), "f"); + if (!isInteger(l)) error(_("%s is not an integer vector"), "l"); if (isNull(irowsArg)) { irows = NULL; irowslen = -1; @@ -347,7 +347,7 @@ SEXP gsum(SEXP x, SEXP narmArg, SEXP warnOverflowArg) double started = wallclock(); const bool verbose=GetVerbose(); if (verbose) Rprintf(_("This gsum took (narm=%s) ... "), narm?"TRUE":"FALSE"); - if (nrow != n) error(_("nrow [%d] != length(x) [%d] in gsum"), nrow, n); + if (nrow != n) error(_("nrow [%d] != length(x) [%d] in %s"), nrow, n, "gsum"); bool anyNA=false; SEXP ans; switch(TYPEOF(x)) { @@ -603,7 +603,7 @@ SEXP gmean(SEXP x, SEXP narm) } // na.rm=TRUE. Similar to gsum, but we need to count the non-NA as well for the divisor const int n = (irowslen == -1) ? length(x) : irowslen; - if (nrow != n) error(_("nrow [%d] != length(x) [%d] in gsum"), nrow, n); + if (nrow != n) error(_("nrow [%d] != length(x) [%d] in %s"), nrow, n, "gsum"); long double *s = calloc(ngrp, sizeof(long double)), *si=NULL; // s = sum; si = sum imaginary just for complex if (!s) error(_("Unable to allocate %d * %d bytes for sum in gmean na.rm=TRUE"), ngrp, sizeof(long double)); @@ -690,7 +690,7 @@ SEXP gmin(SEXP x, SEXP narm) int n = (irowslen == -1) ? length(x) : irowslen; //clock_t start = clock(); SEXP ans; - if (nrow != n) error(_("nrow [%d] != length(x) [%d] in gmin"), nrow, n); + if (nrow != n) error(_("nrow [%d] != length(x) [%d] in %s"), nrow, n, "gmin"); int protecti=0; switch(TYPEOF(x)) { case LGLSXP: case INTSXP: @@ -809,7 +809,7 @@ SEXP gmax(SEXP x, SEXP narm) int n = (irowslen == -1) ? length(x) : irowslen; //clock_t start = clock(); SEXP ans; - if (nrow != n) error(_("nrow [%d] != length(x) [%d] in gmax"), nrow, n); + if (nrow != n) error(_("nrow [%d] != length(x) [%d] in %s"), nrow, n, "gmax"); // TODO rework gmax in the same way as gmin and remove this *update char *update = (char *)R_alloc(ngrp, sizeof(char)); @@ -952,7 +952,7 @@ SEXP gmedian(SEXP x, SEXP narmArg) { if (inherits(x, "factor")) error(_("median is not meaningful for factors.")); const bool isInt64 = INHERITS(x, char_integer64), narm = LOGICAL(narmArg)[0]; int n = (irowslen == -1) ? length(x) : irowslen; - if (nrow != n) error(_("nrow [%d] != length(x) [%d] in gmedian"), nrow, n); + if (nrow != n) error(_("nrow [%d] != length(x) [%d] in %s"), nrow, n, "gmedian"); SEXP ans = PROTECT(allocVector(REALSXP, ngrp)); double *ansd = REAL(ans); switch(TYPEOF(x)) { @@ -1002,7 +1002,7 @@ SEXP glast(SEXP x) { R_len_t i,k; int n = (irowslen == -1) ? length(x) : irowslen; SEXP ans; - if (nrow != n) error(_("nrow [%d] != length(x) [%d] in gtail"), nrow, n); + if (nrow != n) error(_("nrow [%d] != length(x) [%d] in %s"), nrow, n, "gtail"); switch(TYPEOF(x)) { case LGLSXP: { const int *ix = LOGICAL(x); @@ -1082,7 +1082,7 @@ SEXP gfirst(SEXP x) { R_len_t i,k; int n = (irowslen == -1) ? length(x) : irowslen; SEXP ans; - if (nrow != n) error(_("nrow [%d] != length(x) [%d] in ghead"), nrow, n); + if (nrow != n) error(_("nrow [%d] != length(x) [%d] in %s"), nrow, n, "ghead"); switch(TYPEOF(x)) { case LGLSXP: { int const *ix = LOGICAL(x); @@ -1173,7 +1173,7 @@ SEXP gnthvalue(SEXP x, SEXP valArg) { R_len_t i,k, val=INTEGER(valArg)[0]; int n = (irowslen == -1) ? length(x) : irowslen; SEXP ans; - if (nrow != n) error(_("nrow [%d] != length(x) [%d] in ghead"), nrow, n); + if (nrow != n) error(_("nrow [%d] != length(x) [%d] in %s"), nrow, n, "ghead"); switch(TYPEOF(x)) { case LGLSXP: { const int *ix = LOGICAL(x); @@ -1263,7 +1263,7 @@ SEXP gvarsd1(SEXP x, SEXP narm, Rboolean isSD) if (inherits(x, "factor")) error(_("var/sd is not meaningful for factors.")); long double m, s, v; R_len_t i, j, ix, thisgrpsize = 0, n = (irowslen == -1) ? length(x) : irowslen; - if (nrow != n) error(_("nrow [%d] != length(x) [%d] in gvar"), nrow, n); + if (nrow != n) error(_("nrow [%d] != length(x) [%d] in %s"), nrow, n, "gvar"); SEXP sub, ans = PROTECT(allocVector(REALSXP, ngrp)); Rboolean ans_na; switch(TYPEOF(x)) { @@ -1406,7 +1406,7 @@ SEXP gprod(SEXP x, SEXP narm) int n = (irowslen == -1) ? length(x) : irowslen; //clock_t start = clock(); SEXP ans; - if (nrow != n) error(_("nrow [%d] != length(x) [%d] in gprod"), nrow, n); + if (nrow != n) error(_("nrow [%d] != length(x) [%d] in %s"), nrow, n, "gprod"); long double *s = malloc(ngrp * sizeof(long double)); if (!s) error(_("Unable to allocate %d * %d bytes for gprod"), ngrp, sizeof(long double)); for (i=0; i