diff --git a/src/levels/index.js b/src/levels/index.js index 92b6ad2b..7773bb3b 100644 --- a/src/levels/index.js +++ b/src/levels/index.js @@ -90,21 +90,25 @@ var sequenceInfo = exports.sequenceInfo = { tab: 'remote', displayName: { 'en_US': 'Push & Pull -- Git Remotes!', - 'de_DE': 'Push & Pull -- entfernte Repositorys' + 'de_DE': 'Push & Pull -- entfernte Repositorys', + 'zh_CN': 'Push & Pull -- Git Remotes!' }, about: { 'en_US': 'Time to share your 1\'s and 0\'s kids; coding just got social', - 'de_DE': 'Zeit Eure 1en und 0en zu teilen; Coding mit sozialer Komponente' + 'de_DE': 'Zeit Eure 1en und 0en zu teilen; Coding mit sozialer Komponente', + 'zh_CN': '是时候分享你的编码了' } }, remoteAdvanced: { tab: 'remote', displayName: { 'en_US': 'To Origin And Beyond -- Advanced Git Remotes!', - 'de_DE': 'Bis zum origin und noch weiter' + 'de_DE': 'Bis zum origin und noch weiter', + 'zh_CN': '关于origin 和 其它仓库 -- Git Gemotes 高级命令' }, about: { 'en_US': 'And you thought being a benevolent dictator would be fun...', + 'zh_CN': '做一名仁慈的独裁者会很有趣..', 'de_DE': 'Git Remotes für Fortgeschrittene' } }, diff --git a/src/levels/rampup/cherryPick.js b/src/levels/rampup/cherryPick.js index 38372bf2..597d7b20 100644 --- a/src/levels/rampup/cherryPick.js +++ b/src/levels/rampup/cherryPick.js @@ -8,11 +8,13 @@ exports.level = { "startTree": "{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\"},\"bugFix\":{\"target\":\"C3\",\"id\":\"bugFix\"},\"side\":{\"target\":\"C5\",\"id\":\"side\"},\"another\":{\"target\":\"C7\",\"id\":\"another\"}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C2\"],\"id\":\"C3\"},\"C4\":{\"parents\":[\"C1\"],\"id\":\"C4\"},\"C5\":{\"parents\":[\"C4\"],\"id\":\"C5\"},\"C6\":{\"parents\":[\"C1\"],\"id\":\"C6\"},\"C7\":{\"parents\":[\"C6\"],\"id\":\"C7\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}", "name": { "en_US": "Cherry-pick Intro", - "de_DE": "Einführung Cherry-picking" + "de_DE": "Einführung Cherry-picking", + "zh_CN": "Cherry-pick Intro" }, "hint": { "en_US": "git cherry-pick followed by commit names!", - "de_DE": "git cherry-pick gefolgt von Commit-Namen." + "de_DE": "git cherry-pick gefolgt von Commit-Namen.", + "zh_CN": "git cherry-pick 跟提交对句名" }, "startDialog": { "en_US": { @@ -72,6 +74,63 @@ exports.level = { } ] }, + "zh_CN": { + "childViews": [ + { + "type": "ModalAlert", + "options": { + "markdowns": [ + "## 转移工作区", + "", + "到现在我们已经学习了git的基础命令 -- commit, branch, checkout. 这些概念实现了git 90% 的功能, 同样也满足了开发者的主要需求 ", + "", + "然而, 剩余的10% 可能在处理复杂的工作流时(或者当你陷入困惑时), 非常的重要. 我们会在下一个概念中涉及'转移工作区', 换句话说, 这是开发者表达'我想要把这个工作放这里, 那个工作也放这里', 精确的说, 这是很灵活的方式 ", + "", + "看起来内容很多, 其实概念相当简单" + "Das klingt vielleicht nach einer Menge, aber es ist sehr einfach." + ] + } + }, + { + "type": "ModalAlert", + "options": { + "markdowns": [ + "## Git Cherry-pick", + "", + "本系列的第一个命令是`git cherry-pick`, 命令形式为: ", + "", + "* `git cherry-pick <...>`", + "", + "这是一种很直接的推进方式 -- 如果你想将一些提交复制到你当前的位置`HEAD`下面, 我个人喜欢`cherry-pick` 的原因是, 其概念非常简单 ", + "", + "Let's see a demo!", + ] + } + }, + { + "type": "GitDemonstrationView", + "options": { + "beforeMarkdowns": [ + "现在有一个仓库, 我们想将`side`分支下的工作复制到`master`分支, 我们可以通过`rebase`完成这一点(已经学过了哈), 但是这里我们想通过`cherry-pick`来完成." + ], + "afterMarkdowns": [ + "这是它啦, 我们需要的是提交对象`C2` 和 `C4` ,所以 git 将被它们抓取到当前分支下了. 就是这么简单!" + ], + "command": "git cherry-pick C2 C4", + "beforeCommand": "git checkout -b side; git commit; git commit; git commit; git checkout master; git commit;" + } + }, + { + "type": "ModalAlert", + "options": { + "markdowns": [ + "请完成这节测试, 只需要简单的将分支的工作复制到 master. 如果想看我们所需要的提交对象, 你可以打开虚拟目标窗口(`show goal`)", + "" + ] + } + } + ] + }, "de_DE": { "childViews": [ {