Basic dialog intl support for level dialogs, Issue #42

This commit is contained in:
Peter Cottle 2013-02-23 13:32:45 -08:00
parent 2837315c7d
commit 2617357460
21 changed files with 1716 additions and 1388 deletions

View file

@ -4394,7 +4394,9 @@ var TIME = {
// useful for locks, etc
var GLOBAL = {
isAnimating: false
isAnimating: false,
// default locale, this changes
locale: 'en'
};
var VIEWPORT = {
@ -4443,12 +4445,21 @@ exports.VIEWPORT = VIEWPORT;
});
require.define("/src/js/util/index.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
var constants = require('../util/constants');
exports.isBrowser = function() {
var inBrowser = String(typeof window) !== 'undefined';
return inBrowser;
};
exports.getLocale = function() {
if (constants.GLOBAL.locale) {
return constants.GLOBAL.locale;
}
console.warn('No locale found...');
return 'en';
};
exports.splitTextCommand = function(value, func, context) {
func = _.bind(func, context);
_.each(value.split(';'), function(command, index) {
@ -6700,6 +6711,7 @@ var Q = require('q');
var util = require('../util');
var Main = require('../app');
var intl = require('../intl');
var Errors = require('../util/errors');
var Sandbox = require('../level/sandbox').Sandbox;
@ -6759,7 +6771,7 @@ var Level = Sandbox.extend({
if (this.level.startDialog && !this.testOption('noIntroDialog')) {
new MultiView(_.extend(
{},
this.level.startDialog,
intl.getStartDialog(this.level),
{ deferred: deferred }
));
return;
@ -7188,6 +7200,90 @@ var Level = Sandbox.extend({
exports.Level = Level;
exports.regexMap = regexMap;
});
require.define("/src/js/intl/index.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
var constants = require('../util/constants');
var util = require('../util');
var strings = require('../intl/strings').strings;
var str = exports.str = function(key, params) {
// this function takes a key like "error-branch-delete"
// and parameters like {branchName: 'bugFix', num: 3}.
//
// it sticks those into a translation string like:
// 'en': 'You can not delete the branch {branchName} because' +
// 'you are currently on that branch! This is error number + {num}'
//
// to produce:
//
// 'You can not delete the branch bugFix because you are currently on that branch!
// This is error number 3'
var locale = util.getLocale();
if (!strings[key]) {
console.warn('NO INTL support for key ' + key);
return 'NO INTL support for key ' + key;
}
if (!strings[key][locale]) {
if (key !== 'error-untranslated') {
return str('error-untranslated');
}
return 'No translation for that key ' + key;
}
// TODO - interpolation
return strings[key][locale];
};
var getStartDialog = exports.getStartDialog = function(level) {
if (!level || !level.startDialog) {
throw new Error('start dialog doesnt exist in that blob');
}
if (!level.startDialog.en) {
console.warn('WARNING!! This dialog does not have intl support: ', level);
}
var locale = util.getLocale();
if (level.startDialog[locale]) {
return level.startDialog[locale];
}
// we need to return english but add their locale error
var startCopy = _.clone(level.startDialog.en || level.startDialog);
var errorAlert = {
type: 'ModalAlert',
options: {
markdown: str('error-untranslated')
}
};
startCopy.childViews.unshift(errorAlert);
return startCopy;
};
});
require.define("/src/js/intl/strings.js",function(require,module,exports,__dirname,__filename,process,global){exports.strings = {
////////////////////////////////////////////////////////////////////////////
'error-untranslated-key': {
'__desc__': 'This error happens when we are trying to translate a specific key and the locale version is mission',
'__params__': {
'key': 'The name of the translation key that is missing'
},
'en': 'The translation for {key} does not exist yet :( Please hop on github and offer up a translation!'
},
////////////////////////////////////////////////////////////////////////////
'error-untranslated': {
'__desc__': 'The general error when we encounter a dialog that is not translated',
'en': 'This dialog or text is not yet translated in your locale :( Hop on github to aid in translation!'
}
};
});
require.define("/src/js/util/errors.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
@ -8202,7 +8298,7 @@ GitEngine.prototype.resolveID = function(idOrTarget) {
};
GitEngine.prototype.resolveRelativeRef = function(commit, relative) {
var regex = /([~^])(\d*)/g;
var regex = /([~\^])(\d*)/g;
var matches;
while (matches = regex.exec(relative)) {
@ -8211,9 +8307,8 @@ GitEngine.prototype.resolveRelativeRef = function(commit, relative) {
if (matches[1] == '^') {
next = commit.getParent(num-1);
}
else {
while(next && num--) {
} else {
while (next && num--) {
next = next.getParent(0);
}
}
@ -8243,7 +8338,7 @@ GitEngine.prototype.resolveStringRef = function(ref) {
// Attempt to split ref string into a reference and a string of ~ and ^ modifiers.
var startRef = null;
var relative = null;
var regex = /^([a-zA-Z0-9]+)(([~^]\d*)*)/;
var regex = /^([a-zA-Z0-9]+)(([~\^]\d*)*)/;
var matches = regex.exec(ref);
if (matches) {
startRef = matches[1];
@ -9241,10 +9336,11 @@ var Commit = Backbone.Model.extend({
},
getParent: function(parentNum) {
if (this && this.attributes && this.attributes.parents)
if (this && this.attributes && this.attributes.parents) {
return this.attributes.parents[parentNum];
else
} else {
return null;
}
},
isMainParent: function(parent) {
@ -17127,6 +17223,7 @@ require.define("/levels/intro/1.js",function(require,module,exports,__dirname,__
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -17172,6 +17269,7 @@ require.define("/levels/intro/1.js",function(require,module,exports,__dirname,__
}
]
}
}
};
});
@ -17185,6 +17283,7 @@ require.define("/levels/intro/2.js",function(require,module,exports,__dirname,__
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -17262,6 +17361,7 @@ require.define("/levels/intro/2.js",function(require,module,exports,__dirname,__
}
]
}
}
};
});
@ -17274,6 +17374,7 @@ require.define("/levels/intro/3.js",function(require,module,exports,__dirname,__
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -17342,6 +17443,7 @@ require.define("/levels/intro/3.js",function(require,module,exports,__dirname,__
}
]
}
}
};
});
@ -17355,6 +17457,7 @@ require.define("/levels/intro/4.js",function(require,module,exports,__dirname,__
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -17421,6 +17524,7 @@ require.define("/levels/intro/4.js",function(require,module,exports,__dirname,__
}
]
}
}
};
});
@ -17432,6 +17536,7 @@ require.define("/levels/intro/5.js",function(require,module,exports,__dirname,__
"name": "Reversing Changes in Git",
"hint": "",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -17494,6 +17599,7 @@ require.define("/levels/intro/5.js",function(require,module,exports,__dirname,__
}
]
}
}
};
});
@ -17509,6 +17615,7 @@ require.define("/levels/rebase/1.js",function(require,module,exports,__dirname,_
"name": "Rebasing over 9000 times",
"hint": "Remember, the most efficient way might be to only update master at the end...",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -17526,6 +17633,7 @@ require.define("/levels/rebase/1.js",function(require,module,exports,__dirname,_
}
]
}
}
};
});
@ -17541,6 +17649,7 @@ require.define("/levels/rebase/2.js",function(require,module,exports,__dirname,_
"name": "Branch Spaghetti",
"hint": "There are multiple ways to solve this! Cherry-pick is the easy / long way, but rebase -i can be a shortcut",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -17560,6 +17669,7 @@ require.define("/levels/rebase/2.js",function(require,module,exports,__dirname,_
}
]
}
}
};
});
@ -17575,6 +17685,7 @@ require.define("/levels/mixed/1.js",function(require,module,exports,__dirname,__
"name": "Grabbing Just 1 Commit",
"hint": "Remember, interactive rebase or cherry-pick is your friend here",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -17615,6 +17726,7 @@ require.define("/levels/mixed/1.js",function(require,module,exports,__dirname,__
}
]
}
}
};
});
@ -17631,6 +17743,7 @@ require.define("/levels/mixed/2.js",function(require,module,exports,__dirname,__
"name": "Juggling Commits",
"hint": "The first command is git rebase -i HEAD~2",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -17669,6 +17782,7 @@ require.define("/levels/mixed/2.js",function(require,module,exports,__dirname,__
}
]
}
}
};
@ -17685,6 +17799,7 @@ require.define("/levels/mixed/3.js",function(require,module,exports,__dirname,__
"name": "Juggling Commits #2",
"hint": "Don't forget to forward master to the updated changes!",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -17725,6 +17840,7 @@ require.define("/levels/mixed/3.js",function(require,module,exports,__dirname,__
}
]
}
}
};
});
@ -19903,7 +20019,7 @@ GitEngine.prototype.resolveID = function(idOrTarget) {
};
GitEngine.prototype.resolveRelativeRef = function(commit, relative) {
var regex = /([~^])(\d*)/g;
var regex = /([~\^])(\d*)/g;
var matches;
while (matches = regex.exec(relative)) {
@ -19912,9 +20028,8 @@ GitEngine.prototype.resolveRelativeRef = function(commit, relative) {
if (matches[1] == '^') {
next = commit.getParent(num-1);
}
else {
while(next && num--) {
} else {
while (next && num--) {
next = next.getParent(0);
}
}
@ -19944,7 +20059,7 @@ GitEngine.prototype.resolveStringRef = function(ref) {
// Attempt to split ref string into a reference and a string of ~ and ^ modifiers.
var startRef = null;
var relative = null;
var regex = /^([a-zA-Z0-9]+)(([~^]\d*)*)/;
var regex = /^([a-zA-Z0-9]+)(([~\^]\d*)*)/;
var matches = regex.exec(ref);
if (matches) {
startRef = matches[1];
@ -20942,10 +21057,11 @@ var Commit = Backbone.Model.extend({
},
getParent: function(parentNum) {
if (this && this.attributes && this.attributes.parents)
if (this && this.attributes && this.attributes.parents) {
return this.attributes.parents[parentNum];
else
} else {
return null;
}
},
isMainParent: function(parent) {
@ -21210,6 +21326,92 @@ exports.TreeCompare = TreeCompare;
});
require("/src/js/git/treeCompare.js");
require.define("/src/js/intl/index.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
var constants = require('../util/constants');
var util = require('../util');
var strings = require('../intl/strings').strings;
var str = exports.str = function(key, params) {
// this function takes a key like "error-branch-delete"
// and parameters like {branchName: 'bugFix', num: 3}.
//
// it sticks those into a translation string like:
// 'en': 'You can not delete the branch {branchName} because' +
// 'you are currently on that branch! This is error number + {num}'
//
// to produce:
//
// 'You can not delete the branch bugFix because you are currently on that branch!
// This is error number 3'
var locale = util.getLocale();
if (!strings[key]) {
console.warn('NO INTL support for key ' + key);
return 'NO INTL support for key ' + key;
}
if (!strings[key][locale]) {
if (key !== 'error-untranslated') {
return str('error-untranslated');
}
return 'No translation for that key ' + key;
}
// TODO - interpolation
return strings[key][locale];
};
var getStartDialog = exports.getStartDialog = function(level) {
if (!level || !level.startDialog) {
throw new Error('start dialog doesnt exist in that blob');
}
if (!level.startDialog.en) {
console.warn('WARNING!! This dialog does not have intl support: ', level);
}
var locale = util.getLocale();
if (level.startDialog[locale]) {
return level.startDialog[locale];
}
// we need to return english but add their locale error
var startCopy = _.clone(level.startDialog.en || level.startDialog);
var errorAlert = {
type: 'ModalAlert',
options: {
markdown: str('error-untranslated')
}
};
startCopy.childViews.unshift(errorAlert);
return startCopy;
};
});
require("/src/js/intl/index.js");
require.define("/src/js/intl/strings.js",function(require,module,exports,__dirname,__filename,process,global){exports.strings = {
////////////////////////////////////////////////////////////////////////////
'error-untranslated-key': {
'__desc__': 'This error happens when we are trying to translate a specific key and the locale version is mission',
'__params__': {
'key': 'The name of the translation key that is missing'
},
'en': 'The translation for {key} does not exist yet :( Please hop on github and offer up a translation!'
},
////////////////////////////////////////////////////////////////////////////
'error-untranslated': {
'__desc__': 'The general error when we encounter a dialog that is not translated',
'en': 'This dialog or text is not yet translated in your locale :( Hop on github to aid in translation!'
}
};
});
require("/src/js/intl/strings.js");
require.define("/src/js/level/arbiter.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
var Backbone = require('backbone');
@ -21781,6 +21983,7 @@ var Q = require('q');
var util = require('../util');
var Main = require('../app');
var intl = require('../intl');
var Errors = require('../util/errors');
var Sandbox = require('../level/sandbox').Sandbox;
@ -21840,7 +22043,7 @@ var Level = Sandbox.extend({
if (this.level.startDialog && !this.testOption('noIntroDialog')) {
new MultiView(_.extend(
{},
this.level.startDialog,
intl.getStartDialog(this.level),
{ deferred: deferred }
));
return;
@ -23214,7 +23417,9 @@ var TIME = {
// useful for locks, etc
var GLOBAL = {
isAnimating: false
isAnimating: false,
// default locale, this changes
locale: 'en'
};
var VIEWPORT = {
@ -23492,12 +23697,21 @@ exports.EventBaton = EventBaton;
require("/src/js/util/eventBaton.js");
require.define("/src/js/util/index.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
var constants = require('../util/constants');
exports.isBrowser = function() {
var inBrowser = String(typeof window) !== 'undefined';
return inBrowser;
};
exports.getLocale = function() {
if (constants.GLOBAL.locale) {
return constants.GLOBAL.locale;
}
console.warn('No locale found...');
return 'en';
};
exports.splitTextCommand = function(value, func, context) {
func = _.bind(func, context);
_.each(value.split(';'), function(command, index) {
@ -28644,6 +28858,7 @@ require.define("/src/levels/intro/1.js",function(require,module,exports,__dirnam
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -28689,6 +28904,7 @@ require.define("/src/levels/intro/1.js",function(require,module,exports,__dirnam
}
]
}
}
};
});
@ -28703,6 +28919,7 @@ require.define("/src/levels/intro/2.js",function(require,module,exports,__dirnam
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -28780,6 +28997,7 @@ require.define("/src/levels/intro/2.js",function(require,module,exports,__dirnam
}
]
}
}
};
});
require("/src/levels/intro/2.js");
@ -28793,6 +29011,7 @@ require.define("/src/levels/intro/3.js",function(require,module,exports,__dirnam
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -28861,6 +29080,7 @@ require.define("/src/levels/intro/3.js",function(require,module,exports,__dirnam
}
]
}
}
};
});
@ -28875,6 +29095,7 @@ require.define("/src/levels/intro/4.js",function(require,module,exports,__dirnam
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -28941,6 +29162,7 @@ require.define("/src/levels/intro/4.js",function(require,module,exports,__dirnam
}
]
}
}
};
});
@ -28953,6 +29175,7 @@ require.define("/src/levels/intro/5.js",function(require,module,exports,__dirnam
"name": "Reversing Changes in Git",
"hint": "",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -29015,6 +29238,7 @@ require.define("/src/levels/intro/5.js",function(require,module,exports,__dirnam
}
]
}
}
};
});
@ -29031,6 +29255,7 @@ require.define("/src/levels/mixed/1.js",function(require,module,exports,__dirnam
"name": "Grabbing Just 1 Commit",
"hint": "Remember, interactive rebase or cherry-pick is your friend here",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -29071,6 +29296,7 @@ require.define("/src/levels/mixed/1.js",function(require,module,exports,__dirnam
}
]
}
}
};
});
@ -29088,6 +29314,7 @@ require.define("/src/levels/mixed/2.js",function(require,module,exports,__dirnam
"name": "Juggling Commits",
"hint": "The first command is git rebase -i HEAD~2",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -29126,6 +29353,7 @@ require.define("/src/levels/mixed/2.js",function(require,module,exports,__dirnam
}
]
}
}
};
@ -29143,6 +29371,7 @@ require.define("/src/levels/mixed/3.js",function(require,module,exports,__dirnam
"name": "Juggling Commits #2",
"hint": "Don't forget to forward master to the updated changes!",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -29183,6 +29412,7 @@ require.define("/src/levels/mixed/3.js",function(require,module,exports,__dirnam
}
]
}
}
};
});
@ -29199,6 +29429,7 @@ require.define("/src/levels/rebase/1.js",function(require,module,exports,__dirna
"name": "Rebasing over 9000 times",
"hint": "Remember, the most efficient way might be to only update master at the end...",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -29216,6 +29447,7 @@ require.define("/src/levels/rebase/1.js",function(require,module,exports,__dirna
}
]
}
}
};
});
@ -29232,6 +29464,7 @@ require.define("/src/levels/rebase/2.js",function(require,module,exports,__dirna
"name": "Branch Spaghetti",
"hint": "There are multiple ways to solve this! Cherry-pick is the easy / long way, but rebase -i can be a shortcut",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -29251,6 +29484,7 @@ require.define("/src/levels/rebase/2.js",function(require,module,exports,__dirna
}
]
}
}
};
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
build/bundle.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta charset="utf-8">
<meta name="viewport" content="width=800, initial-scale=0.25">
<title>Learn Git Branching</title>
<meta name="author" content="Peter Cottle">
@ -409,7 +409,7 @@
For a much easier time perusing the source, see the individual files at:
https://github.com/pcottle/learnGitBranching
-->
<script src="build/bundle.min.ae39176e.js"></script>
<script src="build/bundle.min.614fe439.js"></script>
<!-- The advantage of github pages: super-easy, simple, slick static hostic.
The downside? No raw logs to parse for analytics, so I have to include

View file

@ -622,7 +622,7 @@ GitEngine.prototype.resolveID = function(idOrTarget) {
};
GitEngine.prototype.resolveRelativeRef = function(commit, relative) {
var regex = /([~^])(\d*)/g;
var regex = /([~\^])(\d*)/g;
var matches;
while (matches = regex.exec(relative)) {
@ -631,9 +631,8 @@ GitEngine.prototype.resolveRelativeRef = function(commit, relative) {
if (matches[1] == '^') {
next = commit.getParent(num-1);
}
else {
while(next && num--) {
} else {
while (next && num--) {
next = next.getParent(0);
}
}
@ -663,7 +662,7 @@ GitEngine.prototype.resolveStringRef = function(ref) {
// Attempt to split ref string into a reference and a string of ~ and ^ modifiers.
var startRef = null;
var relative = null;
var regex = /^([a-zA-Z0-9]+)(([~^]\d*)*)/;
var regex = /^([a-zA-Z0-9]+)(([~\^]\d*)*)/;
var matches = regex.exec(ref);
if (matches) {
startRef = matches[1];
@ -1661,10 +1660,11 @@ var Commit = Backbone.Model.extend({
},
getParent: function(parentNum) {
if (this && this.attributes && this.attributes.parents)
if (this && this.attributes && this.attributes.parents) {
return this.attributes.parents[parentNum];
else
} else {
return null;
}
},
isMainParent: function(parent) {

62
src/js/intl/index.js Normal file
View file

@ -0,0 +1,62 @@
var _ = require('underscore');
var constants = require('../util/constants');
var util = require('../util');
var strings = require('../intl/strings').strings;
var str = exports.str = function(key, params) {
// this function takes a key like "error-branch-delete"
// and parameters like {branchName: 'bugFix', num: 3}.
//
// it sticks those into a translation string like:
// 'en': 'You can not delete the branch {branchName} because' +
// 'you are currently on that branch! This is error number + {num}'
//
// to produce:
//
// 'You can not delete the branch bugFix because you are currently on that branch!
// This is error number 3'
var locale = util.getLocale();
if (!strings[key]) {
console.warn('NO INTL support for key ' + key);
return 'NO INTL support for key ' + key;
}
if (!strings[key][locale]) {
if (key !== 'error-untranslated') {
return str('error-untranslated');
}
return 'No translation for that key ' + key;
}
// TODO - interpolation
return strings[key][locale];
};
var getStartDialog = exports.getStartDialog = function(level) {
if (!level || !level.startDialog) {
throw new Error('start dialog doesnt exist in that blob');
}
if (!level.startDialog.en) {
console.warn('WARNING!! This dialog does not have intl support: ', level);
}
var locale = util.getLocale();
if (level.startDialog[locale]) {
return level.startDialog[locale];
}
// we need to return english but add their locale error
var startCopy = _.clone(level.startDialog.en || level.startDialog);
var errorAlert = {
type: 'ModalAlert',
options: {
markdown: str('error-untranslated')
}
};
startCopy.childViews.unshift(errorAlert);
return startCopy;
};

View file

@ -4,6 +4,7 @@ var Q = require('q');
var util = require('../util');
var Main = require('../app');
var intl = require('../intl');
var Errors = require('../util/errors');
var Sandbox = require('../level/sandbox').Sandbox;
@ -63,7 +64,7 @@ var Level = Sandbox.extend({
if (this.level.startDialog && !this.testOption('noIntroDialog')) {
new MultiView(_.extend(
{},
this.level.startDialog,
intl.getStartDialog(this.level),
{ deferred: deferred }
));
return;

View file

@ -7,7 +7,9 @@ var TIME = {
// useful for locks, etc
var GLOBAL = {
isAnimating: false
isAnimating: false,
// default locale, this changes
locale: 'en'
};
var VIEWPORT = {

View file

@ -1,10 +1,19 @@
var _ = require('underscore');
var constants = require('../util/constants');
exports.isBrowser = function() {
var inBrowser = String(typeof window) !== 'undefined';
return inBrowser;
};
exports.getLocale = function() {
if (constants.GLOBAL.locale) {
return constants.GLOBAL.locale;
}
console.warn('No locale found...');
return 'en';
};
exports.splitTextCommand = function(value, func, context) {
func = _.bind(func, context);
_.each(value.split(';'), function(command, index) {

View file

@ -8,6 +8,7 @@ exports.level = {
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -53,4 +54,5 @@ exports.level = {
}
]
}
}
};

View file

@ -7,6 +7,7 @@ exports.level = {
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -84,4 +85,5 @@ exports.level = {
}
]
}
}
};

View file

@ -7,6 +7,7 @@ exports.level = {
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -75,4 +76,5 @@ exports.level = {
}
]
}
}
};

View file

@ -7,6 +7,7 @@ exports.level = {
"git revert": true
},
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -73,4 +74,5 @@ exports.level = {
}
]
}
}
};

View file

@ -5,6 +5,7 @@ exports.level = {
"name": "Reversing Changes in Git",
"hint": "",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -67,4 +68,5 @@ exports.level = {
}
]
}
}
};

View file

@ -9,6 +9,7 @@ exports.level = {
"name": "Grabbing Just 1 Commit",
"hint": "Remember, interactive rebase or cherry-pick is your friend here",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -49,4 +50,5 @@ exports.level = {
}
]
}
}
};

View file

@ -10,6 +10,7 @@ exports.level = {
"name": "Juggling Commits",
"hint": "The first command is git rebase -i HEAD~2",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -48,5 +49,6 @@ exports.level = {
}
]
}
}
};

View file

@ -9,6 +9,7 @@ exports.level = {
"name": "Juggling Commits #2",
"hint": "Don't forget to forward master to the updated changes!",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -49,4 +50,5 @@ exports.level = {
}
]
}
}
};

View file

@ -9,6 +9,7 @@ exports.level = {
"name": "Rebasing over 9000 times",
"hint": "Remember, the most efficient way might be to only update master at the end...",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -26,4 +27,5 @@ exports.level = {
}
]
}
}
};

View file

@ -9,6 +9,7 @@ exports.level = {
"name": "Branch Spaghetti",
"hint": "There are multiple ways to solve this! Cherry-pick is the easy / long way, but rebase -i can be a shortcut",
"startDialog": {
"en": {
"childViews": [
{
"type": "ModalAlert",
@ -28,4 +29,5 @@ exports.level = {
}
]
}
}
};

View file

@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta charset="utf-8">
<meta name="viewport" content="width=800, initial-scale=0.25">
<title>Learn Git Branching</title>
<meta name="author" content="Peter Cottle">