Skip to content

Commit

Permalink
fixed some miss-translating phrases
Browse files Browse the repository at this point in the history
  • Loading branch information
mikespook committed Oct 15, 2014
1 parent ff78108 commit b600cb7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions ex-basics/src/for-arr.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
import "fmt"

func main() {
var arr [10]int |\coderemark{Create an array with 10 elements}|
var arr [10]int |\coderemark{创建一个有 10 个元素的数组}|
for i := 0; i < 10; i++ {
arr[i] = i |\coderemark{Fill it one by one}|
arr[i] = i |\coderemark{一个一个填充它们}|
}
fmt.Printf("%v", arr) |\coderemark{With \%v Go prints the value for us}|
fmt.Printf("%v", arr) |\coderemark{利用 \%v Go 可以将其中的值打印出来}|
}
4 changes: 2 additions & 2 deletions ex-basics/src/for.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import "fmt"

func main() {
for i := 0; i < 10; i++ { |\coderemark{See page %
\pageref{sec:for}}|
for i := 0; i < 10; i++ { |\coderemark{参阅第 %
\pageref{sec:for} }|
fmt.Printf("%d\n", i)
}
}
2 changes: 1 addition & 1 deletion ex-basics/src/string1.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ func main() {
str := "A"
for i := 0; i < 100; i++ {
fmt.Printf("%s\n", str)
str = str + "A" |\coderemark{String concatenation}|
str = str + "A" |\coderemark{连接字符串}|
}
}
6 changes: 3 additions & 3 deletions ex-basics/src/stringrev.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import "fmt"

func main() {
s := "foobar"
a := []rune(s) |\coderemark{Again a conversion}|
a := []rune(s) |\coderemark{转换}|
for i, j := 0, len(a)-1; i < j; i, j = i+1, j-1 {
a[i], a[j] = a[j], a[i] |\coderemark{Parallel assignment}|
a[i], a[j] = a[j], a[i] |\coderemark{并列赋值}|
}
fmt.Printf("%s\n", string(a)) |\coderemark{Convert it back}|
fmt.Printf("%s\n", string(a)) |\coderemark{转换回字符串}|
}

0 comments on commit b600cb7

Please sign in to comment.