Skip to content

Finish translation to zh_CN assigned to group 2 (Hongyuan Jia)#3986

Merged
MichaelChirico merged 3 commits intoRdatatable:translationfrom
hongyuanjia:translation-hongyuanjia
Oct 29, 2019
Merged

Finish translation to zh_CN assigned to group 2 (Hongyuan Jia)#3986
MichaelChirico merged 3 commits intoRdatatable:translationfrom
hongyuanjia:translation-hongyuanjia

Conversation

@hongyuanjia
Copy link
Copy Markdown
Contributor

Pull request overview

  • This pull request contains translation assigned to group 2(@hongyuanjia). Specifically:
    • L89-169 in po/R-zh_CN/po. 25 messages in total.
    • L170-311 in po/zh_CN.po. 24 messages in total.

@MichaelChirico
Copy link
Copy Markdown
Member

Awesome! Please review @dracodoc

Copy link
Copy Markdown
Contributor

@dracodoc dracodoc left a comment

Choose a reason for hiding this comment

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

I think most translations are great and very carefully made. I added some minor comments, and there are some common words may need more discussion and vote to have a mostly accepted option.

Below is the comments for 1st file. I'll add the discussions about some common words to slack channel and the dictionary notes.

Comment thread po/R-zh_CN.po
Comment thread po/R-zh_CN.po Outdated
msgid ""
"Not yet implemented NAbounds=TRUE for this non-numeric and non-character type"
msgstr ""
"将 NAbounds=TRUE 应用于非数值(numeric)型和非字符串(character)型的功能尚未开发"
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.

Just trying to rearrange the sentence to avoid the too heavy subject, and character better translate to 字符 instead of 字符串 since R don't really have string concept in other languages.
对这种非数值(numeric)和非字符(character)的类型尚未实现NAbounds=TRUE的功能。

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.

Nice catch. Agree.

Comment thread po/R-zh_CN.po Outdated

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

minor adjustment similar to line 136
对于该非数值(numeric)和非字符(character)类型的输入,存在一部分下界(lower)> 上界(upper)的情况

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.

Agree.

Comment thread po/R-zh_CN.po Outdated

msgid "Perhaps you meant %s?"
msgstr ""
msgstr "或许你指的是 %s?"
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?

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.

Better.

Comment thread po/R-zh_CN.po Outdated

msgid "which is not supported by data.table join"
msgstr ""
msgstr ",该类型无法用于 data.table 的联结"
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.

It's difficult to translate such a simple and common word join. I found the most common translation is 连接 which is not really best. 联结 is better, another option is 联接. Many Chinese documentations actually just use join since it's a very simple word.

In any case, I think we should include the original word with (join). As for which word to use, I vote for 联接, but 连接 is acceptable if it's already established (but it's the worst in 3 options).

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.

I'm quite surprised join nor merg really show up anywhere in the base translation files 😳 so we don't really have any canon to refer to within R...

FWIW, Chinese Wikipedia is actually using 连接 for SQL join:

https://zh.wikipedia.org/wiki/%E8%BF%9E%E6%8E%A5

Copy link
Copy Markdown
Contributor

@dracodoc dracodoc Oct 22, 2019

Choose a reason for hiding this comment

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

Yes 连接 is a common translation in literature but I think that was a bad example. It only have the meaning of linking, I would think it just means you cbind two things together and don't have the part of matching values, which both 联结 and 联接 provided.

Between 联结 and 联接, 联结 is hinting a strong binding that hard to break, more like the ending state, 联接 have the process of connecting two things together so I think it's better.

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.

In that sense, maybe 连接 is closer to join, which also doesn't have any "intrinsic" sense of matching to me; merge gets closer to that.

That said, probably 联接 is preferred since it's more important for users to understand the meaning rather than to match the English. In English, I know we are implicitly bootstrapping on users' understanding of joins in the relational database sense which is well known. I leave it up to you to know how well-known the different usages are :)

Comment thread po/R-zh_CN.po Outdated

msgid "Attempting roll join on factor column when joining x."
msgstr ""
msgstr "试图针对数据类型为因子(factor)的列使用滚动联结(roll join),发生在将 x."
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.

试图滚动联接(roll join)因子类型(factor)的列,这发生于将 x.

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.

Agree.

Comment thread po/R-zh_CN.po Outdated

msgid ". Only integer, double or character columns may be roll joined."
msgstr ""
msgstr "联结时。仅整(integer)型、数值(double)型或字符串(character)型可用于滚动联结(roll join)。"
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.

联接时。但只有整数(integer)、双精度(double)或字符(character)类型的列可以使用滚动联接(roll join)。

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.

Nice review.

Comment thread po/R-zh_CN.po
Comment thread po/R-zh_CN.po
Copy link
Copy Markdown
Contributor

@dracodoc dracodoc left a comment

Choose a reason for hiding this comment

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

Some of the comments are repeat cases of previously mentioned, I noted some but didn't note all of them (字符/字符串,自动转换/强制转换).

Thanks for the great work!

Comment thread po/zh_CN.po Outdated
"loop if possible for efficiency."
msgstr ""
"i 为 '%s' 类型。i 必须为整(integer)型,或数值(numeric)型(将被强制转换成整型并发出警告)。如果 i 为"
"一逻辑向量(logical)的子集,请直接将它传给 which(),且如果可能的话将 which() 放置于"
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 guessing here since I don't really know the context. I think logical subset means a logical vector with same length of another vector, but have a subset values as TRUE. This is commonly used in R for subset/filtering, but we should not call it a subset of a logical vector which means different thing.

To translate this concisely is hard, my attempt is 一个用于筛选的逻辑(logical)向量.

Also 保持效率 can be 保持高效.

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.

I think this would mainly come up for something like

iris = as.data.table(iris)
set(iris, rep(TRUE, nrow(iris)), 'new_col', rep(5L, nrow(iris)))

This should be replaced by

set(iris, which(rep(TRUE, nrow(iris))), 'new_col', rep(5L, nrow(iris)))

The latter part of the message refers to if set is being used in a loop:

for (jj in 1:100) set(iris, which(rep(TRUE, nrow(iris))), sprintf("V%d", jj), rnorm(nrow(iris)))

Will be more efficient with:

idx <- which(rep(TRUE, nrow(iris)))
for (jj in 1:100) set(iris, idx, sprintf("V%d", jj), rnorm(nrow(iris)))

Since we don't have to run which every iteration.

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.

Previously I thought this message came from cases when input of i is not the same length of nrow(dt) but shorter, and which(i) will change it into a row index to make set work. So a logical subet would mean a subset of a longer logical vector .

Now I know the full context. Thanks.

一个用于筛选的逻辑(logical)向量 is definitely a better and more precise one.

Comment thread po/zh_CN.po Outdated
#: assign.c:347
msgid "length(LHS)==0; no columns to delete or assign RHS to."
msgstr ""
msgstr "length(LHS)==0;未删除任何列或将右手侧(RHS)赋值给任何列。"
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.

左手侧长度为0(length(LHS)==0);没有列可供删除或赋值给右手侧(RHS)。

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.

This one bothered me a lot. Did not find a concise way to translate no columns to delete. Very beautiful translation!

Comment thread po/zh_CN.po
Comment thread po/zh_CN.po Outdated
"Coerced j from numeric to integer. Please pass integer for efficiency; e.g., "
"2L rather than 2"
msgstr ""
"将 j 从数值(numeric)型强制转换为整(integer)型。为了保持效率请直接传入整型,如"
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.

自动转换

Comment thread po/zh_CN.po Outdated
"j is type '%s'. Must be integer, character, or numeric is coerced with "
"warning."
msgstr ""
"j 为 '%s' 型。j 必须为整(integer)型、字符串(character)型、或数值(numeric)型(将被强制转换成整型"
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.

自动转换,字符

Comment thread po/zh_CN.po Outdated
Comment thread po/zh_CN.po
Comment thread po/zh_CN.po Outdated
Comment thread po/zh_CN.po Outdated
Comment thread po/zh_CN.po
@MichaelChirico
Copy link
Copy Markdown
Member

hey @hongyuanjia please push the updates requested when you get a chance :) then I can merge

@hongyuanjia
Copy link
Copy Markdown
Contributor Author

@MichaelChirico @dracodoc I have resolved all review comments expect the plonk part which is left as my first commit. Please review and comments if there are still issues. Thanks.

@MichaelChirico
Copy link
Copy Markdown
Member

LGTM! @dracodoc any last comments?

@dracodoc
Copy link
Copy Markdown
Contributor

LGTM too! Thanks!

@MichaelChirico MichaelChirico merged commit 7be31d7 into Rdatatable:translation Oct 29, 2019
@hongyuanjia
Copy link
Copy Markdown
Contributor Author

Super excited! Thanks @MichaelChirico @dracodoc

@MichaelChirico MichaelChirico added the translation issues/PRs related to message translation projects label Oct 29, 2019
MichaelChirico pushed a commit that referenced this pull request Nov 6, 2019
* readme link examples, rm old link to a talk (#4001)

* Homepage additions (#4006)

* pkgdown, keep manual tab, link cranlike page, minor rename (#4008)

* fix Rd warnings (#4011)

* use Rdevel for revdeps due to bioc-devel (3.11) now needing R 4+

* (hopefully) apply encoding fix & check compilation

* improve internal error & regenerate messages

* Finish translation to zh_CN assigned to group 2 (Hongyuan Jia) (#3986)

* Finish translation.

* Resolve review comments.

* balance quotes

* extra nocov

* some coverage of fmelt

* complete coverage of fmelt

* fix test error

* update message per DeLuns feedback

* update message again; some minor tweaks to nearby code

* translatation completed

* fixed somme message 1
mattdowle pushed a commit that referenced this pull request Dec 31, 2019
* initial exploration of adding a chinese translation of messages

working version of chinese translation

* adding another .mo file that was untracked

* trying to get the .pot for src/ files

* adding warning()s from C

* C messages with DTPRINT or Rprintf

* adding STOP messages

* DTWARN messages

* Error in forder

* odds&ends more messages

* cannot use _() with \r

* update .pot for src files

* moving pot file to po/

* update header metadata for src .pot

* run update_pkg_po on the src to get mo files

* update_pkg_po after merge

* add template message in onAttach() & clear typos/PYDT issue along the way

* remove some strings

* improve arg checking&message in groupingsets; add some messages

* get tests working (fix some bad quotes, adjust to new messages)

* update po with latest message edits

* Finished the translation assigned to Chun-Hui Gao (#3983)

* Finished the translation of line 3058-3231 in po/zh_CN.po. Totally 34 messages.

* Finished the translation assigned to Chun-Hui Gao in R-zh_cn.po.

Lines 1500-1598 in original R-zh_CN.po. Totally 26 messages.

* Resolved reviewer's comments.

* Resolved reviewer's comments.

* (hopefully) apply encoding fix & check compilation

* improve internal error & regenerate messages

* Finish translation to zh_CN assigned to group 2 (Hongyuan Jia) (#3986)

* Finish translation.

* Resolve review comments.

* balance quotes

* extra nocov

* some coverage of fmelt

* complete coverage of fmelt

* fix test error

* update message per DeLuns feedback

* update message again; some minor tweaks to nearby code

* Translation to zh_CN assigned to group 3 (#3985)

* translate assigned to group 3

* translate assigned to group 3

* translate assigned to group 3

* remove merge conflict vestiges

* remove merge conflict vestiges

* plonk

* update translation

* minor update

* added new message caught by xianghui

* Translation haogao gu (#4002)

* R-zh_CN_2019-10-26

* 10-26

* restore previous

* updated with feedback

* regenerate with small fix

* regenerate .mo files

* Translation finished (soappp) (#4023)

* readme link examples, rm old link to a talk (#4001)

* Homepage additions (#4006)

* pkgdown, keep manual tab, link cranlike page, minor rename (#4008)

* fix Rd warnings (#4011)

* use Rdevel for revdeps due to bioc-devel (3.11) now needing R 4+

* (hopefully) apply encoding fix & check compilation

* improve internal error & regenerate messages

* Finish translation to zh_CN assigned to group 2 (Hongyuan Jia) (#3986)

* Finish translation.

* Resolve review comments.

* balance quotes

* extra nocov

* some coverage of fmelt

* complete coverage of fmelt

* fix test error

* update message per DeLuns feedback

* update message again; some minor tweaks to nearby code

* translatation completed

* fixed somme message 1

* fix format tags for two translations

* done some translation!

* Finish translation to zh_CN assigned to group 5 (Leo Lee) (#3995)

* chinese translation by Leo

* Update R-zh_CN.po

fix a typo

* Update zh_CN.po

* add missing quotes

* number out-of-order format strings

* apply numbering to formatters

* Update R-zh_CN.po & Change author

* Fix the problems of missing %d in zh_CN.po & Polish translation

* Translation dracodoc (#4034)

* 895 - 939

* 945 - 1007

* To the real 1007 line msg

* convert enconding from GBK to UTF-8

* Revert "convert enconding from GBK to UTF-8"

This reverts commit 6e65d0e.

* translate start and end of assigned msgs.

* till 1899

* two entries then found possible problem of missing messages

* 10 missing message not captured?

* till 1962

* finished assignment

* review and edit

* update meta info

* macro-within-macro removed

* syntax error -- split ternary operator

* roll back use of translation in ASSERT internal errors

* Update according to @shrektan's comments

* re-run update_pkg_po

* update binaries

* Translation caiquanyou (#4039)

* finish translation

* Update R-zh_CN.po

* Update zh_CN.po

* update mo files

* translation(partial) into zh_CN by Yuanchen Xie (#4010)

* translation(partial) into zh_CN by Yuanchen Xie

* Add new translation results, based on messages

* update mo file

* update transitions as renkun-ken's suggestions

* update binary mo

* update vs recent master

* Translation to zh_CN - Group 7 (#4019)

* translate R msgs

* src error messages

* missing quote

* missing quote

* remove extra quote

* fix-up of merge

* update po after merge

* update fuzzy translations

* update mistaken PRIu64->PRId64

* caught a few more failed merges

* line # update

* rerun update_pkg_po

* Translation shawn (#4050)

* done some translation!

* done some translation!

* done some translation

* revised the translation

* small tweak

* Translation yilei (#3989)

* messsage

* messsage

* messsage

* messsage

* messsage

* done some translation!

* done it.

* updating some small misses from last pull

* Translation to zh_CN assigned to group 12 (#3987)

* Update translations

* Minor refine

* Minor reformatting

* no longer using %llu, other small tidying

* Translation fengqifang (#3990)

* First version, finished all message

* 2nd one, multiple lines of msgstr

* 3rd, finished

* zh_CN.po 1st

* after zh_CN.po reviewed

* fix encoding issue

* manually editing per GH UI submission

* run update_pkg_po on new merge

* done some translation (#4069)

* done some translation

* do some revisions

* touch-up

* Translation to zh_CN assigned to group 4 (#3997)

* finish R-zh_CN.po

* finish zh_CN.po

* finalize two files

* change author

* make the package

* finalize the messages

* change the format of numbering

* install the pacakge

* delete excessive src folders

* manually revert coding issues

(open to a better solution... `iconv(bad_str, from = 'GBK'|'GB18030', to = 'UTF-8')` both returned something gibberish-y.

* update mo files

* update .mo

* add in suggestions from gaospecial

* update mo

* My part of translation has been completed. It's so happy! (#4051)

* messsage

* Update R-zh_CN.po

* Update R-zh_CN.po

* Update zh_CN.po

* some revisions due to foreign char, touch-up, remove fuzzy

* Translation yuliang li (#4055)

* completed yuliang's translation

* yuliang's work

* Update zh_CN.po

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

* tweaks for syntax mistakes

* Translation to zh_CN - Group 17 (#4049)

* finish the Chinese message translation for group 17

* change as KingdaShi suggests

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

* update mo, fix missing field

* Translation yc0802 (#4054)

* message

* message

* added hongyuans review

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

* adding "leftover" translations (#4143)

* done some translation!-kingda (#4046)

* done some translation!

* done some translation

* messsage

* messsage

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

* Translation leftover pt2 (#4146)

* covering trivial translations from among the leftovers

* progress on paring down leftover translations

* completed translations!!!

* adjustments

* missing dot

* add note for proceeding to CRAN_Relase

* %f needed for > integer max

Co-authored-by: Chun-Hui Gao <gaospecial@gmail.com>
Co-authored-by: Hongyuan Jia <hongyuan.jia@bears-berkeley.sg>
Co-authored-by: biobai <biobai@zju.edu.cn>
Co-authored-by: Koohoko <koohoko@gmail.com>
Co-authored-by: soappp <soappp9527@gmail.com>
Co-authored-by: KingdaShi <50854702+KingdaShi@users.noreply.github.com>
Co-authored-by: Guangzheng Li <leolee0828@outlook.com>
Co-authored-by: dracodoc <dracodoc@gmail.com>
Co-authored-by: caiquanyou <48861819+caiquanyou@users.noreply.github.com>
Co-authored-by: Yuanchen Xie <yuanchen.gm@gmail.com>
Co-authored-by: Amy Tzu-Yu Chen <amy17519@gmail.com>
Co-authored-by: ShawnChen1996 <shawnchen1996@outlook.com>
Co-authored-by: Yilei <30611492+Zachary-Wu@users.noreply.github.com>
Co-authored-by: Kun Ren <mail@renkun.me>
Co-authored-by: fengqifang <nclxin@gmail.com>
Co-authored-by: Shayebuhuii <32659317+sunshine1126@users.noreply.github.com>
Co-authored-by: Zhi Yang <zhiyang@usc.edu>
Co-authored-by: Xueliang24 <56901274+Xueliang24@users.noreply.github.com>
Co-authored-by: JulianYlli12 <43525270+JulianYlli12@users.noreply.github.com>
Co-authored-by: Xianying Tan <shrektan@126.com>
Co-authored-by: yc0802 <55459478+yc0802@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

translation issues/PRs related to message translation projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants