Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

翻译流程

1、前期工作

1) 注册 Github 账号,将官方仓库 官方仓库(https://github.com/hyperledger/fabric-docs-i18n) Fork 到自己的仓库。

2) 下载 git,https://www.git-scm.com/download/,安装运行 gitbash。

...

a) 打开 github,找到自己 fork 的仓库,clone with SSH,复制

Image RemovedImage Added


b) 打开 git bash,粘贴复制的内容
git clone git@github.com:自己的/fabric-docs-cni18n.git

Image Removed

cd fabriccd fabric-docs-cni18ngit status

Image Removed

c) 切换 branch(从master到1.4.0_zh-CN branch(从master到 release-2.2 或者其他需要翻译的分支)
git branch –a
git checkout -b 1.4.0_zh-CNb  release-2.2

Image AddedImage Removed

2、认领任务

1

...

.查看 issue 列表

...

Image Removed

2) 如果issue中没有列出你要翻译的内容,在确保该内容没有人翻译的情况下,添加新issue,并添加“assign me”评论。

3)管理员将任务分配后,即可开始翻译。

...

,根据当前任务的进度选择你要认领的任务。

2.添加评论表明你要领取该翻译任务,然后等待管理员将任务分配给你。如下图:

Image Added

3.如果issue中没有列出你要翻译的内容,在确保该内容没有人翻译的情况下,添加新issue,并添加评论表明你要认领该任务。

4.管理员将任务分配后,即可开始翻译

注意:任务自被分配之日起两周未完成的可以被其他人重新认领。

3、翻译上传

1)  编辑中文版(位置目录:fabric-docs-cn/docs/source)

...

3)  打开Github:Pull request – New pull request,比较上传,申请合并(填写描述)

4、查看翻译文档

PR 被 merge 之后请去中文文档查看翻译内容是否已更新,如果没有更新请联系管理员。

5、其他翻译方式

目前我们正在尝试新的翻译方式,但技术路线尚未成熟,待正式公布使用新的方式之前请继续使用 github 参与翻译工作。

以下是新的翻译方式的简要说明:

  • 文档翻译采用 transifex.com 在线翻译平台。
  • 翻译志愿者只需要登录transifex.com 加入要翻译的项目,就可以翻译。
  • 翻译完成的文档经过review后,由各项目的maintainer下载,并且上传到主文档的repo上(例如fabric gerrit或者github)
  • 文档维护者维护者在readthedocs.io上从github同步文档以及翻译后的文档,并且buid成html,pdf等格式,
  • 用户访问项目文档地址访问,如fabric https://hyperledger-fabric.readthedocs.io/,用户可以通过点击左下方的绿色版本文字进行语言和版本切换。如下图所示:

 Image Removed

文档翻译地址: 

...


Fabric Documents Translate Workflow

1. Prepare Documents Repository

1) Login Github and fork https://github.com/hyperledger-labs/fabric-docs-cn

2) Install git, more details see https://git-scm.com/downloads

3) Generate SSH key and it to your Github account, more details see https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh

4) Clone the documents repository to your local use commond “git clone repo-url“, and checkout branch you want to use, like “git checkout -b release-2.2” it will change to branch release-2.2 which is Chinese translation branch.

2. Claim Tasks

1) Check the issue list https://github.com/hyperledger/fabric-docs-i18n/issues

2) Add a comment under the issue you want to claim, then wait for assigning by administrator. Like this:

 Image Added

3) If the list not contains the document you want to translate, make sure nobody has translated it, and then you can add an new issue,and leave a comment, then wait for assigning

4) Translate the documents after the administrator assigned it to youNOTE: If the issue is assigned more than two weeks, but not finished,anybody else can claim the issue again.

3. Upload Your Translations

1) Translate the documents with property editor,like Typora, VSCode, Atom, Vim. The source files are in fabric-docs-cn/docs/source directory

2) Commit and push your translation with signoff. The commonds are like this:

  • git commit -s -m “your message”
  • git push

3) Create a new Pull Reques in repository https://github.com/hyperledger/fabric-docs-i18n/issues,you can find it by chose “Pull request – New pull request”, then compare changes and create a PR with a message for want you have done.Like this:

Image Added

4) Waiting for merge by administrator

加入方法:

  1. 免费注册一个https://transifex.com/ 账号,或者关联自己的github,facebook等账号
  2. 访问想要翻译的项目(地址见上表),选择 Help Translate

Image Removed

进入项目之后选择 Translate

Image Removed

翻译界面如下:

左侧红色为原文,绿色框内为当前翻译的内容,右侧蓝色为原文参考,把自己翻译的中文内容输入右侧下方黄色框内。

Image Removed

6、其他参考文档

  1. 操作说明文档fabric1.2翻译指南.docx
  2. 1.1.0版本的操作文档:如何参与hyperledger中文翻译工作.pdf

这两个是早期版本的文档,仅供参考