diff --git a/content/basics.article b/content/basics.article index 6d3e849..5ec2689 100644 --- a/content/basics.article +++ b/content/basics.article @@ -4,7 +4,7 @@ Go 作者组 http://golang.org -* Packages +* 包 每个 Go 程序都是由包组成的。 @@ -187,13 +187,14 @@ Go 的基本类型有Basic types var i int j := i // j 也是一个 int -But when the right hand side contains an untyped numeric constant, the new variable may be an `int`, `float64`, or `complex128` depending on the precision of the constant: +但是当右边包含了未指名类型的数字常量时,新的变量就可能是 `int`、`float64` 或 `complex128`。 +这取决于常量的精度: i := 42 // int f := 3.142 // float64 g := 0.867 + 0.5i // complex128 -Try changing the initial value of `v` in the example code and observe how its type is affected. +尝试修改演示代码中 `v` 的初始值,并观察这是如何影响其类型的。 .play basics/type-inference.go diff --git a/content/methods.article b/content/methods.article index cbcd8a6..451d648 100644 --- a/content/methods.article +++ b/content/methods.article @@ -248,7 +248,7 @@ Go 标准库包含了这个接口的[[http://golang.org/search?q=Read#Global][ `At` 应当返回一个颜色;在这个例子里,在最后一个图片生成器的值 `v` 匹配 `color.RGBA{v, v, 255, 255}`。 -.play prog/tour/exercise-images.go +.play methods/exercise-images.go * 恭喜! diff --git a/content/moretypes.article b/content/moretypes.article index 5fd9660..9801cc3 100644 --- a/content/moretypes.article +++ b/content/moretypes.article @@ -1,6 +1,6 @@ 复杂类型: struct、slice 和 map。 学习如何基于已有类型定义新的类型:本课涵盖了结构体、数组、slice 和 map。 - + Go 作者组 http://golang.org diff --git a/static/js/values.js b/static/js/values.js index a354083..b3668b3 100644 --- a/static/js/values.js +++ b/static/js/values.js @@ -9,23 +9,23 @@ angular.module('tour.values', []). // List of modules with description and lessons in it. value('tableOfContents', [{ 'id': 'mechanics', - 'title': 'Using the tour', - 'description': '
Welcome to a tour of the Go programming language. The tour covers the most important features of the language, mainly:
', + 'title': '指南的使用', + 'description': '欢迎来到 Go 编程语言指南。本指南涵盖了该语言的大部分重要特性,主要包括:
', 'lessons': ['welcome'] }, { 'id': 'basics', - 'title': 'Basics', - 'description': 'The starting point, learn all the basics of the language.
Declaring variables, calling functions, and all the things you need to know before moving to the next lessons.
', + 'title': '基础', + 'description': '一开始,将学习关于语言的所有基础内容。
定义变量、调用函数、以及在你学习下一课之前所需要了解的全部内容。
', 'lessons': ['basics', 'flowcontrol', 'moretypes'] }, { 'id': 'methods', - 'title': 'Methods and interfaces', - 'description': 'Learn how to define methods on types, how to declare interfaces, and how to put everything together.
', + 'title': '方法和接口', + 'description': '学习如何为类型定义方法;如何定义接口;以及如何将所有内容贯通起来。
', 'lessons': ['methods'] }, { 'id': 'concurrency', - 'title': 'Concurrency', - 'description': 'Go provides concurrency features as part of the core language.
This module goes over goroutines and channels, and how they are used to implement different concurrency patterns.
', + 'title': '并发', + 'description': '作为语言的核心部分,Go 提供了并发的特性。
这一部分概览了 goroutein 和 channel,以及如何使用它们来实现不同的并发模式。
', 'lessons': ['concurrency'] }]). @@ -33,19 +33,19 @@ value('tableOfContents', [{ value('translation', { 'off': 'off', 'on': 'on', - 'syntax': 'Syntax-Highlighting', - 'lineno': 'Line-Numbers', - 'reset': 'Reset Slide', - 'format': 'Format Source Code', - 'kill': 'Kill Program', - 'run': 'Run', - 'compile': 'Compile and Run', - 'more': 'Options', - 'toc': 'Table of Contents', - 'prev': 'Previous', - 'next': 'Next', - 'waiting': 'Waiting for remote server...', - 'errcomm': 'Error communicating with remote server.', + 'syntax': '语法高亮', + 'lineno': '行号', + 'reset': '重置', + 'format': '格式化源代码', + 'kill': '杀死进程', + 'run': '运行', + 'compile': '编译并运行', + 'more': '选项', + 'toc': '目录', + 'prev': '向前', + 'next': '向后', + 'waiting': '等待远端服务器响应...', + 'errcomm': '与远端服务器通讯失败。', }). // Config for codemirror plugin diff --git a/static/partials/list.html b/static/partials/list.html index 7cf93cf..1fae062 100644 --- a/static/partials/list.html +++ b/static/partials/list.html @@ -2,7 +2,7 @@