Skip to content

Commit

Permalink
Translations update (#4610)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico authored Jul 17, 2020
1 parent 4d849e0 commit 1a8a390
Show file tree
Hide file tree
Showing 11 changed files with 1,304 additions and 1,201 deletions.
2 changes: 1 addition & 1 deletion R/data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -2925,7 +2925,7 @@ isReallyReal = function(x) {
RHS = eval(stub[[3L]], x, enclos)
if (is.list(RHS)) RHS = as.character(RHS) # fix for #961
if (length(RHS) != 1L && !operator %chin% c("%in%", "%chin%")){
if (length(RHS) != nrow(x)) stop("RHS of ", operator, " is length ",length(RHS)," which is not 1 or nrow (",nrow(x),"). For robustness, no recycling is allowed (other than of length 1 RHS). Consider %in% instead.")
if (length(RHS) != nrow(x)) stop(gettextf("RHS of %s is length %d which is not 1 or nrow (%d). For robustness, no recycling is allowed (other than of length 1 RHS). Consider %%in%% instead.", operator, length(RHS), nrow(x), domain="R-data.table"), domain=NA)
return(NULL) # DT[colA == colB] regular element-wise vector scan
}
if ( mode(x[[col]]) != mode(RHS) || # mode() so that doubleLHS/integerRHS and integerLHS/doubleRHS!isReallyReal are optimized (both sides mode 'numeric')
Expand Down
2 changes: 1 addition & 1 deletion R/xts.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ as.data.table.xts = function(x, keep.rownames = TRUE, key=NULL, ...) {
r = setDT(as.data.frame(x, row.names=NULL))
if (identical(keep.rownames, FALSE)) return(r[])
index_nm = if (is.character(keep.rownames)) keep.rownames else "index"
if (index_nm %chin% names(x)) stop(sprintf("Input xts object should not have '%s' column because it would result in duplicate column names. Rename '%s' column in xts or use `keep.rownames` to change the index col name.", index_nm, index_nm))
if (index_nm %chin% names(x)) stop(gettextf("Input xts object should not have '%s' column because it would result in duplicate column names. Rename '%s' column in xts or use `keep.rownames` to change the index column name.", index_nm, index_nm, domain="R-data.table"), domain=NA)
r[, c(index_nm) := zoo::index(x)]
setcolorder(r, c(index_nm, setdiff(names(r), index_nm)))
# save to end to allow for key=index_nm
Expand Down
Binary file modified inst/po/en@quot/LC_MESSAGES/R-data.table.mo
Binary file not shown.
Binary file modified inst/po/en@quot/LC_MESSAGES/data.table.mo
Binary file not shown.
Binary file modified inst/po/zh_CN/LC_MESSAGES/R-data.table.mo
Binary file not shown.
Binary file modified inst/po/zh_CN/LC_MESSAGES/data.table.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions inst/tests/tests.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -16875,7 +16875,7 @@ if (test_xts) {
test(2133.1, colnames(DT), c("DATE", "VALUE"))
test(2133.2, key(DT), "DATE")
test(2133.3, as.data.table(xts, keep.rownames = "VALUE"),
error = "Input xts object should not have 'VALUE' column because it would result in duplicate column names. Rename 'VALUE' column in xts or use `keep.rownames` to change the index col name.")
error = "Input xts object should not have 'VALUE' column because it would result in duplicate column names. Rename 'VALUE' column in xts or use `keep.rownames` to change the index column name.")
test(2133.4, as.data.table(xts, keep.rownames = character()),
error = "keep.rownames must be length 1")
test(2133.5, as.data.table(xts, keep.rownames = NA_character_),
Expand Down Expand Up @@ -16979,7 +16979,7 @@ if (.Platform$OS.type=="windows") local({
test(2143, rbind(DT,list(c=4L,a=7L)), error="2.*1.*c.*1")
})
# test back to English (the argument order is back to 1,c,2,1)
test(2144, rbind(DT,list(c=4L,a=7L)), error="Column 1 ['c'] of item 2 is missing in item 1")
test(2144, rbind(DT,list(c=4L,a=7L)), error="Column 1 ['c'] of item 2 is missing in item 1")

# Attempting to join on character(0) shouldn't crash R
A = data.table(A='a')
Expand Down
59 changes: 37 additions & 22 deletions po/R-data.table.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: data.table 1.12.9\n"
"POT-Creation-Date: 2019-12-31 13:02\n"
"POT-Creation-Date: 2020-07-17 14:38\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -304,6 +304,9 @@ msgstr ""
msgid "not-join '!' prefix is present on i but nomatch is provided. Please remove nomatch."
msgstr ""

msgid "Operator := detected in i, the first argument inside DT[...], but is only valid in the second argument, j. Most often, this happens when forgetting the first comma (e.g. DT[newvar := 5] instead of DT[ , new_var := 5]). Please double-check the syntax. Run traceback(), and debugger() to get a line number."
msgstr ""

msgid "is not found in calling scope"
msgstr ""

Expand Down Expand Up @@ -445,6 +448,12 @@ msgstr ""
msgid "Some items of .SDcols are not column names:"
msgstr ""

msgid "'(m)get' found in j. ansvars being set to all columns. Use .SDcols or a single j=eval(macro) instead. Both will detect the columns used which is important for efficiency.\nOld ansvars: %s"
msgstr ""

msgid "New ansvars: %s"
msgstr ""

msgid "This j doesn't use .SD but .SDcols has been supplied. Ignoring .SDcols. See ?data.table."
msgstr ""

Expand Down Expand Up @@ -805,16 +814,7 @@ msgstr ""
msgid "x is a list, 'cols' cannot be 0-length."
msgstr ""

msgid "RHS of"
msgstr ""

msgid "is length"
msgstr ""

msgid "which is not 1 or nrow ("
msgstr ""

msgid "). For robustness, no recycling is allowed (other than of length 1 RHS). Consider %in% instead."
msgid "RHS of %s is length %d which is not 1 or nrow (%d). For robustness, no recycling is allowed (other than of length 1 RHS). Consider %%in%% instead."
msgstr ""

msgid "Internal error in .isFastSubsettable. Please report to data.table developers"
Expand Down Expand Up @@ -1345,7 +1345,7 @@ msgstr ""
msgid "Supplied both `by` and `by.x/by.y`. `by` argument will be ignored."
msgstr ""

msgid "A non-empty vector of column names are required for `by.x` and `by.y`."
msgid "A non-empty vector of column names is required for `by.x` and `by.y`."
msgstr ""

msgid "Elements listed in `by.x` must be valid column names in x."
Expand Down Expand Up @@ -1384,13 +1384,25 @@ msgstr ""
msgid "**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update.dev.pkg()\n**********"
msgstr ""

msgid "**********\nThis installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode."
msgid "**********"
msgstr ""

msgid "This installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode."
msgstr ""

msgid "sysname"
msgstr ""

msgid "Darwin"
msgstr ""

msgid "This is a Mac. Please read https://mac.r-project.org/openmp/. Please engage with Apple and ask them for support. Check r-datatable.com for updates, and our Mac instructions here: https://github.com/Rdatatable/data.table/wiki/Installation. After several years of many reports of installation problems on Mac, it's time to gingerly point out that there have been no similar problems on Windows or Linux."
msgstr ""

msgid "If this is a Mac, please ensure you are using R>=3.4.0 and have followed our Mac instructions here: https://github.com/Rdatatable/data.table/wiki/Installation."
msgid "This is"
msgstr ""

msgid "This warning message should not occur on Windows or Linux. If it does, please file a GitHub issue.\n**********"
msgid ". This warning should not normally occur on Windows or Linux where OpenMP is turned on by data.table's configure script by passing -fopenmp to the compiler. If you see this warning on Windows or Linux, please file a GitHub issue."
msgstr ""

msgid "The option 'datatable.nomatch' is being used and is not set to the default NA. This option is still honored for now but will be deprecated in future. Please see NEWS for 1.12.4 for detailed information and motivation. To specify inner join, please specify `nomatch=NULL` explicitly in your calls rather than changing the default using this option."
Expand Down Expand Up @@ -1423,6 +1435,9 @@ msgstr ""
msgid "Option 'datatable.old.bywithoutby' has been removed as warned for 2 years. It is now ignored. Please use by=.EACHI instead and stop using this option."
msgstr ""

msgid "Option 'datatable.old.unique.by.key' has been removed as warned for 4 years. It is now ignored. Please use by=key(DT) instead and stop using this option."
msgstr ""

msgid "Unexpected base R behaviour: list(x) has copied x"
msgstr ""

Expand Down Expand Up @@ -1507,9 +1522,6 @@ msgstr ""
msgid "' exists but is invalid"
msgstr ""

msgid "Use 'if (length(o <- forderv(DT,by))) ...' for efficiency in one step, so you have o as well if not sorted."
msgstr ""

msgid "x is vector but 'by' is supplied"
msgstr ""

Expand Down Expand Up @@ -1609,9 +1621,6 @@ msgstr ""
msgid "None of the datasets should contain a column named '.seqn'"
msgstr ""

msgid "'target' and 'current' must both be data.tables"
msgstr ""

msgid "Internal error: ncol(current)==ncol(target) was checked above"
msgstr ""

Expand Down Expand Up @@ -1732,7 +1741,13 @@ msgstr ""
msgid "not found: ["
msgstr ""

msgid "Input xts object should not have 'index' column because it would result in duplicate column names. Rename 'index' column in xts or use `keep.rownames=FALSE` and add index manually as another column."
msgid "keep.rownames must be length 1"
msgstr ""

msgid "keep.rownames must not be NA"
msgstr ""

msgid "Input xts object should not have '%s' column because it would result in duplicate column names. Rename '%s' column in xts or use `keep.rownames` to change the index column name."
msgstr ""

msgid "data.table must have a time based column in first position, use `setcolorder` function to change the order, or see ?timeBased for supported types"
Expand Down
119 changes: 77 additions & 42 deletions po/R-zh_CN.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: data.table 1.12.5\n"
"POT-Creation-Date: 2019-12-31 13:02\n"
"POT-Creation-Date: 2020-07-17 14:38\n"
"PO-Revision-Date: 2019-11-16 18:37+0800\n"
"Last-Translator: Xianying Tan <shrektan@126.com>\n"
"Language-Team: Mandarin\n"
Expand Down Expand Up @@ -387,6 +387,17 @@ msgid ""
msgstr ""
"not-join '!' 前缀在 i 中存在,但是 nomatch 也被提供了。需要移除nomatch。"

msgid ""
"Operator := detected in i, the first argument inside DT[...], but is only "
"valid in the second argument, j. Most often, this happens when forgetting "
"the first comma (e.g. DT[newvar := 5] instead of DT[ , new_var := 5]). "
"Please double-check the syntax. Run traceback(), and debugger() to get a "
"line number."
msgstr "在 i, 即 DT[...] 中的第一个参数,中检测出操作符 := ,但该操作符仅在 j,"
"即 DT[...] 中的第二个参数中使用才有效。通常,该错误发生在忘记"
"添加第一个逗号时 (如错误地将 [DT , new_var := 5] 写作 DT[newvar := 5])。"
"请再次检查语法是否正确。运行 trackback(),和 debugger() 来获取发生错误的行号。"

msgid "is not found in calling scope"
msgstr "不存在调用环境里"

Expand Down Expand Up @@ -594,6 +605,18 @@ msgstr ".SDcols 应为列数或是列名"
msgid "Some items of .SDcols are not column names:"
msgstr ".SDcols 中的部份项目不是列名:"

msgid ""
"'(m)get' found in j. ansvars being set to all columns. Use .SDcols or a "
"single j=eval(macro) instead. Both will detect the columns used which is "
"important for efficiency.\n"
"Old ansvars: %s"
msgstr "在 j 中检测出 '(m)get'。ansvars 将被设为所以列。请使用 .SDcols 或"
"j=eval(macro) 来代替。二者均可检测出实际参与运算的列,这对提高运行效率非常重要。\n"
"旧的 ansvars:%s"

msgid "New ansvars: %s"
msgstr "新的 ansvars: %s"

msgid ""
"This j doesn't use .SD but .SDcols has been supplied. Ignoring .SDcols. See ?"
"data.table."
Expand Down Expand Up @@ -1091,21 +1114,12 @@ msgstr "x 是单个向量,非空的 'cols' 没有意义。"
msgid "x is a list, 'cols' cannot be 0-length."
msgstr "x 是一个列表(list),'cols' 长度不能为0。"

msgid "RHS of"
msgstr "右手侧(RHS)"

msgid "is length"
msgstr "长度为"

msgid "which is not 1 or nrow ("
msgstr "其非 1 或 总行数 nrow ("

msgid ""
"). For robustness, no recycling is allowed (other than of length 1 RHS). "
"Consider %in% instead."
"RHS of %s is length %d which is not 1 or nrow (%d). For robustness, no "
"recycling is allowed (other than of length 1 RHS). Consider %%in%% instead."
msgstr ""
")。考虑到程序的稳健性,只有在右侧元素长度为 1 的情况下,我们才会对之进行循"
"。考虑改用 %in% 。"
"%s 的右手侧 (RHS) 长度为 %d, 其非 1 或 总行数 nrow (%d)。考虑到程序的稳健性,"
"只有在右侧元素长度为 1 的情况下,我们才会对之进行循环。考虑改用 %%in%% 。"

msgid ""
"Internal error in .isFastSubsettable. Please report to data.table developers"
Expand Down Expand Up @@ -1838,7 +1852,7 @@ msgstr "`by.x`和`by.y`必须是相同的长度。"
msgid "Supplied both `by` and `by.x/by.y`. `by` argument will be ignored."
msgstr "参数`by`和`by.x/by.y`都提供了值。参数`by`的值会被忽略。"

msgid "A non-empty vector of column names are required for `by.x` and `by.y`."
msgid "A non-empty vector of column names is required for `by.x` and `by.y`."
msgstr "`by.x`和`by.y`必须是非空的列名。"

msgid "Elements listed in `by.x` must be valid column names in x."
Expand Down Expand Up @@ -1896,29 +1910,47 @@ msgstr ""
"table::update.dev.pkg()\n"
"**********"

msgid "**********"
msgstr "**********"

msgid ""
"**********\n"
"This installation of data.table has not detected OpenMP support. It should "
"still work but in single-threaded mode."
msgstr ""
"**********\n"
"data.table的安装未检测到OpenMP支持。在单线程模式下应该仍能运行"

msgid "sysname"
msgstr "sysname"

msgid "Darwin"
msgstr "Darwin"

msgid ""
"If this is a Mac, please ensure you are using R>=3.4.0 and have followed our "
"Mac instructions here: https://github.com/Rdatatable/data.table/wiki/"
"Installation."
"This is a Mac. Please read https://mac.r-project.org/openmp/. Please engage "
"with Apple and ask them for support. Check r-datatable.com for updates, and "
"our Mac instructions here: https://github.com/Rdatatable/data.table/wiki/"
"Installation. After several years of many reports of installation problems "
"on Mac, it's time to gingerly point out that there have been no similar "
"problems on Windows or Linux."
msgstr ""
"如果是Mac,请确保您使用的R版本>=3.4.0,同时遵循了我们Mac上的安装说明:"
"https://github.com/Rdatatable/data.table/wiki/Installation。"
"此设备为 Mac。请阅读 https://mac.r-project.org/openmp/。请"
"与 Apple 公司联系以获取支持。查看 r-datatable.com 以获取更新,并"
"参阅我们的 Mac 设备说明:https://github.com/Rdatatable/data.table/wiki/Installation"
"在 Mac 上出现相关安装问题的报告已数年之久,"
"需要指出的是在 Windows 或 Linux 平台上一般不存在类似问题。"

msgid "This is"
msgstr "这是"

msgid ""
"This warning message should not occur on Windows or Linux. If it does, "
"please file a GitHub issue.\n"
"**********"
". This warning should not normally occur on Windows or Linux where OpenMP is "
"turned on by data.table's configure script by passing -fopenmp to the "
"compiler. If you see this warning on Windows or Linux, please file a GitHub "
"issue."
msgstr ""
"在Windows或Linux上不应出现此警告消息。如果有,请提交给GitHub issue。\n"
"**********"
"。此警告一般不应出现在 Windows 或 Linux 平台中,因为"
"data.table 的 configure 脚本中已通过向编译器传递 -fopenmp 参数启用了 OpenMP。"
"如果你在 Windows 或 Linux 平台中发现此警告,请在 GitHub 中提交 issue。"

msgid ""
"The option 'datatable.nomatch' is being used and is not set to the default "
Expand Down Expand Up @@ -1977,6 +2009,13 @@ msgstr ""
"选项'datatable.old.bywithoutby'已经被移除,警告了2年。它现在被忽略。 请改用"
"by = .EACHI,然后停止使用这个选项。"

msgid ""
"Option 'datatable.old.unique.by.key' has been removed as warned for 4 years. "
"It is now ignored. Please use by=key(DT) instead and stop using this option."
msgstr ""
"选项'datatable.old.bywithoutby'已经被移除,警告了2年。它现在被忽略。 请改用"
"by = .EACHI,然后停止使用这个选项。"

msgid "Unexpected base R behaviour: list(x) has copied x"
msgstr "意外的base R行为:list(x)已经复制了x"

Expand Down Expand Up @@ -2089,13 +2128,6 @@ msgstr "内部错误:索引"
msgid "' exists but is invalid"
msgstr "存在但无效"

msgid ""
"Use 'if (length(o <- forderv(DT,by))) ...' for efficiency in one step, so "
"you have o as well if not sorted."
msgstr ""
"请使用'if (length(o <- forderv(DT,by))) ...' , 以便在一步中拥有较好的效率,同"
"时如果你还未排序,你也获得了变量o"

msgid "x is vector but 'by' is supplied"
msgstr "x是一个向量, 但是参数'by'被提供"

Expand Down Expand Up @@ -2216,9 +2248,6 @@ msgstr "' 然而 y 中对应的项是:'"
msgid "None of the datasets should contain a column named '.seqn'"
msgstr "所有的数据集都不应该包含名为 '.seqn' 的列"

msgid "'target' and 'current' must both be data.tables"
msgstr "'target' 和 'current' 都必须是 data.table"

msgid "Internal error: ncol(current)==ncol(target) was checked above"
msgstr "内部错误:ncol(current)==ncol(target) 之前已经检查"

Expand Down Expand Up @@ -2363,13 +2392,19 @@ msgstr "Pattern"
msgid "not found: ["
msgstr "未找到: ["

msgid "keep.rownames must be length 1"
msgstr "keep.rownames 的长度必须为 1"

msgid "keep.rownames must not be NA"
msgstr "keep.rownames 不可为 NA"

msgid ""
"Input xts object should not have 'index' column because it would result in "
"duplicate column names. Rename 'index' column in xts or use `keep."
"rownames=FALSE` and add index manually as another column."
"Input xts object should not have '%s' column because it would result in "
"duplicate column names. Rename '%s' column in xts or use `keep.rownames` to "
"change the index column name."
msgstr ""
"输入的xts对象不能含有'index'列,因这会导致出现重复的列名。请尝试重新命名xts中"
"的'index'列或者使用`keep.rownames=FALSE`并手动添加index为另外的列"
"输入的xts对象不能含有'%s'列,因这会导致出现重复的列名。请尝试重新命名xts中"
"的'%s'列或者使用`keep.rownames`并手动添加index为另外的列"

msgid ""
"data.table must have a time based column in first position, use "
Expand Down
Loading

0 comments on commit 1a8a390

Please sign in to comment.