The ZouYu tool takes golang source code written in mandarin and translates keywords to english for compilation by the standard golang tooling.
This enables Golang programmers to program entirely in mandarin.
Help young chinese people learn to program in their native mandarin
go install "github.com/steele232/zouyu/zou"
- Install it (will be go gettable)
zou
takes all "zh_..." (e.g. "zh_main.go") files in the current directory and converts them to "en_..." files, which are then ready for compilation.- You can combine
zou
with go commands on bash like so:zou && go run .
orzou && go build .
. You can - [Not Started] (Create a Youtube/Youku video showing how to use it)
- [Complete] Make a way to translate and make compiler-ready source files from completely or mostly chinese source files
- [Complete]
- [In Progress] Traditional characters
- [In Progress] Builtin functions, types (Builtin package)
- [In Progress] Full Test Coverage (tests using all the keywords)
- [Not Started] Chinese README
- [Not Started] A few nice CLI features (Verbosity, Multiple Directories)
- [Not Started] Wrapper library around stdlib functions (including useful comments) so that we can use stdlib functions but still write in mandarin.
- [Not Started] Educational Resources to use while teaching Programming to young native Mandarin speakers. (Getting Started Guide. Guide for Teachers. Other Resources)
- I am working on linux and mac computers so far, so I don't know exactly how this will work on windows.
Here is a table of the Confidence levels of Translations between ZouYu keywords and original GoLang keywords:
Character(s) | Go Keyword | Confidence Level (%) | Links |
---|---|---|---|
"走" |
"go" | 100 | |
"包" |
"package" | 100 | |
"导入" |
"import" | 100 | |
"導入" |
"import" | 100 | |
"函数" |
"func" | 100 | 1 |
"函數" |
"func" | 100 | 1 |
"主要" |
"main" | 100 | |
"返回" |
"return" | 100 | 1, 2 |
"如果" |
"if" | 100 | |
"否则" |
"else" | 100 | |
"否則" |
"else" | 100 | |
"导出" |
"A" (to export) | 60 | This is kind of problematic |
"创建" |
"make" | 80 | 1 |
"创建" |
"make" | 80 | 1 |
"循环" |
"for" | 100 | 3 |
"循環" |
"for" | 100 | 3 |
"范围" |
"range" | 95 | |
"範圍" |
"range" | 95 | |
"终止" |
"break" | 95 | |
"終止" |
"break" | 95 | |
"继续" |
"continue" | 100 | |
"繼續" |
"continue" | 100 | |
"开关" |
"switch" | 80 | 6 |
"開關" |
"switch" | 80 | 6 |
"选择" |
"select" | 100 | 8 |
"選擇" |
"select" | 100 | 8 |
"假如" |
"case" | 90 | 9 |
"默认" |
"default" | 100 | 10 |
"默認" |
"default" | 100 | 10 |
"去到" |
"goto" | 95 | 11 |
"落下" |
"fallthrough" | 80 | 12 |
"推迟" |
"defer" | 95 | 13 |
"恐慌" |
"panic" | 100 | 14 |
"整数" |
"int" | 100 | |
"整數" |
"int" | 100 | |
"浮点数" |
"float" | 100 | 15 |
"浮點數" |
"float" | 100 | 15 |
"字符串" |
"string" | 100 | |
"字节" |
"byte" | 100 | |
"字節" |
"byte" | 100 | |
"无符号" |
"uint" (shorten to "u"?) | 50 | |
"無符號" |
"uint" (shorten to "u"?) | 50 | |
"常量" |
"const" | 100 | 16 |
"变量" |
"var" | 100 | 17, 1 |
"變量" |
"var" | 100 | 17, 1 |
"映射" |
"map" | 90 | 2 |
"管道" |
"chan" | 99 | 18 |
"结构体" |
"struct" | 100 | 15 |
"結構體" |
"struct" | 100 | 15 |
"类型" |
"type" | 100 | 19 |
"類型" |
"type" | 100 | 19 |
"接口" |
"interface" | 100 | 2, 1 |
PLEASE Feel free to help this project succeed by