Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translate AVA docs to zh_CN #17

Closed
wants to merge 8 commits into from
Closed

Conversation

zhaozhiming
Copy link
Contributor

HI,
I like AVA and I want to translate the docs of AVA to Chinese, which will help more Chinese people study and use AVA.
@ALL I have translated all the docs already, please review, thank you very much.

todo list:

  • readme.md
  • contributing.md
  • code-of-conduct.md
  • docs/recipes/browser-testing.md
  • docs/recipes/code-coverage.md
  • docs/recipes/endpoint-testing.md
  • docs/recipes/typescript.md
  • docs/recipes/watch-mode.md
  • docs/recipes/when-to-use-plan.md

@zhaozhiming zhaozhiming changed the title [WIP] translate AVA docs to zh_CN translate AVA docs to zh_CN Mar 20, 2016
@sindresorhus
Copy link
Member

@zhaozhiming Thank you! :) Do you know anyone that could review this?

@zhaozhiming
Copy link
Contributor Author

OK,I invite some Chinese people to review this.

@hayeah
Copy link

hayeah commented Mar 21, 2016

The translation quality is pretty good, didn't see any obvious problem.

My only quibble is that latin letters and Chinese characters should be separated by a space.

While this rule is not written down anywhere, this issue is something of a religious issue. Designers & typography people would strongly recommend a space, while the "commoners" don't care either way. (As far as I know, nobody recommend AGAINST adding a space)

It's enough of a problem that people have written a Chrome plugin to do exactly this.

https://chrome.google.com/webstore/detail/%E7%82%BA%E4%BB%80%E9%BA%BC%E4%BD%A0%E5%80%91%E5%B0%B1%E6%98%AF%E4%B8%8D%E8%83%BD%E5%8A%A0%E5%80%8B%E7%A9%BA%E6%A0%BC%E5%91%A2%EF%BC%9F/paphcfdffjnbcgkokihcdjliihicmbpd

@hayeah
Copy link

hayeah commented Mar 21, 2016

@zhaozhiming you can probably use this script to add the spaces

"use strict";

const XRegExp = require("XRegExp");

const str = "Mocha要求你使用隐式全局变量比如`describe`和`it`作为其默认接口";

const cn_latin_regex = XRegExp('(\\p{Latin})(\\p{Han})');
console.log(cn_latin_regex.test(str)) ;

const str2 = XRegExp.replace(str, cn_latin_regex,(m, m1, m2) => {
  return `${m1} ${m2}`;
});

console.log(str2);

@ruanyf
Copy link

ruanyf commented Mar 21, 2016

@sindresorhus I reviewed the translation, and think it acceptable.

@zhaozhiming
Copy link
Contributor Author

@hayeah Great solution! I use it to replace the text, but have a little change with XRegExp('(\\p{Latin})(\\p{Han}, 'g')', add g will replace all the match text.

@ruanyf Thank you for review. You're so nice. 👍

@sindresorhus Review is done, please continue, thank you.

@forresst
Copy link
Collaborator

@zhaozhiming Awesome !
I'll watch your work today, I will do a technical review because I'm french and I do not speak Chinese (I've seen incorrect link)
Thank you already for this great work!

___
**备注**

这是[code-of-coduct.md](https://github.com/sindresorhus/ava/blob/master/code-of-coduct.md)的简体中文翻译。这个[链接](https://github.com/sindresorhus/ava/compare/master...zhaozhiming:master)用来查看本翻译与AVA 的master 分支是否有差别(如果你没有看到`code-of-coduct.md`发生变化,那就意味着这份翻译文档是最新的)。
Copy link
Collaborator

Choose a reason for hiding this comment

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

Bad link replace:
https://github.com/sindresorhus/ava/compare/master...zhaozhiming:master
by:
https://github.com/sindresorhus/ava/compare/89767ec3b6174e59d37faaadb50cfa3c0d58bda6...master#diff-d3030a18b089fdb1fbfabf6e75e4aef0

___
**备注**

这是[typescript.md](https://github.com/sindresorhus/ava/blob/master/docs/recipes/typescript.md)的简体中文翻译。这个[链接](https://github.com/sindresorhus/ava/compare/master...zhaozhiming:master)用来查看本翻译与AVA 的master 分支是否有差别(如果你没有看到`typescript.md`发生变化,那就意味着这份翻译文档是最新的)。
Copy link
Collaborator

Choose a reason for hiding this comment

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

Bad link replace:
https://github.com/sindresorhus/ava/compare/master...zhaozhiming:master
By:
https://github.com/sindresorhus/ava/compare/8e2f3dca177a4283ad882596d3c1425cabb998ef...master#diff-60cce07a584082115d230f2e3d571ad6

@forresst
Copy link
Collaborator

@zhaozhiming Except my remarks for the links, It's beautiful work! Thank you

@zhaozhiming
Copy link
Contributor Author

@forresst Thank you for your great work, your review is so carefully. I change the remark now, please review continue, thanks.

The reason of I used the link like ../../readme.md#cli is because the link https://github.com/sindresorhus/ava-docs/blob/master/zh_CN/readme.md#cli is not work before merge my pull request. However, I change the link to the latter now.

By the way, could you teach me how to generate the branch compare link? That I can generate them next time. Thank you.

@forresst
Copy link
Collaborator

The reason of I used the link like ../../readme.md#cli is because the link https://github.com/sindresorhus/ava-docs/blob/master/zh_CN/readme.md#cli is not work before merge my pull request. However, I change the link to the latter now.

@zhaozhiming No worries, I understand.

By the way, could you teach me how to generate the branch compare link? That I can generate them next time. Thank you.

An example for readme.md file, the link is, in your translated file : https://github.com/sindresorhus/ava/compare/67bf0472133041f59ef469f737b696de05ae316b...master#diff-0730bb7c2e8f9ea2438b52e419dd86c9

  • 67bf0472133041f59ef469f737b696de05ae316b is the last commit translated (avajs/ava@67bf047)
  • 0730bb7c2e8f9ea2438b52e419dd86c9 is the readme.md file sha (this value does not change)

@zhaozhiming
Copy link
Contributor Author

@forresst OK, thank you very much. 👍

@forresst
Copy link
Collaborator

LGTM for me.
@sindresorhus good for you ?

@zhaozhiming
Copy link
Contributor Author

@sindresorhus Is there any other problems?

@sindresorhus
Copy link
Member

@zhaozhiming Thank you! This is great. Added you to the repo. Feel free to just commit and push changes directly ;)

And thanks for reviewing @forresst :)

@vadimdemedes
Copy link

@zhaozhiming @forresst Huge thanks, guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants