Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 25 additions & 17 deletions po/R-zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -87,87 +87,95 @@ msgid "; filled with NA"
msgstr ""

msgid "A column may not be called .SD. That has special meaning."
msgstr ""
msgstr "无法将列命名为 .SD,因为 .SD 为特殊符号。"

msgid "class must be length 1"
msgstr ""
msgstr "class 的长度必须为 1"

msgid "between has been passed an argument x of type logical"
msgstr ""
msgstr "传入 between 的参数 x 为逻辑(logical)型"

msgid ""
"'between' function the 'x' argument is a POSIX class while 'lower' was not, "
"coercion to POSIX failed with:"
Comment thread
hongyuanjia marked this conversation as resolved.
msgstr ""
"'between' 中的 'x' 参数为 POSIX 类,而 'lower' 并不是,"
"将 'lower' 自动转换成 POSIX 失败:"

msgid ""
"'between' function the 'x' argument is a POSIX class while 'upper' was not, "
"coercion to POSIX failed with:"
msgstr ""
"'between' 中的 'x' 参数为 POSIX 类,而 'upper' 并不是,"
"将 'upper' 自动转换成 POSIX 失败:"

msgid ""
"'between' lower= and upper= are both POSIXct but have different tzone "
"attributes:"
msgstr ""
"'between' 中的 lower= 和 upper= 均为 POSIXct 类型但却有不同的时区"
"属性(tzone):"

msgid ". Please align their time zones."
msgstr ""
msgstr "。请确保二者的时区一致。"

msgid ""
"'between' arguments are all POSIXct but have mismatched tzone attributes:"
msgstr ""
"'between' 的参数均为 POSIXct 类型但时区属性(tzone)不匹配:"

msgid ". The UTC times will be compared."
msgstr ""
msgstr "。将采用 UTC 时间进行比较。"

msgid "trying to use integer64 class when 'bit64' package is not installed"
msgstr ""
msgstr "试图使用 intger64 类型但 'bit64' 包尚未安装"

msgid ""
"Not yet implemented NAbounds=TRUE for this non-numeric and non-character type"
msgstr ""
"对这种非数值(numeric)和非字符(character)的类型,尚未实现 NAbounds=TRUE 的功能"

msgid "Some lower>upper for this non-numeric and non-character type"
msgstr ""
msgstr "对于该非数值(numeric)和非字符(character)类型的输入,存在一部分下界(lower)> 上界(upper)的情况"

msgid "RHS has length()"
msgstr ""
msgstr "右手侧(RHS)的长度为"

msgid "; expecting length 2."
msgstr ""
msgstr ";其长度应为 2。"

msgid "c"
msgstr ""
Comment thread
MichaelChirico marked this conversation as resolved.

msgid "Perhaps you meant %s?"
msgstr ""
msgstr "或许你想用的是 %s?"

msgid "The first element should be the lower bound(s);"
msgstr ""
msgstr "第一个元素应为下界;"

msgid "the second element should be the upper bound(s)."
msgstr ""
msgstr "第二个元素应为上界。"

msgid "x."
msgstr ""

msgid "is type"
msgstr ""
msgstr "的类型为"

msgid "which is not supported by data.table join"
msgstr ""
msgstr ",该类型无法用于 data.table 的联接"

msgid "i."
msgstr ""

msgid "Attempting roll join on factor column when joining x."
msgstr ""
msgstr "试图滚动联接(roll join)因子类型(factor)的列,这发生于将 x."

msgid "to i."
msgstr ""
msgstr "与 i."

msgid ". Only integer, double or character columns may be roll joined."
msgstr ""
msgstr "联接时。但只有整数(integer)、双精度(double)或字符(character)类型的列可以使用滚动联接(roll join)。"

msgid "Incompatible join types: x."
msgstr ""
Comment thread
MichaelChirico marked this conversation as resolved.
Expand Down
59 changes: 49 additions & 10 deletions po/zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -172,67 +172,81 @@ msgid ""
"a logical subset, simply wrap with which(), and take the which() outside the "
"loop if possible for efficiency."
msgstr ""
"i 为 '%s' 类型。i 必须为整(integer)型,或数值(numeric)型(将被自动转换成整型并发出警告)。如果 i 为"
"一个用于筛选的逻辑(logical)向量,请直接将它传给 which(),且如果可能的话将 which() 放置于"
"循环之外以保持高效。"

#: assign.c:331
#, c-format
msgid "i[%d] is %d which is out of range [1,nrow=%d]."
msgstr ""
msgstr "i[%d] 为 %d 且超出了范围 [1,nrow=%d]。"

#: assign.c:334
#, c-format
msgid "Assigning to %d row subset of %d rows\n"
msgstr ""
msgstr "正在为 %d 行(总数为 %d 行)进行赋值\n"

#: assign.c:342
#, c-format
msgid "Added %d new column%s initialized with all-NA\n"
msgstr ""
msgstr "添加了 %d 个新列 %s 并全部初始化为 NA\n"

#: assign.c:347
msgid "length(LHS)==0; no columns to delete or assign RHS to."
msgstr ""
msgstr "左手侧长度为0(length(LHS)==0);没有列可供删除或赋值给右手侧(RHS)。"

#: assign.c:361
msgid ""
"set() on a data.frame is for changing existing columns, not adding new ones. "
"Please use a data.table for that. data.table's are over-allocated and don't "
"shallow copy."
msgstr ""
"数据框(data.frame)的 set() 是用于修改现有列,而非添加新列。"
"请使用 data.table 来添加新列。data.table 的操作是超额分配的(over-allocated)并且不"
"进行浅拷贝(shallow copy)。"
Comment thread
MichaelChirico marked this conversation as resolved.

#: assign.c:372
msgid ""
"Coerced j from numeric to integer. Please pass integer for efficiency; e.g., "
"2L rather than 2"
msgstr ""
"将 j 从数值(numeric)型自动转换为整(integer)型。为了保持高效请直接传入整型,如"
"2L 而非 2"

#: assign.c:375
#, c-format
msgid ""
"j is type '%s'. Must be integer, character, or numeric is coerced with "
"warning."
msgstr ""
"j 为 '%s' 型。j 必须为整(integer)型、字符(character)型,或数值(numeric)型(将被自动转换成整型"
"并发出警告)。"

#: assign.c:377
msgid ""
"Can't assign to the same column twice in the same query (duplicates "
"detected)."
msgstr ""
"在一次查询中无法对同一列赋值两次(检测出
重复项)。"

#: assign.c:378
msgid "newcolnames is supplied but isn't a character vector"
msgstr ""
msgstr "指定了 newcolnames 但其并非一字符串向量"

#: assign.c:380
#, c-format
msgid "RHS_list_of_columns == %s\n"
msgstr ""
msgstr "RHS_list_of_columns == %s\n"

#: assign.c:385
#, c-format
msgid ""
"RHS_list_of_columns revised to true because RHS list has 1 item which is "
"NULL, or whose length %d is either 1 or targetlen (%d). Please unwrap RHS.\n"
msgstr ""
"RHS_list_of_columns 改为真(True),因为右手侧列表(RHS list)有一子项"
"为空值(NULL)或长度 %d 为 1 或 targetlen(%d)。请拆开右手侧。\n"

#: assign.c:390
#, c-format
Expand All @@ -241,17 +255,21 @@ msgid ""
"table or data.frame since they are lists too). To delete multiple columns "
"use NULL instead. To add multiple empty list columns, use list(list())."
msgstr ""
"试图将 %d 列赋值为空列表(可能为空数据、"
"表(table)或数据框(data.frame),因后两者也是列表的一种)。删除多个列时"
"请使用空值(NULL)。添加多个空列表列(list columns)时,请使用 list(list())。"

#: assign.c:395
#, c-format
msgid "Recycling single RHS list item across %d columns. Please unwrap RHS.\n"
msgstr ""
msgstr "回收重用(Recycling)单个右手侧(RHS)列表子项于 %d 列。请拆开右手侧。\n"

#: assign.c:397
#, c-format
msgid ""
"Supplied %d columns to be assigned %d items. Please see NEWS for v1.12.2."
msgstr ""
"试图将 %2$d 项赋值给 %1$d 列。请阅读 v1.12.2 的更新信息(NEWS)。"

#: assign.c:405
#, c-format
Expand All @@ -260,17 +278,22 @@ msgid ""
"set() on a data.frame is for changing existing columns, not adding new ones. "
"Please use a data.table for that."
msgstr ""
"j 中的列编号里第 %d 项是 %d,超出了有效范围 [1,ncol=%d]。"
"数据框(data.frame)的 set() 是用于修改现有列,而非添加新列。"
"请使用 data.table 来添加新列。"

#: assign.c:406
#, c-format
msgid ""
"Item %d of column numbers in j is %d which is outside range [1,ncol=%d]. Use "
"column names instead in j to add new columns."
msgstr ""
"j 中的列编号里第 %d 项是 %d,超出了有效范围 [1,ncol=%d]。请在 j 中使用"
"列名来添加新列。"

#: assign.c:411
msgid "When deleting columns, i should not be provided"
msgstr ""
msgstr "当删除列时,不应指定 i"

#: assign.c:417
#, c-format
Expand All @@ -282,29 +305,38 @@ msgid ""
"full length RHS vector such as vector('list',nrow(DT)); i.e., 'plonk' in the "
"new column."
msgstr ""
"对已有列 '%s' 的赋值其右手侧(RHS)长度为零但并非空值(NULL)。如果"
"想要删除列请使用空值(NULL)。否则,右手侧必须"
"长度 > 0,如 NA_integer_。如果想将该列类型修改为"
"空列表列(list column),正如所有修改列类型的操作一样,请在右手侧提供一个"
"与该列原数据等长的向量,如 vector('list',nrow(DT)),即,用新数据替换(plonk)重新生成"
"该列。"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对已有列 '%s' 的赋值其右手侧(RHS)长度为零但并非空值(NULL)
...
如 vector('list',nrow(DT)); 也即用替代品生成新列。

plonk means cheap wine? I think it means generic and fake here but we cannot use too negative words.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different definition of plonk 😅

set down heavily or carelessly.
"she plonked her glass on the table"
sit down heavily and without ceremony.
"he plonked himself down on the sofa"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get a little bit confused here. Despite the final translation of word plonk, plonk in the new column refers to the action of recreating the same column, let’s say col, using set(DT, NULL, 'col', value), or creating a new column with different name than col using set(DT, NULL, 'newcol', value). I think it refers to the first one. If so, the new column is new because the contents in that column is new. That’s why I use 用新数据替换重新生成该列. Because from the user’s view, no new column is created but the existing column is replaced by a list of empty lists.

Any insights? @dracodoc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about plonk meaning now. Previously I thought that means using an empty but similar structured copy to replace, now I'm not sure. For the intention I agree with you it's using new data to replace existing ones.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattdowle maybe we should add an FAQ about the meaning of plonk 😅

maybe these videos can be a good definition:

https://www.youtube.com/watch?v=zoaGwyYH3as

https://www.youtube.com/watch?v=anJugOiu1jU

#: assign.c:422
#, c-format
msgid ""
"Internal error in assign.c: length(newcolnames)=%d, length(names)=%d, coln=%d"
msgstr ""
"assign.c 内部错误:length(newcolnames)=%d, length(names)=%d, coln=%d"

#: assign.c:424
#, c-format
msgid "Column '%s' does not exist to remove"
msgstr ""
msgstr "要删除的列 '%s' 不存在"

#: assign.c:430
#, c-format
msgid "%d column matrix RHS of := will be treated as one vector"
msgstr ""
msgstr "':=' 右手侧(RHS)%d 列矩阵将被视为一维向量"

#: assign.c:434
#, c-format
msgid ""
"Can't assign to column '%s' (type 'factor') a value of type '%s' (not "
"character, factor, integer or numeric)"
msgstr ""
"无法给因子(factor)类型列 '%s' 赋类型为 '%s' 的值(不是"
"字符(character)、因子(factor)、整数(integer)或数值(numeric)类中的一种)"

Comment thread
MichaelChirico marked this conversation as resolved.
#: assign.c:439
#, c-format
Expand All @@ -313,6 +345,9 @@ msgid ""
"'recycle' the RHS please use rep() to make this intent clear to readers of "
"your code."
msgstr ""
"试图将 %d 项赋值给 %d 项(列 '%s')。如果想"
"'回收重用'('recycle')右手侧,请使用 rep() 以将该意图清晰地表述给阅读"
"代码的人。"
Comment thread
MichaelChirico marked this conversation as resolved.

#: assign.c:449
msgid ""
Expand All @@ -321,6 +356,10 @@ msgid ""
"or setalloccol() on it first (to pre-allocate space for new columns) before "
"assigning by reference to it."
msgstr ""
"该 data.table 为从磁盘中载入(如使用 readRDS()/"
"load())或手动创建(如使用 structure())。请首先对其运行 setDT() "
"或 setalloccol() (以为新列预分配内存空间),然后再进行"
"引用赋值(assigning by reference)操作。"

#: assign.c:450
#, c-format
Expand Down