From 742a498f13e7efc25bb2eeb640b364a8123b2c52 Mon Sep 17 00:00:00 2001 From: duncup Date: Fri, 2 Sep 2016 14:25:56 +0800 Subject: [PATCH] Create translate docs. --- CONTRIBUTING-zh_CN.md | 74 +++++++++++++++++++++++++++++++++++++++ README-zh_CN.md | 81 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 CONTRIBUTING-zh_CN.md create mode 100644 README-zh_CN.md diff --git a/CONTRIBUTING-zh_CN.md b/CONTRIBUTING-zh_CN.md new file mode 100644 index 0000000000..b77822ca81 --- /dev/null +++ b/CONTRIBUTING-zh_CN.md @@ -0,0 +1,74 @@ +# Electron约定 + +:+1::tada: 首先,感谢抽出时间做出贡献的每一个人。 :tada::+1: + +这个项目将坚持贡献者盟约 [code of conduct](CODE_OF_CONDUCT.md). +我们希望贡献者能遵守贡献者盟约,如果有任何不能接受的行为被发现,请报告至atom@github.com(PS:请用英语) + +下面是一组用于改进Electron的指南。 +这些只是指导方针,而不是规则,做你认为对的事,并随时 +在提出一个pull请求更改该文档。 + +## 提交 Issues + +* 你可以在这里创建一个 issue [here](https://github.com/electron/electron/issues/new), +但在这样做之前请阅读以下注意事项,其中应包含尽可能多的细节。 +如果可以能,请尽量包括: + * Electron版本 + * 使用程序所使用的系统及系统版本 + * 如果适用,请包含:你做什么时发生了所提交的问题,以及你所期待的结果。 +* 其他有助于解决你的 issue 的选项: + * 截图或GIF动画 + * 终端中的错误堆栈 + * 执行 [cursory search](https://github.com/electron/electron/issues?utf8=✓&q=is%3Aissue+) + 查看是否已经存在类似问题。 + +## 提交 Pull Requests + +* 包括在你拉的请求截图和动画GIF只要有可能。 +* 遵循的JavaScript,C ++和Python [coding style defined in docs](/docs/development/coding-style.md). +* 书写对应文档 [Markdown](https://daringfireball.net/projects/markdown). + 请参考 [Documentation Styleguide](/docs/styleguide.md). +* 使用简短明了的提交信息,请参考 [Commit Message Styleguide](#git-commit-messages). + +## 文档样式 + +### 通用代码 + +* 以一个空行作为文件结尾。 +* 请按以下顺序加载模块: + * 内置 Node 模块 (参考 `path`) + * 内置 Electron 模块 (参考 `ipc`, `app`) + * 本地模块 (使用相对路径) +* 请按以下顺序排列类的属性与方法: + * 类的方法和属性 (方法以 `@` 开始) + * 实例的方法和属性 +* 避免和平台相关的代码: + * 使用 `path.join()` 来链接文件名 + * 当需要使用临时目录的时候使用 `os.tmpdir()` 而不是 `/tmp` 。 +* 使用 `return` 进行明确返回时 + * 不使用 `return null`, `return undefined`, `null`, 或 `undefined` + +### Git 提交信息(鉴于进行Git提交时需要英文书写,此处暂不翻译) + +* Use the present tense ("Add feature" not "Added feature") +* Use the imperative mood ("Move cursor to..." not "Moves cursor to...") +* Limit the first line to 72 characters or less +* Reference issues and pull requests liberally +* When only changing documentation, include `[ci skip]` in the commit description +* Consider starting the commit message with an applicable emoji: + * :art: `:art:` when improving the format/structure of the code + * :racehorse: `:racehorse:` when improving performance + * :non-potable_water: `:non-potable_water:` when plugging memory leaks + * :memo: `:memo:` when writing docs + * :penguin: `:penguin:` when fixing something on Linux + * :apple: `:apple:` when fixing something on macOS + * :checkered_flag: `:checkered_flag:` when fixing something on Windows + * :bug: `:bug:` when fixing a bug + * :fire: `:fire:` when removing code or files + * :green_heart: `:green_heart:` when fixing the CI build + * :white_check_mark: `:white_check_mark:` when adding tests + * :lock: `:lock:` when dealing with security + * :arrow_up: `:arrow_up:` when upgrading dependencies + * :arrow_down: `:arrow_down:` when downgrading dependencies + * :shirt: `:shirt:` when removing linter warnings diff --git a/README-zh_CN.md b/README-zh_CN.md new file mode 100644 index 0000000000..2c928ce895 --- /dev/null +++ b/README-zh_CN.md @@ -0,0 +1,81 @@ +[![Electron Logo](http://electron.atom.io/images/electron-logo.svg)](http://electron.atom.io/) + +[![Travis Build Status](https://travis-ci.org/electron/electron.svg?branch=master)](https://travis-ci.org/electron/electron) +[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/kvxe4byi7jcxbe26/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/electron) +[![devDependency Status](https://david-dm.org/electron/electron/dev-status.svg)](https://david-dm.org/electron/electron#info=devDependencies) +[![Join the Electron Community on Slack](http://atom-slack.herokuapp.com/badge.svg)](http://atom-slack.herokuapp.com/) + +Electron框架,可用JavaScript, HTML 及 CSS 编写桌面程序。 +它基于[Node.js](https://nodejs.org/)及[Chromium](http://www.chromium.org) +[Atom editor](https://github.com/atom/atom)以及[apps](http://electron.atom.io/apps)就是使用Electron编写的。 + +请关注Twitter [@ElectronJS](https://twitter.com/electronjs) 的重要公共。 + +这个项目将坚持贡献者盟约 [code of conduct](CODE_OF_CONDUCT.md). +我们希望贡献者能遵守贡献者盟约,如果有任何不能接受的行为被发现,请报告至electron@github.com(PS:请用英语) + +## 下载 + +预编译的二进制版本及symbols调试版本可以在[releases](https://github.com/electron/electron/releases)找到, +其中包括Linux,Windows和macOS版本 + +你可以使用[`npm`](https://docs.npmjs.com/)来安装预编译版本的electron +You can also use to install prebuilt electron +二进制文件: + +```sh +# 全局安装 `electron` +npm install electron -g + +# 安装为开发依赖 +npm install electron --save-dev + +# 淘宝源全局安装(PS:大陆到Electron源的下载速度极不稳定,无法下载成功时可用) +ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ npm install -g electron-prebuilt + +# 淘宝源开发依赖安装(PS:大陆到Electron源的下载速度极不稳定,无法下载成功时可用) +ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ npm install electron-prebuilt --save-dev +``` + +### 其他源 + +- [China](https://npm.taobao.org/mirrors/electron) + +## 文档 + +开发指南及API文档位于 +[docs](https://github.com/electron/electron/tree/master/docs) +它也包括如何编译和改进Electron + +## 翻译版文档 + +- [葡萄牙语-巴西](https://github.com/electron/electron/tree/master/docs-translations/pt-BR) +- [韩语](https://github.com/electron/electron/tree/master/docs-translations/ko-KR) +- [日语](https://github.com/electron/electron/tree/master/docs-translations/jp) +- [西班牙语](https://github.com/electron/electron/tree/master/docs-translations/es) +- [简体中文](https://github.com/electron/electron/tree/master/docs-translations/zh-CN) +- [繁体中文](https://github.com/electron/electron/tree/master/docs-translations/zh-TW) +- [土耳其](https://github.com/electron/electron/tree/master/docs-translations/tr-TR) +- [乌克兰](https://github.com/electron/electron/tree/master/docs-translations/uk-UA) +- [俄语](https://github.com/electron/electron/tree/master/docs-translations/ru-RU) +- [法语](https://github.com/electron/electron/tree/master/docs-translations/fr-FR) + +## 快速开始 + +Clone 并 run 这个 [`electron/electron-quick-start`](https://github.com/electron/electron-quick-start) +库来启动一个最小项目 + +## 社区 + +你可以在此提问题或互相提供帮助: +- [`electron`](http://discuss.atom.io/c/electron) 上的Atom论坛 +- `#atom-shell` Freenode上的聊天频道 +- [`Atom`](http://atom-slack.herokuapp.com/) Slack上的频道 +- [`electron-br`](https://electron-br.slack.com) *(葡萄牙语-巴西)* +- [`electron-kr`](http://www.meetup.com/electron-kr/) *(韩国)* +- [`electron-jp`](https://electron-jp-slackin.herokuapp.com/) *(日语)* +- [`electron-tr`](http://www.meetup.com/Electron-JS-Istanbul/) *(土耳其)* +- [`electron-id`](https://electron-id.slack.com) *(印度尼西亚)* + +查看 [awesome-electron](https://github.com/sindresorhus/awesome-electron) +例子,工具和资源列表。