GithubHelp home page GithubHelp logo

jimmywang54 / guides Goto Github PK

View Code? Open in Web Editor NEW

This project forked from docrails-tw/guides

0.0 0.0 0.0 4.75 MB

:books: The Source of http://rails.ruby.tw

JavaScript 1.54% Ruby 16.52% HTML 18.88% SCSS 63.06%

guides's Introduction

Edge Rails Guide Translation: Traditional Chinese READ ONLINE

Build Status

Translation is based on the master branch of rails/rails.

Install

DO THIS If you want to work on Rails Guides Translation. If you just want to fix translation error. See Fix Bugs in Translation.

curl:

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

wget:

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

What does above script do?

Clone 3 repos under a same folder (it will gently ask you where you would like to put these repos).

mkdir ~/docs/rails-guides-translations
cd ~/docs/rails-guides-translations
git clone [email protected]:rails/rails.git
git clone [email protected]:docrails-tw/guides.git
git clone https://github.com/docrails-tw/docrails-tw.github.io
cd guides
cp BASE_PATH.example BASE_PATH

If you use a different base location, you will need to change the location in BASE_PATH file. Defaults to ~/docs/rails-guides-translations

Fix bugs in translation

Clone this repo, use a topic branch. Fix the translation error in source/zh-TW, then send a Pull Request. Or open an issue then someone may fix it.

If the error is not a translation error and latest guide: http://edgeguides.rubyonrails.org haven't fixed it. Then you could clone the rails/rails repo. Fix it then send a Pull Request to rails/rails. Make sure you've read the Contributing to the Rails Documentation first. TL;DR. Word wrap to 80 chars and add [ci skip] in commit message for documentation changes. Please consult the translation terms while updating the text.

Workflow for Translator

YOU NEED TO RUN THE INSTALL SCRIPT FIRST.

After installation, now you have rails, guides, docrails-tw.github.io repos. rails is to get the latest source documents. docrails-tw.github.io is for hosting static html & css. guides is where you work on translation.

English guides live in guides/source/.

Traditional Chinese guides live in guides/source/zh-TW.

1. Start a new Translation

UPDATE BOTH English and Traditional Chinese guides first. Then start to translate.

rake guides:update_guide [name_of_the_guide]

or you could update all guides at once:

rake guides:update_guides but DO NOT check out the guides that you're not editing in version control.

Please add the terms you used to translation terms.

When your translation is finished, generate, preview locally then send a Pull Request.

2. Update an obsolete translation

UPDATE the english guide first, see the English diff, adds up missing translation or updates.

rake guides:update_guide [name_of_the_guide]

or you could update all guides at once:

rake guides:update_guides but DO NOT checks out the guides that you're not editing in version control.

Please consult the translation terms for uniform translation.

When your translation is finished, generate, preview locally then send a Pull Request.

Generate HTML

rake guides:generate

By default it will lazy generate, only generates what changes. pass ALL=1 to make it generate everything. Pass GUIDES_LANGUAGE=zh-TW to generate guides of zh-TW locale. Pass RAILS_VERSION to specify latest commit sha-1 (defaults to local).

Preview

After generation, just open it:

open output/zh-TW/index.html

Aliases

Put in your startup file (.bash_profile or ...):

alias deploy_to_pages="rake guides:deploy"
alias gen="rake guides:generate GUIDES_LANGUAGE=zh-TW"
alias genall="rake guides:generate ALL=1 GUIDES_LANGUAGE=zh-TW"
alias update_guide="rake guides:update_guide"
alias update_all_guides="rake guides:update_guides"

Before you make a Pull Request

Generate and preview on local. Make sure everything is okay. Chinese text and English text MUST has a space between each other.

Travis-CI

Travis-CI will run this command:

GUIDES_LANGUAGE=zh-TW rake

Make sure no errors occur before you open a Pull Request :D.

Translation Terms

I compiled a translation terms list during translation process. If you have any suggestions or find anything wrong, feel free to open an issue.

Deploy

When your Pull Request got merged on master. It's time to deploy!

rake guides:deploy

This will copy all *.html from output/zh-TW to docrails-tw.github.io.

Contribute

Always fork and makes a topic branch!

License

CC-BY-SA

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

The code are under MIT license, copied with minor modifications from rails/rails.

guides's People

Contributors

juanitofatas avatar castielsiren avatar changsj avatar jimmywang54 avatar annotis avatar shawnhuang avatar taiansu avatar yanghungtw avatar zyuanhong 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.