Skip to content

Commit

Permalink
Revise and update Chinese translation (bitshares#908)
Browse files Browse the repository at this point in the history
* Revise and update Chinese translation

* Separate README and revise Chinese version
  • Loading branch information
HarukaMa authored and svk31 committed Jan 1, 2018
1 parent 8118ffc commit bca0e5b
Show file tree
Hide file tree
Showing 3 changed files with 1,585 additions and 1,401 deletions.
69 changes: 8 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
BitShares-UI
============
[中文版](README_zh.md)

This is a light wallet that connects to a BitShares API provided by the *witness_node* executable.


It *stores all keys locally* in the browser, *never exposing your keys to anyone* as it signs transactions locally before transmitting them to the API server which then broadcasts them to the blockchain network. The wallet is encrypted with a password of your choosing and encrypted in a browser database.

>这是一个链接BitShares API的轻钱包,而BitShares API由可执行的 *witness_node* 提供
>它把*所有的密钥存储在本地浏览器上**绝对不要把你的密钥暴露给任何人*,因为它会先在本地签署交易,再传到API服务器上,最后广播至区块链网络。这个钱包被一个你选择的密码加密,也会被浏览器数据库加密。
## Getting started 项目部署
## Getting started

BitShares-UI depends node Node.js, and version 6+ is required.

On Ubuntu and OSX, the easiest way to install Node is to use the [Node Version Manager](https://github.com/creationix/nvm).

To install NVM for Linux/OSX, simply copy paste the following in a terminal:

>BitShares-UI依赖于Node.js, 需要版本号v6以上。目前还没有被版本号v7测试。
>在Ubuntu和OSX,安装Node最简单的方式是用[NVM](https://github.com/creationix/nvm)
>为了安装Linux/OSX的NVM,只需要简单地把下列的代码复制粘贴进命令控制终端:
```
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
nvm install v6
Expand All @@ -31,59 +23,46 @@ nvm use v6

Once you have Node installed, you can clone the repo:

>一旦你把节点安装完毕,你就可以克隆这一版本库:
```
git clone https://github.com/bitshares/bitshares-ui.git
cd bitshares-ui
```

Before launching the GUI you will need to install the npm packages:

>在装载GUI前,你需要为每一子目录安装npm包:
```
npm install
```

## Running the dev server 运行开发服务器
## Running the dev server

The dev server uses Express in combination with Webpack.

Once all the packages have been installed you can start the development server by running:

>开发服务器使用了EXPRESS和Webpack.
>一旦所有的封包被安装了,你就可以通过'web'文件夹并且输入下列代码,开始启动开发服务器
```
npm start
```

Once the compilation is done the GUI will be available in your browser at: `localhost:8080` or `127.0.0.1:8080`. Hot Reloading is enabled so the browser will live update as you edit the source files.

>一旦编译成功,GUI会在你的浏览器上成功部署,链接是`localhost:8080` 或者`127.0.0.1:8080`。我们加载了热重载机制,只要你编辑源文件,浏览器便会实时更新。

## Testnet 测试网络
## Testnet
By default bitshares-ui connects to the live BitShares network, but it's very easy to switch it to the testnet run by Xeroc. To do so, open the UI in a browser, go to Settings, then under Access, select the *Public Testnet Server* in the dropdown menu. You should also change the faucet if you need to create an account, the testnet faucet address is https://testnet.bitshares.eu.

The UI will reload and connect to the testnet, where you can use the faucet to create an account and receive an initial sum of test BTS.

>通过默认设置,bitshares-ui会连接到实时比特股网络,但要想切换到由Xeroc创建的测试网络也很容易。步骤是,在浏览器中打开UI,到设置(Settings)界面,在出入口(Access)下面,在下拉条里选择公共测试网络服务器。如果你想要建立一个账户,你也需要切换水龙头,测试网络的水龙头地址https://testnet.bitshares.eu
>UI就会重载并连接至测试网络。在这里你就可以用水龙头创建一个账户并收到一些用于测试的BTS。
![image](https://cloud.githubusercontent.com/assets/6890015/22055747/f8e15e68-dd5c-11e6-84cd-692749b578d8.png)

## Production 产品
## Production
If you'd like to host your own wallet somewhere, you should create a production build and host it using NGINX or Apache. In order to create a prod bundle, simply run the following command:

>如果你想要做主机来持有你自己的钱包,你需要建立一个生产构件,并通过NGINX或者Apache做主机。为了建立一个bundle,只用简单地运行下列命令:
```
npm run build
```
This will create a bundle in the /dist folder that can be hosted with the web server of your choice.


>这样就能在建立一个/dist目录下建立一个bundle,让你选择的网络服务器来主持它。
### Installable wallets
We use Electron to provide installable wallets, available for Windows, OSX and Linux Debian platforms such as Ubuntu. First, make sure your local python version is 2.7.x, as a dependency requires this.

Expand All @@ -94,16 +73,14 @@ On Linux you will need to install the following packages to handle icon generati
For building, each architecture has it's own script that you can use to build your native binary:

__Linux__
`npm run package-deb`
`npm run package-deb`
__Windows__
`npm run package-win`
`npm run package-win`
__Mac__
`npm run package-mac`
`npm run package-mac`

This will compile the UI with some special modifications for use with Electron, generate installable binaries with Electron and copy the result to the root `build/binaries` folder.

## 可安装钱包
我们使用Electron来提供可安装钱包,Windows, OSX 和Linux平台如Ubuntu都可以使用。首先,在'electron'文件夹里安装需要的封包。然后到'web'文件夹里运行`npm run electron`。这样就会在编译UI的同时针对Electron做一些特殊的改进,并将结果粘贴至根文件夹 `electron/build`。现在,为了创建一个钱包到你的平台上,回到`electron`文件夹并运行`npm run release`


## Contributing
Expand All @@ -118,17 +95,6 @@ If you would like to get involved, we have a [Telegram chatroom](https://t.me/Bi
- Developer: Calvin Froedge, @calvin
- Code Review: Fabian Schuh, @xeroc

## 贡献

Bitshares UI团队被这一[工作提案](https://steemit.com/bitshares/@billbutler/translated-by-zhaomu-l)支持。它提供用来支付协调者,悬赏金和比特股基金的资金。

如果你想参与贡献,我们有一个[Telegram 聊天室](https://t.me/BitSharesDEX),在这里你可以问问题并得到帮助。

- 协调者: Bill Butler, @billbutler
- 主程序员: Sigve Kvalsvik, @sigvek
- 程序员: Calvin Froedge, @calvin
- 代码审核: Fabian Schuh, @xeroc

## Development process

- Milestones are numbered YYMMDD and refer to the **anticipated release date**.
Expand All @@ -139,16 +105,6 @@ Bitshares UI团队被这一[工作提案](https://steemit.com/bitshares/@billbut
- To claim an issue, simply leave a comment with your request to claim.
- Do not claim an issue if you will be unable to complete it by the date indicated on the Milestone name. Milestone 170901 will be pushed on September 1, 2017.

## 开发流程

- 开发目标上标记的日期,是预计发表时间
- 修补漏洞优先于项目改进
- 开发者需要根据一个被标好数字(这个数字对应一个问题`git checkout -b 123`)的分叉(branch),对每个问题进行开发。
- 我们对已经被预算好的问题进行**悬赏**。一个被预算好的问题会被标记上前缀,像这样`[2] An nasty bug`。在这一例子中,这个问题被视作价值两个小时的工作时间(125美刀一小时)。如果你能通过这些指南修改这一问题,并且你的修改要求(Pull Request)被接受,你便会得到250 bitUSD。你必须拥有一个比特股钱包和比特股账号用来接收这一支付。
- 如果问题已经被认领(指派),不要尝试认领它。外部开发者认领问题意味着 wmbutler的指派,但是我会在评论里提及这一开发者的github账户。
- 简单地留下一条你要求认领的评论(comment),便能认领问题。
- 不要认领一个在开发目标上所写规定时间内完成不了的问题。列如 开发目标170901 需要在2017年9月1日前被推进完成.

## Coding style guideline

Our style guideline is based on 'Airbnb JavaScript Style Guide' (https://github.com/airbnb/javascript), with few exceptions:
Expand All @@ -160,12 +116,3 @@ Our style guideline is based on 'Airbnb JavaScript Style Guide' (https://github.

We strongly encourage to use _eslint_ to make sure the code adhere to our style guidelines.

## 代码风格
我们的代码指南基于[Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript),不过有一些例外:

- 字符串需要被双引
- 额外的尾随逗号(在定义数组和对象时)是随意的
- 四个空格的缩进
- 在花括号里的空格是随意的

我们强烈鼓励用  _eslint_ 确保代码依附于我们的代码风格指南
116 changes: 116 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
BitShares-UI
============

这是一个连接 BitShares API 的轻钱包。BitShares API 由 *witness_node* 程序提供。

这个钱包*将所有的密钥存储在本地浏览器上**不会把你的密钥暴露给任何人*,因为它会先在本地对交易签名,再传输到 API 服务器上,由服务器广播至区块链网络。钱包由用户选择的密码加密并储存在浏览器数据库中。

## 项目依赖

BitShares-UI 依赖于 Node.js v6 以上版本。

在 Linux 和 macOS 上,安装 Node 最简单的方式是用 [NVM](https://github.com/creationix/nvm)

将以下命令复制到终端中执行即可安装 NVM。

```
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
nvm install v6
nvm use v6
```

Node 安装完成后,获取项目的源代码:

```
git clone https://github.com/bitshares/bitshares-ui.git
cd bitshares-ui
```

在启动之前,需要先安装 npm 软件包:

```
npm install
```

## 运行开发服务器

开发服务器使用 Express 和 Webpack。

所有软件包安装好后,可以使用以下命令启动开发服务器:

```
npm start
```

编译完成后,即可通过浏览器访问 `localhost:8080``127.0.0.1:8080` 打开钱包。服务器启用了热加载功能,在编辑源文件后,浏览器中的内容会实时更新。

## 测试网络

默认情况下,bitshares-ui 会连接到正常比特股网络。切换到 Xeroc 运行的测试网络也很容易,在设置页面的接入点设置中选择 *Public Testnet Server* 即可。如果你需要创建帐号,你同时需要修改水龙头设置。测试网络的水龙头地址是 https://testnet.bitshares.eu

UI 会刷新并连接到测试网络,你可以通过水龙头创建账户并收到一些用于测试的 BTS。

![image](https://cloud.githubusercontent.com/assets/6890015/22055747/f8e15e68-dd5c-11e6-84cd-692749b578d8.png)

## 生产环境
如果你想自己架设钱包,你应该进行生产环境构建,并使用 NGINX 或 Apache 托管。只需要运行以下命令构建生产环境应用包:

```
npm run build
```


应用包会创建在 `/dist` 目录下,可以使用网站服务器进行托管。

## 可安装钱包
我们使用 Electron 提供可安装钱包,支持 Windows, macOS 和 Debian 系 Linux 系统,如 Ubuntu。首先确保你安装的 python 版本为 2.7.x,因为一个依赖要求此版本。

在 Linux 上,你需要安装以下软件包来生成图标:

`sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils`

每个目标平台都有自己的脚本用来构建项目:

__Linux__
`npm run package-deb`
__Windows__
`npm run package-win`
__Mac__
`npm run package-mac`

编译 UI 时将会针对 Electron 做出一些特殊修改,之后生成可安装的二进制文件,并将文件复制到 `build/binaries` 文件夹中。

## 贡献

请在 staging 分支上进行工作,并将 PR 提交到该分支中。master 分支只在发布新版本时进行更新。

Bitshares UI 团队由[这个工作提案](http://www.bitshares.foundation/workers/2017-08-bill-butler)支持。此提案提供用来支付协调者、赏金和比特股基金的资金。

如果你想参与贡献,可以加入 [Telegram 群组](https://t.me/BitSharesDEX)进行提问并获取帮助。你也可以加入 [Discord 服务器](https://discord.gg/GsjQfAJ)

- 协调者: Bill Butler, @billbutler
- 主开发者: Sigve Kvalsvik, @sigvek
- 开发者: Calvin Froedge, @calvin
- 代码审核: Fabian Schuh, @xeroc

## 开发流程

- 开发目标使用 YYMMDD 格式进行标记,为**预计发布日期**
- Bug 修复优先于项目改进
- 开发者应在对应 issue 编号的分支中分别进行工作,如 `git checkout -b 123`
- 我们对估算好的 issue 进行**悬赏**。估算好的 issue 拥有数字前缀,如 `[2] An nasty bug`。在这个例子中,bug 价值两个工时(每个工时价值 125 美元)。如果你按照指南修复了这个问题,PR 被接受后,就可以得到 250 bitUSD。你需要拥有比特股钱包和账户进行收款。
- 如果一个 issue 已经被认领(指派)了,不要去再次认领。外部开发者认领的 issue 将指派给 wmbutler,但是会在评论中写出开发者的 github 帐号。
- 在评论中留下认领请求即可认领 issue。
- 不要认领你无法在开发目标指明的日期之前完成的 issue。如,开发目标 170901 应在 2017 年 9 月 1 日前完成。


## 代码风格指南

我们使用 [Airbnb JavaScript 风格指南](https://github.com/airbnb/javascript),但有以下例外:

- 字符串使用双引号 (6.1)
- 数组和对象声明时的末尾多余逗号不作要求 (20.2)
- 使用四个空格缩进 (19.1)
- 大括号中的空格不作要求 (19.11)

我们强烈鼓励使用 _eslint_ 来保证代码符合风格指南。
Loading

0 comments on commit bca0e5b

Please sign in to comment.