diff --git a/NEWS.md b/NEWS.md index d1b6b90bcd..c8317153c2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -85,6 +85,16 @@ unit = "s") 2. `set2key`, `set2keyv`, and `key2` have been removed, as they have been warning since v1.9.8 (Nov 2016) and halting with helpful message since v1.11.0 (May 2018). When they were introduced in version 1.9.4 (Oct 2014) they were marked as 'experimental' and quickly superceded by `setindex` and `indices`. +3. `data.table` now supports messaging in simplified Chinese (locale `zh_CN`). This was the result of a monumental collaboration to translate `data.table`'s roughly 1400 warnings, errors, and verbose messages (about 16,000 words/100,000 characters) over the course of two months from volunteer translators in at least 4 time zones, most of whom are first-time `data.table` contributors and many of whom are first-time OSS contributors! + + A big thanks goes out to @fengqifang, @hongyuanjia, @biobai, @zhiiiyang, @Leo-Lee15, @soappp9527, @amy17519, @Zachary-Wu, @caiquanyou, @dracodoc, @JulianYlli12, @renkun-ken, @Xueliang24, @koohoko, @KingdaShi, @gaospecial, @shrektan, @sunshine1126, @shawnchen1996, @yc0802, @HesperusArcher, and @Emberwhirl, all of whom took time from their busy schedules to translate and review others' translations. Especial thanks goes to @zhiiiyang and @hongyuanjia who went above and beyond in helping to push the project over the finish line, and to @GuangchuangYu who helped to organize the volunteer pool. + + `data.table` joins `lubridate` and `nlme` as the only of the top 200 most-downloaded community packages on CRAN to offer non-English messaging, and is the only of the top 50 packages to offer complete support of all messaging. We hope this is a first step in broadening the reach and accessibility of the R ecosystem to more users globally and look forward to working with other maintainers looking to bolster the portability of their packages by offering advice on learnings from this undertaking. + + We would be remiss not to mention the laudable lengths to which the R core team goes to maintain the _much_ larger repository (about 6,000 messages in more than 10 languages) of translations for R itself. + + We will evaluate the feasibility (in terms of maintenance difficulty and CRAN package size limits) of offering support for other languages in later releases. + # data.table [v1.12.8](https://github.com/Rdatatable/data.table/milestone/15?closed=1) (09 Dec 2019) diff --git a/R/onAttach.R b/R/onAttach.R index d0c535d65c..57007b417c 100644 --- a/R/onAttach.R +++ b/R/onAttach.R @@ -21,7 +21,7 @@ packageStartupMessage("data.table ", v, if(dev)paste0(" IN DEVELOPMENT built ",d,g), " using ", getDTthreads(verbose=FALSE), " threads (see ?getDTthreads). Latest news: r-datatable.com") if (gettext("TRANSLATION CHECK", domain='R-data.table') != "TRANSLATION CHECK") - packageStartupMessage(gettext("**********\n", "Running data.table in English; package support is available in English only. When searching for online help, be sure to also check for the English error message. This can be obtained by looking at the po/R-.po and po/.po files in the package source, where the native language and English error messages can be found side-by-side")) + packageStartupMessage(gettext("**********\nRunning data.table in English; package support is available in English only. When searching for online help, be sure to also check for the English error message. This can be obtained by looking at the po/R-.po and po/.po files in the package source, where the native language and English error messages can be found side-by-side\n**********", domain="R-data.table")) if (dev && (Sys.Date() - as.Date(d))>28L) packageStartupMessage("**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update.dev.pkg()\n**********") if (!.Call(ChasOpenMP)) 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 e52bcf8faf..76d9bd3c92 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/zh_CN/LC_MESSAGES/R-data.table.mo b/inst/po/zh_CN/LC_MESSAGES/R-data.table.mo index 6e524b3588..d2d4205142 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/po/R-data.table.pot b/po/R-data.table.pot index 10a5b19d45..9e93031c9d 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-29 22:35\n" +"POT-Creation-Date: 2019-12-31 13:02\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1378,10 +1378,7 @@ msgstr "" msgid "TRANSLATION CHECK" msgstr "" -msgid "**********" -msgstr "" - -msgid "Running data.table in English; package support is available in English only. When searching for online help, be sure to also check for the English error message. This can be obtained by looking at the po/R-.po and po/.po files in the package source, where the native language and English error messages can be found side-by-side" +msgid "**********\nRunning data.table in English; package support is available in English only. When searching for online help, be sure to also check for the English error message. This can be obtained by looking at the po/R-.po and po/.po files in the package source, where the native language and English error messages can be found side-by-side\n**********" msgstr "" msgid "**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update.dev.pkg()\n**********" @@ -1558,7 +1555,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 %d rows which exceeds .Machine$integer.max == %d" +msgid "Cross product of elements provided to CJ() would result in %.0f rows which exceeds .Machine$integer.max == %d" msgstr "" msgid "x and y must both be data.tables" diff --git a/po/R-zh_CN.po b/po/R-zh_CN.po index e74646eb14..9411e50fd2 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-29 22:35\n" +"POT-Creation-Date: 2019-12-31 13:02\n" "PO-Revision-Date: 2019-11-16 18:37+0800\n" "Last-Translator: Xianying Tan \n" "Language-Team: Mandarin\n" @@ -545,7 +545,9 @@ 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 "在'by'或'keyby'列表中的项长度为 %s。每一项的长度须均为%d,即应与 x (或经 i 筛选后的子集)中所包含行数相同。" +msgstr "" +"在'by'或'keyby'列表中的项长度为 %s。每一项的长度须均为%d,即应与 x (或经 i " +"筛选后的子集)中所包含行数相同。" msgid "Internal error: drop_dot passed" msgstr "内部错误:drop_dot 传入的参数有" @@ -556,7 +558,8 @@ 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:" +msgid "" +"Different branches of j expression produced different auto-named columns:" msgstr "j表达式中的不同分支自动生成的列名不同:" msgid "%s!=%s" @@ -565,8 +568,13 @@ msgstr "%s!=%s" msgid "; using the most \"last\" names" 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 "" +"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 ".SDcols 的如下位置为缺失值:" @@ -1152,22 +1160,38 @@ msgstr "' 作为 value 列。可使用 'value.var' 修改" msgid "The dcast generic in data.table has been passed a" 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 ",但目前 data.table::dcast 仅提供了针对 data.table 的方法。您可通过如下两种方法确保您的输入为一个 data.table对象,即setDT(" +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 ") 或 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 ")。若您想使用reshape2::dcast,尝试先安装reshape2。但请注意reshape2已经不推荐使用,您应修改您的代码以不再使用它。" +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 ",将尝试重定向到reshape2::dcast。请注意reshape2已经不推荐使用,故该重定向目前也不推荐使用。请手动执行该重定向,如reshape2::dcast(" +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 ")。在下一个版本中,此警告将变成为错误。" -msgid "Invalid formula. Cast formula should be of the form LHS ~ RHS, for e.g., a + b ~ c." +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" @@ -1179,8 +1203,12 @@ msgstr "value.var 的值 [" msgid "] are not found in 'data'." 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 "当 'fun.aggregate' 和 'value.var' 同为 list时, 'value.var' 的长度必须为 1 或 length(fun.aggregate)。" +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 "'data' 必须为 data.table" @@ -1778,7 +1806,9 @@ msgid "" "Using integer64 class columns require to have 'bit64' package installed." msgstr "要在列中使用 integer64 类,需要先安装 'bit64' 包。" -msgid "'xts' class passed to %s 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 "'xts'类对象传递给了%s方程,但是'xts'包不可用。您应首先安装'xts'包" msgid "Argument 'sort' should be logical TRUE/FALSE" @@ -1841,19 +1871,20 @@ msgstr "线程(请参阅?getDTthreads)。最新的消息:r-datatable.com" msgid "TRANSLATION CHECK" msgstr "翻译检查" -msgid "**********" -msgstr "**********" - msgid "" +"**********\n" "Running data.table in English; package support is available in English only. " "When searching for online help, be sure to also check for the English error " "message. This can be obtained by looking at the po/R-.po and po/" ".po files in the package source, where the native language and " -"English error messages can be found side-by-side" +"English error messages can be found side-by-side\n" +"**********" msgstr "" -"用英语运行data.table。软件包只提供英语支持。当在在线搜索帮助时,也要确保检查" -"英语错误信息。这个可以通过查看软件包源文件中的po/R-.po和po/." -"po文件获得,这个文件可以并排找到母语和英语错误信息。" +"**********\n" +"用中文运行data.table。软件包只提供英语支持。当在在线搜索帮助时,也要确保检查" +"英语错误信息。这个可以通过查看软件包源文件中的po/R-zh_CN.po和po/zh_CN.po文件" +"获得,这个文件可以并排找到母语和英语错误信息。\n" +"**********" msgid "" "**********\n" @@ -2084,13 +2115,23 @@ msgstr "" 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 "输入一个并非双精度类型的向量。目前新的并行排序方法仅可应用于双精确度向量。将使用单线程进行计算" +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 decreasing=TRUE so far. Using one thread." -msgstr "目前新的并行排序方法尚无法在decreasing=TRUE的条件下使用。将使用单线程进行计算。" +msgid "" +"New parallel sort has not been implemented for decreasing=TRUE so far. Using " +"one thread." +msgstr "" +"目前新的并行排序方法尚无法在decreasing=TRUE的条件下使用。将使用单线程进行计" +"算。" -msgid "New parallel sort has not been implemented for vectors containing NA values so far. Using one thread." +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" @@ -2099,11 +2140,16 @@ msgstr "x 必须为 data.frame 或 data.table" msgid "na.last must be logical TRUE/FALSE" msgstr "na.last 必须为逻辑 TRUE/FALSE" -msgid "cols is not a character vector. Please see further information in ?setorder." +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 "cols为一长度为零的字符向量。请使用NULL代替,或将本函数使用suppressWarnings()包裹以阻止该警告。" +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 "',该类型目前尚不支持排序。" @@ -2114,8 +2160,10 @@ msgstr "'sorted' 为 TRUE 但元素" msgid "is non-atomic, which can't be sorted; try setting sorted = FALSE" msgstr "并非原子类型,无法排序。请尝试使用 sorted=FALSE" -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 "" +"Cross product of elements provided to CJ() would result in %.0f rows which " +"exceeds .Machine$integer.max == %d" +msgstr "CJ()中元素的叉积将产生 %.0f 行,已超过 .Machine$integer.max == %d" msgid "x and y must both be data.tables" msgstr "x 和 y 均需为 data.table"