Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate docs into Chinese #585

Open
wants to merge 59 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
2a27c8e
add Chinese files
diguage May 9, 2016
f49f928
translate what-is-asciidoctor to Chinese
diguage May 9, 2016
eb0462a
translate what-is-asciidoctor to Chinese
diguage May 9, 2016
101b721
finished translating the index page to Chinese
diguage May 10, 2016
bca1fb5
Merge branch 'locale' of github.com:diguage/asciidoctor.org into locale
diguage May 10, 2016
da7beb4
Merge branch 'locale' of github.com:diguage/asciidoctor.org into locale
diguage May 10, 2016
e3de662
translate what-is-asciidoc to Chinese
diguage May 10, 2016
0e88e9f
translate to Chinese
diguage May 14, 2016
3f49f8b
ready the included Chinese files
diguage May 15, 2016
511306e
translate to Chinese
diguage May 15, 2016
95b4c89
Finish translating to Chinese
diguage May 18, 2016
7eced12
Put the file in Chinese in zh-cn directory
diguage May 18, 2016
d738477
Reput the docs file in Chinese in /zh-cn directory
diguage May 18, 2016
0abc20e
add Chinese files
diguage May 9, 2016
2cbe6d4
translate what-is-asciidoctor to Chinese
diguage May 9, 2016
c709fe9
translate what-is-asciidoctor to Chinese
diguage May 9, 2016
260e4a2
finished translating the index page to Chinese
diguage May 10, 2016
807f817
translate what-is-asciidoc to Chinese
diguage May 10, 2016
098c60d
translate to Chinese
diguage May 14, 2016
ef866b2
ready the included Chinese files
diguage May 15, 2016
7cc43c4
translate to Chinese
diguage May 15, 2016
7c9149e
Finish translating to Chinese
diguage May 18, 2016
3f8bce3
Put the file in Chinese in zh-cn directory
diguage May 18, 2016
4643d45
Reput the docs file in Chinese in /zh-cn directory
diguage May 18, 2016
91a9bcc
Merge branch 'zh-cn' of github.com:diguage/asciidoctor.org into zh-cn
diguage May 18, 2016
7ec27c5
add Chinese menu
diguage May 19, 2016
e2f9ec8
translate to Chinese
diguage May 19, 2016
03da921
add Chinese files
diguage May 9, 2016
8302ec9
translate what-is-asciidoctor to Chinese
diguage May 9, 2016
f3fee46
translate what-is-asciidoctor to Chinese
diguage May 9, 2016
566fa1b
finished translating the index page to Chinese
diguage May 10, 2016
f04561d
translate what-is-asciidoc to Chinese
diguage May 10, 2016
031788a
translate to Chinese
diguage May 14, 2016
8646d90
ready the included Chinese files
diguage May 15, 2016
b33391f
translate to Chinese
diguage May 15, 2016
01be54a
Finish translating to Chinese
diguage May 18, 2016
cfdc2eb
Put the file in Chinese in zh-cn directory
diguage May 18, 2016
a8c196d
Reput the docs file in Chinese in /zh-cn directory
diguage May 18, 2016
73ba71b
add Chinese files
diguage May 9, 2016
709ad32
translate what-is-asciidoctor to Chinese
diguage May 9, 2016
d3afd1f
translate what-is-asciidoctor to Chinese
diguage May 9, 2016
492e06b
finished translating the index page to Chinese
diguage May 10, 2016
56087f1
translate what-is-asciidoc to Chinese
diguage May 10, 2016
d4e6384
translate to Chinese
diguage May 14, 2016
fe59346
ready the included Chinese files
diguage May 15, 2016
958e91b
translate to Chinese
diguage May 15, 2016
2b8fe83
Finish translating to Chinese
diguage May 18, 2016
ef0d3f2
Put the file in Chinese in zh-cn directory
diguage May 18, 2016
b12511e
Reput the docs file in Chinese in /zh-cn directory
diguage May 18, 2016
b091750
add Chinese menu
diguage May 19, 2016
30334a8
translate to Chinese
diguage May 19, 2016
ce95b31
Merge branch 'zh-cn' of github.com:diguage/asciidoctor.org into zh-cn
diguage May 19, 2016
60b9685
delete useless file
diguage May 19, 2016
677a3bb
delete useless file
diguage May 19, 2016
160913f
Merge branch 'master' into zh-cn
diguage Dec 6, 2016
4c920a3
Merge branch 'master' into zh-cn
diguage Dec 7, 2016
6a8a4bd
Merge branch 'master' into zh-cn
diguage Dec 13, 2016
35c56b3
add zh-cn site config
diguage Dec 13, 2016
2e9483d
fix bug
diguage Dec 13, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Bundler configuration file [http://gembundler.com]
# Read the rationale for it and how it works at http://gembundler.com/v1.3/rationale.html

source 'https://rubygems.org'
# source 'https://rubygems.org'
source 'https://gems.ruby-china.org'

gem 'awestruct', '0.5.7'
#gem 'awestruct', github: 'awestruct/awestruct', branch: 'master'
Expand All @@ -22,6 +23,8 @@ gem 'rake', '10.5.0', :group => :test
gem 'rdoc', '4.2.2', :group => :test
gem 'tomdoc', '0.2.5', :group => :test
gem 'html-proofer', '3.0.2', :group => :test
gem 'htmlcompressor', '~> 0.3.1'
gem 'uglifier', '~> 3.0', '>= 3.0.4'

# required to use the minify extension
#gem 'uglifier', '2.7.2'
Expand Down
17 changes: 17 additions & 0 deletions _config/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,20 @@ profiles:
deploy:
host: github_pages
branch: gh-pages
zh_prod:
base_url: http://asciidoctor.cn
disqus_developer: false
# long-hand form for Asciidoctor
google_analytics_account: UA-38215684-1
google_analytics:
account: UA-38215684-1
scss:
:line_numbers: false
:style: :compressed
#compass_output_style: compressed
# TODO enable minify once we verify it's working as expected
#minify: true
deploy:
host: asciidoctor.cn
username: deployer
path: /home/deployer/asciidoctor.cn/html
61 changes: 61 additions & 0 deletions _layouts/about_zh-CN.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
layout: base
---
header
.row
- if page.url == '/'
.large-8.columns.hero
h1=page.title
p.description
|A <em>fast</em> text processor &amp; publishing toolchain for converting AsciiDoc to HTML5, DocBook &amp; more.
.actions
a.button.secondary href='https://rubygems.org/gems/asciidoctor' style='color: #6d180b; max-width: 220px;'
i.fa.fa-download.fa-2x.pull-left
|Download gem from RubyGems
a.button.secondary href='https://github.com/asciidoctor/asciidoctor' style='max-width: 220px;'
i.fa.fa-github.fa-2x.pull-left
|Checkout source from GitHub
.large-4.columns.hello
/ TODO make this an AsciiDoc snippet when it becomes available in Slim
.listingblock
.content
pre.CodeRay.highlight
code data-lang='asciidoc'
|= Hello, AsciiDoc!
Doc Writer &lt;[email protected]&gt;

An introduction to http://asciidoc.org[AsciiDoc].

== First Section

* item 1
* item 2

[source,ruby]
puts "Hello, World!"
- else
.large-12.columns
h1=page.title
- if page.leadin
p.description=page.leadin
.row
.large-8.columns
#content
=content
.large-4.columns.secondary id='sidebar'
- if page.url == '/'
.quoteblock
blockquote
.paragraph
|Use AsciiDoc for document markup. Really. It's actually <strong>readable</strong> by humans, easier to parse and way more flexible than XML.
.attribution
|&#8212; Linus Torvalds
h4 Asciidoctor 项目
p
|Asciidoctor 项目带来了全面的、可访问的出版工具链,围绕 AsciiDoc 语法为本,日益扩大的生态系统范围,包括Ruby,JavaScript和JVM。
br
br
|除了 AsciiDoc 处理器和一组样式表,该项目还提供了 Maven,Gradle 和 Guard 插件及操作系统的包,例如Fedora,Debian 和 Ubuntu。这也推动 AsciiDoc 引入新的理念和创新,并有助于通过教育和宣传促进 AsciiDoc。
h4 向 asciidoctor.org 做贡献
p 这个网站是开源的!源码由 Asciidoctor 组织托管在 Github 上。
p 如果你想帮助提升这个网站,<a href="https://github.com/asciidoctor/asciidoctor.org">fork 这个项目</a>,修改内容,然后发送 pull 请求。当 pull 请求被合并时,网站就会自动更新。
46 changes: 34 additions & 12 deletions _layouts/base.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,41 @@ body.antialiased
li.toggle-topbar.menu-icon: a href='#': span
section.top-bar-section
ul.right
li: a href='/' About
li.divider
li: a href='/news/' News
li.divider
li: a href='http://gist.asciidoctor.org' Gist
li.divider
li: a href='https://github.com/asciidoctor' Code
li.divider
li: a href='http://discuss.asciidoctor.org' Discuss
li.divider
li: a href='/docs/' Docs
li.divider
li.has-form: a.button href='/docs/asciidoc-writers-guide/' Get Writing!
- if page.url.start_with? '/zh-cn/'
li: a href='/zh-cn/' 关于
li.divider
li: a href='/news/' 新闻
li.divider
li: a href='http://gist.asciidoctor.org' Gist
li.divider
li: a href='https://github.com/asciidoctor' 代码
li.divider
li: a href='http://discuss.asciidoctor.org' 论坛
li.divider
li: a href='/zh-cn/docs/' 文档
li.divider
li.has-form: a.button href='/zh-cn/docs/asciidoc-writers-guide/' 开始写作!
li.divider
li: a href='/'
img src='/images/icons/flat-United-States.png'/
- else
li: a href='/' About
li.divider
li: a href='/news/' News
li.divider
li: a href='http://gist.asciidoctor.org' Gist
li.divider
li: a href='https://github.com/asciidoctor' Code
li.divider
li: a href='http://discuss.asciidoctor.org' Discuss
li.divider
li: a href='/docs/' Docs
li.divider
li.has-form: a.button href='/docs/asciidoc-writers-guide/' Get Writing!
li.divider
li: a href='/zh-cn/'
img src='/images/icons/flat-China.png'/
.container
=content
footer
Expand Down
Binary file added images/icons/flat-China.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/flat-United-States.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions zh-cn/docs/_includes/about-asciidoctor.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
////
user manual
////

== What is Asciidoctor?

////
{homepage}[Asciidoctor] is an open source text processor and publishing toolchain for transforming AsciiDoc markup into HTML 5, EPUB3, PDF, DocBook 5.0 and 4.5, slidedecks, and other custom formats.
Asciidoctor is written entirely in Ruby, packaged as a RubyGem and published to {gem}[RubyGems.org].
There are also Fedora, Debian and Ubuntu packages available for installing Asciidoctor.
The git repositories for the project are hosted under the {gh-org}[Asciidoctor organization on GitHub].
////

Asciidoctor is a _fast_ text processor and publishing toolchain for converting AsciiDoc content to HTML5, EPUB3, PDF, DocBook 5 (or 4.5) slidedecks and other formats.
Asciidoctor is written in Ruby, packaged as a RubyGem and published to {uri-gem}[RubyGems.org].
The gem is also packaged in several Linux distributions, including Fedora, Debian and Ubuntu.
Asciidoctor is open source, {uri-repo}[hosted on GitHub], and released under the MIT license.

=== The Big Picture

Asciidoctor reads content written in plain text, as shown in the panel on the left in the image below, and converts it to HTML5, as shown rendered in the right panel.
Asciidoctor adds a default stylesheet to the HTML5 document, as shown, to provide a pleasant out-of-the-box experience.

image::zen-screenshot.png[Preview of AsciiDoc source and corresponding rendered HTML]

=== Asciidoctor on the JVM

You can run Asciidoctor on the JVM using JRuby.
You can also use {uri-asciidoctorj}[AsciidoctorJ] to invoke Asciidoctor's APIs from Java and other JVM languages.

=== Asciidoctor.js

Asciidoctor can be used in JavaScript.
http://opalrb.org[Opal] is used to transcompile the code from Ruby to JavaScript to make {uri-asciidoctorjs}[Asciidoctor.js], which can be used wherever JavaScript runs, such as in a web browser or on Node.js.
18 changes: 18 additions & 0 deletions zh-cn/docs/_includes/abstract.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
////
Included in:

- user-manual
////

An abstract is a concise overview of an article.
Typically found in the frontmatter of academic, research, and analytical papers, an abstract can be classified as structured or unstructured and complete or limited.
Abstracts with subheadings are structured abstracts, whereas abstracts without subheadings are unstructured.
A complete (informative) abstract states the key topics and findings of the paper while a limited (descriptive) abstract briefly describes the structure of the article.
An abstract title is not necessary.

----
[abstract]
== Documentation Abstract

Documentation is a distillation of many long, squiggly adventures.
----
76 changes: 76 additions & 0 deletions zh-cn/docs/_includes/admonition.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
////
Included in:

- user-manual: Admonition
- writers-guide: admonition
////

// tag::intro[]
There are certain statements that you may want to draw attention to by taking them out of the content's flow and labeling them with a priority.
These are called admonitions.
It's rendered style is determined by the assigned label (i.e., value).
Asciidoctor provides five admonition style labels:

* `NOTE`
* `TIP`
* `IMPORTANT`
* `CAUTION`
* `WARNING`

When you want to call attention to a single paragraph, start the first line of the paragraph with the label you want to use.
The label must be uppercase and followed by a colon (`:`).

.Admonition paragraph syntax
[source]
----
include::ex-admon.adoc[tags=para-c]
----
<1> The label must be uppercase and immediately followed by a colon (`:`).
<2> Separate the first line of the paragraph from the label by a single space.
// end::intro[]

:icons!:
// tag::icon[]
.Result: Admonition paragraph
====
include::ex-admon.adoc[tags=para]
====
// end::icon[]
:icons: font

When you want to apply an admonition to complex content, set the label as a style attribute on a block.
As seen in the next example, admonition labels are commonly set on example blocks.
This behavior is referred to as *masquerading*.
The label must be uppercase when set as an attribute on a block.

.Admonition block syntax
[source]
----
include::ex-admon.adoc[tags=bl-c]
----
<1> Set the label in an attribute list on a delimited block. The label must be uppercase.
<2> Admonition styles are commonly set on example blocks. Example blocks are delimited by four equal signs (`====`).

:icons!:
.Result: Admonition block
====
include::ex-admon.adoc[tags=bl-nest]
====
:icons: font

In the examples above, the admonition is rendered in a callout box with the style label in the gutter.
You can replace the rendered labels with icons by setting the `icons` attribute on the document.
This is how the WARNING admonition paragraph renders when icons is set and assigned the `font` value.

.Admonition paragraph with icons set
[source]
----
include::ex-admon.adoc[tags=para]
----

.Result: Admonition paragraph with icons set
====
include::ex-admon.adoc[tags=para]
====

Learn more about using Font Awesome or custom icons with admonitions in the <<user-manual#icons,icons>> section.
11 changes: 11 additions & 0 deletions zh-cn/docs/_includes/api-intro.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
////
API introduction for Asciidoctor
This file is included in the user-manual documents
////

In addition to the command line interface, Asciidoctor provides a Ruby API.
The API is intended for integration with other software projects and is suitable for server-side applications, such as Rails, Sinatra and GitHub.

Asciidoctor also has a Java API that mirrors the Ruby API.
The Java API calls through to the Ruby API using an embedded JRuby runtime.
See the {doc-asciidoctorj}[AsciidoctorJ project] for more information.
48 changes: 48 additions & 0 deletions zh-cn/docs/_includes/appendix.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
////
Included in:

- user-manual
////

You can define that some sections are appendix sections by adding the `[appendix]` marker before the section header.

----
[appendix]
== Copyright and License
----

Sections marked as appendix have different header, built as follow:

* A fixed prefix ("`Appendix`" is the default value)
* Letters are used to number the section (A, B, C...)
* A colon
* The section title

The prefix can be modified with the `appendix-caption` attribute.
It can be unset with:

[source]
----
: appendix-caption!:
----

Or set to a different value with
[source]
----
: appendix-caption: App
----

Appendix sections can be combined with subsections.
Example:

[source]
----
include::ex-appendix.adoc[tags=app]
----

The sections will be numbered as follows:

[source]
----
include::ex-appendix.adoc[tags=app-out]
----
Loading