Coder Social home page Coder Social logo

guides-1's Introduction

Rails 指南翻译

翻译准备工作

使用 curl

ruby -e "$(curl -sSL https://rawgithub.com/ruby-china/guides/master/install.rb)"

或使用 wget

ruby <(wget --no-check-certificate https://rawgithub.com/ruby-china/guides/master/install.rb -O -)

会抓取 ruby-china/railsruby-china/guides 这两个代码库。

ruby-china/rails:更新原文用。

ruby-china/guides:存放译文用。

这俩个代码库默认会存放在:

~/docs/rails-guides-translation-cn

若是手动抓取,需修改这两个代码库存放的位置,并存成 BASE_PATH 文件。

翻译流程

    1. 先更新原文。

比如 getting_started.md

$ rake guides:update_guide getting_started.md

这样 source/getting_started.md 便是最新的,拷贝原文内容到 source/zh-CN/getting_started.md 下便可开始翻译。

    1. 进行翻译。

预览

$ GUIDES_LANGUAGE=zh-CN rake guides:generate

命令过长可在 ~/.bashrc~/.zshrc 设别名:

alias gen="GUIDES_LANGUAGE=zh-CN rake guides:generate"`
    1. 翻译完成发送 Pull Request。

注意,翻译完成的译文必须与原文是相同版本。

无力翻译

把目前的工作成果发送 Pull Request,让其他人接手。

更新翻译

使用:

$ rake guides:update_guides

来看所有上游有更新的原文。

更新“已完成”的翻译

getting_started.md 为例。

运行:

$ rake guides:update_guide getting_started.md

$ git status

开新分支:

$ git checkout -b new-branch-name

将原文更动的部份,翻译、修正到 source/zh-CN/getting_started.md,提交、发送 Pull Request。

更新“未开始”的翻译

getting_started.md 为例。

$ rake guides:update_guides

$ git status

开新分支:

$ git checkout -b new-branch-name

把原文 source/getting_started.md 的内容拷贝到 source/zh-CN/getting_started.md ,提交,发送 Pull Request。

勘误

翻译的错误,可以修正后发 Pull Request;或是回报等别人修正也可以。

若不是翻译的错误,是原文的错误,请检查 http://edgeguides.rubyonrails.org 是否已经修正了,没有的话可以去 rails/rails 帮忙修正。记得有关文档的改动,在提交信息要加上 [ci skip]

在给 rails/rails 提报或修正前,最好先阅读:Contributing to Ruby on Rails

部署

$ rake guides:deploy

会把 ruby-china/guides/output/zh-CN/* 的静态文件,拷贝到 ruby-china/ruby-china.github.io

建议

欢迎提意见

其它格式

PDF, MOBI, EPUB 格式

请支持安道所翻译的 Rails 指南

协议

CC-BY-SA

简体译文由 @Andor_Chen 所翻译。

译文授权协议为 Creative Commons Attribution-ShareAlike 4.0 International License

代码来自 rails/rails,采用相同的 MIT license 协议。

guides-1's People

Contributors

42thcoder avatar algo31031 avatar aufree avatar defp avatar eric-guo avatar erithair avatar juanitofatas avatar jyootai avatar kaku87 avatar redraiment avatar tianlu1677 avatar ug0 avatar windwiny avatar wtbhk avatar wusuopu avatar zhengxianlan avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.