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

Add Chinese website translation. #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 24 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ GEM
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
concurrent-ruby (1.1.3)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.5)
ffi (1.9.23)
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
ffi (1.9.25)
ffi (1.9.25-x64-mingw32)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.7.0)
jekyll (3.7.2)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.5)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
Expand All @@ -27,37 +31,42 @@ GEM
safe_yaml (~> 1.0)
jekyll-redirect-from (0.14.0)
jekyll (~> 3.3)
jekyll-sass-converter (1.3.0)
sass (~> 3.2)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-sitemap (1.2.0)
jekyll (~> 3.3)
jekyll-watch (2.0.0)
jekyll-watch (2.1.2)
listen (~> 3.0)
kramdown (1.14.0)
liquid (4.0.0)
kramdown (1.17.0)
liquid (4.0.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.5)
pathutil (0.16.1)
mercenary (0.3.6)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.0.2)
public_suffix (3.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (2.0.2)
rouge (3.3.0)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.4.23)
sass (3.7.2)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)

PLATFORMS
ruby
x64-mingw32

DEPENDENCIES
jekyll (~> 3.1)
jekyll-redirect-from
jekyll-sitemap

BUNDLED WITH
1.16.3
1.17.2
1 change: 1 addition & 0 deletions _includes/lang_list.html
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<li><a href="/en/">English</a></li>
<li><a href="/zh/">中文</a></li>
31 changes: 31 additions & 0 deletions _includes/nav_zh.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">导航开关</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/zh">
<img class="brand" alt="Mu Logo" src="/img/brand.png"/>
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="/zh/download">下载</a></li>
<li><a href="/zh/about">关于</a></li>
<li><a href="/zh/tutorials">教程</a></li>
<li><a href="/zh/howto">操作指南</a></li>
<li><a href="/zh/discuss">讨论</a></li>
<li><a href="/zh/developers">开发者</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">语言<span class="caret"></span></a>
<ul class="dropdown-menu">
{% include lang_list.html %}
</ul>
</li>
</ul>
</div>
</div>
</nav>
70 changes: 70 additions & 0 deletions _includes/themes/mu/zh.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="norton-safeweb-site-verification" content="1zcsne-iemsx3stdc2wt4xq0-020puow4-uj5bjstzudqn8zu406csvp-qy2d31gces1c9lz-k-hb7cj74zh-aouf0-jmzv39rdsvb1i-z3o6e7pllxmkbkqhcw8m629" />

<title>{{ page.title }}</title>
{% if page.description %}<meta name="description" content="{{ page.description }}">{% endif %}
<meta name="author" content="{{ site.author.name }}">

<!-- Enable responsive viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Bootstrap styles -->
<link href="{{ ASSET_PATH }}/css/bootstrap.min.css" rel="stylesheet">
<!-- Optional theme -->
<link href="{{ ASSET_PATH }}/css/bootstrap-theme.min.css" rel="stylesheet">
<!-- Sticky Footer -->
<link href="{{ ASSET_PATH }}/css/bs-sticky-footer.css" rel="stylesheet">

<!-- Custom styles -->
<link href="{{ ASSET_PATH }}/css/style.css" rel="stylesheet" type="text/css" media="all">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->

<!-- Fav and touch icons -->
<!-- Update these with your own images
<link rel="shortcut icon" href="images/favicon.ico">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
-->
</head>

<body>
{% if page.i18n %}
{% include nav_{{ page.i18n }}.html %}
{% else %}
{% include nav_en.html %}
{% endif %}
<div class="container">
{{ content }}
</div>

<div id="footer" >
<div class="container footer text-center">
<p>&copy; {{ site.time | date: '%Y' }}
<a href="http://ntoll.org/" target="_blank">Nicholas H.Tollervey</a>。
汉化:<a href="https://johnguan.cn/" target="_blank">管宁川(John Guan)</a>。
<span class="glyphicon glyphicon-heart" aria-hidden="true" style="color: #c93827;"></span>
没有<a href="/zh/thanks">这些人</a>就不会有 Mu 。
</p>
<p><a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/80x15.png" /></a>
本站采用 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a> 进行许可。
</p>
</div>
</div>
<!-- Latest compiled and minified JavaScript, requires jQuery 1.x (2.x not supported in IE8) -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="{{ ASSET_PATH }}/js/bootstrap.min.js"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions _layouts/zh.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
theme :
name : mu
---
{% include JB/setup %}
{% include themes/mu/zh.html %}
41 changes: 41 additions & 0 deletions zh/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: zh
title: 关于 Mu
i18n: zh
---
<h1>关于 Mu</h1>
<p class="lead">Mu是一个为初学者打造的Python代码编辑器。
它的诞生离不开广大教师和学习者提供的<a href="/zh/discuss">反馈</a>。</p>

<div class="row text-center">
<a class="btn btn-lg btn-success" href="/zh/download" role="button">下载</a>
<a class="btn btn-lg btn-primary" href="/zh/tutorials" role="button">教程</a>
<a class="btn btn-lg btn-info" href="/zh/howto" role="button">操作指南</a>
</div>
<img src="/img/logo.png" alt="Mu's world" class="img-responsive center-block img-rounded"/>


<div class="row marketing">
<div class="col-lg-6">
<h4>少即是多。</h4>
<p>Mu 只有最必要的功能,所以用户不会受令人困惑的界面的干扰。</p>
<h4>踏上最小阻力之路。</h4>
<p>无论任务是什么,总有一种显而易见的方法可以用 Mu 做到。</p>
</div>

<div class="col-lg-6">
<h4>保持简单。</h4>
<p>学习 Mu 既快速又简单~ 复杂阻碍了新手程序员迈出第一步。</p>
<h4>玩得开心!</h4>
<p>学习应该激发乐趣~ Mu帮助学习者快速创造并测试代码。</p>
</div>
</div>

<img src="/img/en/kay_quote.jpg" alt="Alan Kay" class="img-responsive center-block img-rounded"/>
<p class="text-center">
<a href="https://commons.wikimedia.org/wiki/File:Alan_Kay_(3097597186).jpg">图片来源</a>
</p>

<p class="lead">引用来<a href="https://zh.wikipedia.org/wiki/艾伦·凯">艾伦·凯</a> 的
<a href="https://www.fastcompany.com/40435064/what-alan-kay-thinks-about-the-iphone-and-technology-now">访谈</a>中
关于学习编程的部分。描绘了Mu的愿景:Mu渴望成为“真实的东西”,成为初学者程序员在Python中迈出第一步的开发环境。</p>
18 changes: 18 additions & 0 deletions zh/developers.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: zh
title: Mu 开发
i18n: zh
---

<h1>Mu 开发</h1>

<p>你愿意为 Mu 的发展做出贡献吗?
(请不要认为这只是有经验的开发者的事情, 有很多方法可以为 Mu 做出贡献, 不论你的经验水平或技能水平如何)。</p>

<p>我们的技术文档托管在很棒的 <a href="https://mu.readthedocs.io/en/latest/" target="_blank">Read the Docs (http://mu.readthedocs.io/)</a> 平台上。
它不仅包含了为 Mu 做出代码贡献所需的详细信息, 而且还介绍了您可以做出贡献的许多其他方式 (包括对本网站进行更新)。
最后, 它为我们的流程和对你可以为Mu做出的各种贡献的期望提供了指导。</p>

<p>我们的源代码托管在 <a href="https://github.com/mu-editor/mu">GitHub</a> 上。</p>

<p>如果有疑问,请直接在 <a href="/zh/discuss">讨论区中提问</a>,有人会为你提出解答。</p>
30 changes: 30 additions & 0 deletions zh/discuss.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: zh
title: Mu 讨论
i18n: zh
---

<h1>Mu 讨论</h1>

<p>也许你有一个问题或者不确定如何用 Mu 做点什么?与其他Mu用户交流心得、分享知识和互相学习是非常好的做法。
在一个好的环境中讨论这些事情是取得进步、结交朋友和取得成功的好方法。
简而言之,Mu是一个以社区为重点的项目,我们创建了一个可以让大家聚集在一起的在线讨论社区。</p>

<p>无论你的年龄、性别、宗教、种族或性取向如何,欢迎贡献,在这里不会有任何偏见。
你可能会想:“这说的应该不是我”,但我们说的就是你!</p>

<p>我们的主要讨论平台由一个名为 "Gitter" 的服务提供, 您可以通过点击下面的按钮或访问来注册并与社区联系: <a href="https://gitter.im/mu-editor/general" target="_blank">https://gitter.im/mu-editor/general</a></p>
<p><a href="https://gitter.im/mu-editor/general" target="_blank" class="btn btn-primary btn-lg">进入Gitter讨论版</a></p>

<div class="alert alert-info" role="alert">
<h4><strong>社区行为</strong></h4>
<p>我们希望贡献者能够遵循Python软件基金会
<a href="https://www.python.org/psf/codeofconduct/" target="_blank"><strong>行为准则</strong></a>。</p>

<p>对于那些不遵守行为准则精神的人,我们会毫不犹豫地发出明确警告,如果没有收敛,也会采取封禁措施。
我们希望我们的社区成为一个安全、热情和友好的地方。
如果出现与行为准则有悖的情况,我们将尽力以谨慎、同情和公平的方式对所有有关方面采取行动。</p>
</div>



91 changes: 91 additions & 0 deletions zh/download.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
layout: zh
title: 下载 Mu
i18n: zh
---

# 下载 Mu

安装Mu有很多种方法。 最简单的是下载适用于 Windows 或 macOS 的官方安装程序。
如果你发现因为你正在使用的计算机被限制权限而无法安装 Mu 的话,你应该试试 PortaMu ,这是一种在 Windows 或 macOS 上从U盘运行 Mu 的办法。
你也可以使用 Python 的内置`pip`工具来安装。
一些 Linux 发行版已经有 Mu 的包了(你应该使用你的系统的包管理器来安装它)。
最后,如果您使用的是 Raspbian(适用于 Raspberry Pi 的Linux 版本),则可以作为一个软件包来安装Mu。

如果你是一个专业的开发者,你可以在[GitHub](https://github.com/mu-editor/mu)上找到源代码。

<div class="media">
<div class="media-left">
<img src="/img/windows_logo.png" alt="Windows Logo" class="media-object">
</div>
<div class="media-body">
<h4 class="media-heading">Windows 安装包</h4>
<p><a href="https://github.com/mu-editor/mu/releases/download/1.0.1/mu-editor_1.0.1_win32.exe" class="btn btn-primary" role="button">32位</a>
<a href="https://github.com/mu-editor/mu/releases/download/1.0.1/mu-editor_1.0.1_win64.exe" class="btn btn-primary" role="button">64位</a>
<a href="/en/howto/install_windows" class="btn btn-default" role="button">安装指南</a></p>
</div>
</div>

<hr/>

<div class="media">
<div class="media-left">
<img src="/img/apple_logo.png" alt="Apple Logo" class="media-object">
</div>
<div class="media-body">
<h4 class="media-heading">macOS 安装包</h4>
<p><a href="https://github.com/mu-editor/mu/releases/download/1.0.1/mu-editor_1.0.1_osx.dmg" class="btn btn-primary" role="button">下载</a>
<a href="/en/howto/install_macos" class="btn btn-default" role="button">安装指南</a></p>
</div>
</div>

<hr/>

<div class="media">
<div class="media-left">
<img src="/img/portamu.png" alt="PortaMu Logo" class="media-object">
</div>
<div class="media-body">
<h4 class="media-heading">PortaMu - 从U盘运行Mu</h4>
<p><a href="https://github.com/mu-editor/mu/releases/download/1.0.1/portamu_1.0.1_win32.zip" class="btn btn-primary" role="button">Windows 32位</a>
<a href="https://github.com/mu-editor/mu/releases/download/1.0.1/portamu_1.0.1_win64.zip" class="btn btn-primary" role="button">Windows 64位</a>
<a href="https://github.com/mu-editor/mu/releases/download/1.0.1/mu-editor_1.0.1_osx.dmg" class="btn btn-primary" role="button">macOS</a>
<a href="/en/howto/use_portamu" class="btn btn-default" role="button">安装指南</a></p>
</div>
</div>

<hr/>

<div class="media">
<div class="media-left">
<img src="/img/python_logo.png" alt="Python Logo" class="media-object">
</div>
<div class="media-body">
<h4 class="media-heading">Python 包</h4>
<p><a href="/en/howto/install_with_python" class="btn btn-default" role="button">安装指南</a></p>
</div>
</div>

<hr/>

<div class="media">
<div class="media-left">
<img src="/img/rpi_logo.png" alt="Raspberry Pi Logo" class="media-object">
</div>
<div class="media-body">
<h4 class="media-heading">Raspbian</h4>
<p><a href="/en/howto/install_raspberry_pi" class="btn btn-default" role="button">安装指南</a></p>
</div>
</div>

<br/>

<div class="panel panel-danger">
<div class="panel-heading"><h3 class="panel-title">Linux 用户请注意!</h3></div>
<div class="panel-body">
<p>在Linux上,为了使Mu能够与基于MicroPython的设备一起工作,
您需要确保将自己添加到正确的权限组
(通常是 <code>dialout</code> 或者 <code>uucp</code> 权限组). Also make
同时也请确保您的系统会自动挂载这些设备,或者记得手动挂载。</p>
</div>
</div>
11 changes: 0 additions & 11 deletions zh/help/1.0.html

This file was deleted.

Loading