Fix more typo, ' and some word

This commit is contained in:
Hongarc 2018-11-30 22:06:42 +07:00
parent e8c8f8975a
commit 41bb6d1bd7
14 changed files with 35 additions and 38 deletions

View file

@ -14,7 +14,7 @@ var indexFile = fs.readFileSync('src/template.index.html').toString();
var indexTemplate = _.template(indexFile);
/**
* This is SUPER jank but I cant get the underscore templating to evaluate
* This is SUPER jank but I can't get the underscore templating to evaluate
* correctly with custom regexes, so I'm just going to use interpolate
* and define the strings here.
*/
@ -43,7 +43,7 @@ module.exports = function(grunt) {
grunt.log.writeln(compliments[index]);
});
grunt.registerTask('lintStrings', 'Find if an INTL string doesnt exist', function() {
grunt.registerTask('lintStrings', 'Find if an INTL string doesn\'t exist', function() {
var child_process = require('child_process');
child_process.exec('node src/js/intl/checkStrings', function(err, output) {
grunt.log.writeln(output);

View file

@ -128,7 +128,7 @@ describe('Git', function() {
);
});
it('Ammends commits', function() {
it('Amends commits', function() {
expectTreeAsync(
'git commit --amend',
'%7B%22branches%22%3A%7B%22master%22%3A%7B%22target%22%3A%22C1%27%22%2C%22id%22%3A%22master%22%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C1%27%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%27%22%7D%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22master%22%2C%22id%22%3A%22HEAD%22%7D%7D'
@ -219,7 +219,7 @@ describe('Git', function() {
);
});
it('doesnt make a tag if ref doesnt resolve', function() {
it('doesn\'t make a tag if ref doesn\'t resolve', function() {
expectTreeAsync(
'git tag v1 foo',
'{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"tags":{},"HEAD":{"target":"master","id":"HEAD"}}'
@ -261,7 +261,7 @@ describe('Git', function() {
);
});
it('can handle slashes and dashes in branch names but doesnt allow o/', function() {
it('can handle slashes and dashes in branch names but doesn\'t allow o/', function() {
expectTreeAsync(
'git branch foo/bar; git commit; git checkout foo/bar; gc; go master; git merge foo/bar; go foo/bar; git checkout -b bar-baz; git commit; git branch o/foo',
'{"branches":{"master":{"target":"C4","id":"master","remoteTrackingBranchID":null},"foo/bar":{"target":"C3","id":"foo/bar","remoteTrackingBranchID":null},"bar-baz":{"target":"C5","id":"bar-baz","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C1"],"id":"C3"},"C4":{"parents":["C2","C3"],"id":"C4"},"C5":{"parents":["C3"],"id":"C5"}},"tags":{},"HEAD":{"target":"bar-baz","id":"HEAD"}}'
@ -276,4 +276,3 @@ describe('Git', function() {
});
});

View file

@ -51,7 +51,7 @@ describe('Tree Compare', function() {
it('deep compares on origin tree', function() {
testMethod(
{}, // checked for all methods so this doesnt matter
{}, // checked for all methods so this doesn't matter
// state with originTree
'{"branches":{"master":{"target":"C1","id":"master"},"o/master":{"target":"C1","id":"o/master"}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"master","id":"HEAD"},"originTree":{"branches":{"master":{"remoteTrackingBranch":null,"remote":false,"target":"C1","id":"master","type":"branch"}},"commits":{"C0":{"type":"commit","parents":[],"author":"Peter Cottle","createTime":"Wed Jul 24 2013 09:58:50 GMT-0700 (PDT)","commitMessage":"Quick commit. Go Bears!","id":"C0","rootCommit":true},"C1":{"type":"commit","parents":["C0"],"author":"Peter Cottle","createTime":"Wed Jul 24 2013 09:58:50 GMT-0700 (PDT)","commitMessage":"Quick commit. Go Bears!","id":"C1"}},"HEAD":{"target":"master","id":"HEAD","type":"general ref"}}}',
{
@ -173,5 +173,3 @@ describe('Tree Compare', function() {
);
});
});

View file

@ -21,7 +21,7 @@ var events = assign(
}
}
);
// Allow unlimited listeners, so FF doesnt break
// Allow unlimited listeners, so FF doesn't break
events.setMaxListeners(0);
var commandUI;
var sandbox;

View file

@ -19,7 +19,7 @@ function isColonRefspec(str) {
}
var assertIsRef = function(engine, ref) {
engine.resolveID(ref); // will throw giterror if cant resolve
engine.resolveID(ref); // will throw git error if can't resolve
};
var validateBranchName = function(engine, name) {
@ -255,7 +255,7 @@ var commandConfig = {
// get o/master locally if master is specified
destination = engine.origin.refs[source].getPrefixedID();
} else {
// cant be detached
// can't be detached
if (engine.getDetachedHead()) {
throw new GitError({
msg: intl.todo('Git pull can not be executed in detached HEAD mode if no remote branch specified!')

View file

@ -41,7 +41,7 @@ function GitEngine(options) {
this.eventBaton = options.eventBaton;
this.eventBaton.stealBaton('processGitCommand', this.dispatch, this);
// poor man's dependency injection. we cant reassign
// poor man's dependency injection. we can't reassign
// the module variable because its get clobbered :P
this.animationFactory = (options.animationFactory) ?
options.animationFactory : AnimationFactory;
@ -1018,12 +1018,12 @@ GitEngine.prototype.getTargetGraphDifference = function(
_.each(here.parents, pushParent);
}
// filter because we werent doing graph search
// filter because we weren't doing graph search
var differenceUnique = Graph.getUniqueObjects(difference);
/**
* Ok now we have to determine the order in which to make these commits.
* We used to just sort by depth because we were lazy but that is incorrect
* since it doesnt represent the actual dependency tree of the commits.
* since it doesn't represent the actual dependency tree of the commits.
*
* So here is what we are going to do -- loop through the differenceUnique
* set and find a commit that has _all_ its parents in the targetSet. Then
@ -1112,7 +1112,7 @@ GitEngine.prototype.push = function(options) {
);
if (!commitsToMake.length) {
if (!options.force) {
// We are already up to date, and we cant be deleting
// We are already up to date, and we can't be deleting
// either since we don't have --force
throw new GitError({
msg: intl.str('git-error-origin-fetch-uptodate')
@ -1767,7 +1767,7 @@ GitEngine.prototype.syncRemoteBranchFills = function() {
}
var originBranch = this.origin.refs[branch.getBaseID()];
if (!originBranch.get('visBranch')) {
// testing mode doesnt get this
// testing mode doesn't get this
return;
}
var originFill = originBranch.get('visBranch').get('fill');
@ -2099,7 +2099,7 @@ GitEngine.prototype.hgRebase = function(destination, base) {
});
chain = chain.then(function() {
// now we just moved a bunch of commits, but we havent updated the
// now we just moved a bunch of commits, but we haven't updated the
// dangling guys. lets do that and then prune
var anyChange = this.updateCommitParentsForHgRebase(masterSet);
if (!anyChange) {
@ -2801,7 +2801,7 @@ GitEngine.prototype.getCommonAncestor = function(ancestor, cousin, dontThrow) {
}
queue = queue.concat(here.get('parents'));
}
throw new Error('something has gone very wrong... two nodes arent connected!');
throw new Error('something has gone very wrong... two nodes aren\'t connected!');
};
GitEngine.prototype.isUpstreamOf = function(child, ancestor) {
@ -2913,7 +2913,7 @@ var Branch = Ref.extend({
getBaseID: function() {
if (!this.getIsRemote()) {
throw new Error('im not remote so cant get base');
throw new Error('im not remote so can\'t get base');
}
return this.get('id').replace(ORIGIN_PREFIX, '');
},

View file

@ -57,7 +57,7 @@ var str = exports.str = function(key, params) {
var getIntlKey = exports.getIntlKey = function(obj, key, overrideLocale) {
if (!obj || !obj[key]) {
throw new Error('that key ' + key + 'doesnt exist in this blob' + obj);
throw new Error('that key ' + key + 'doesn\'t exist in this blob' + obj);
}
if (!obj[key][getDefaultLocale()]) {
console.warn(
@ -98,7 +98,7 @@ exports.getStartDialog = function(level) {
var startDialog = getIntlKey(level, 'startDialog');
if (startDialog) { return startDialog; }
// this level translation isnt supported yet, so lets add
// this level translation isn't supported yet, so lets add
// an alert to the front and give the english version.
var errorAlert = {
type: 'ModalAlert',

View file

@ -960,7 +960,7 @@ exports.strings = {
},
///////////////////////////////////////////////////////////////////////////
'level-no-id': {
'__desc__': 'When you say an id but that level doesnt exist',
'__desc__': 'When you say an id but that level doesn\'t exist',
'en_US': 'A level for that id "{id}" was not found! Opening up a level selection view',
'de_DE': 'Konnte keinen Level mit der ID "{id}" finden! Öffne einen Level-Auswahldialog',
'zh_CN': '没找到 id 为 "{id}" 的关卡!打开关卡选择框',

View file

@ -68,7 +68,7 @@ var LevelBuilder = Level.extend({
this.definedGoal = true;
}
// we wont be using this stuff, and it is deleted to ensure we overwrite all functions that
// we won't be using this stuff, and it is deleted to ensure we overwrite all functions that
// include that functionality
delete this.treeCompare;
delete this.solved;
@ -335,7 +335,7 @@ var LevelBuilder = Level.extend({
.then(function() {
// oh boy this is complex
var whenEditedDialog = Q.defer();
// the undefined here is the command that doesnt need resolving just yet...
// the undefined here is the command that doesn't need resolving just yet...
this.editDialog(undefined, whenEditedDialog);
return whenEditedDialog.promise;
}.bind(this))

View file

@ -109,11 +109,11 @@ AppConstants.StoreSubscribePrototype,
getNextLevel: function(id) {
if (!_levelMap[id]) {
console.warn('that level doesnt exist!!!');
console.warn('that level doesn\'t exist!!!');
return null;
}
// meh, this method could be better. It's a tradeoff between
// meh, this method could be better. It's a trade-off between
// having the sequence structure be really simple JSON
// and having no connectivity information between levels, which means
// you have to build that up yourself on every query
@ -138,7 +138,7 @@ AppConstants.StoreSubscribePrototype,
isLevelSolved: function(levelID) {
if (!_levelMap[levelID]) {
throw new Error('that level doesnt exist!');
throw new Error('that level doesn\'t exist!');
}
return !!_solvedMap[levelID];
},

View file

@ -27,7 +27,7 @@ EventBaton.prototype.sliceOffArgs = function(num, args) {
};
EventBaton.prototype.trigger = function(name) {
// arguments is weird and doesnt do slice right
// arguments is weird and doesn't do slice right
var argsToApply = this.sliceOffArgs(1, arguments);
var listeners = this.eventMap[name];
@ -105,7 +105,7 @@ EventBaton.prototype.releaseBaton = function(name, func, context) {
if (!found) {
console.log('did not find that function', func, context, name, arguments);
console.log(this.eventMap);
throw new Error('cant releasebaton if yu don\'t have it');
throw new Error('can\'t releasebaton if you don\'t have it');
}
this.eventMap[name] = newListeners;
};

View file

@ -168,7 +168,7 @@ var LeftRightView = PositiveNegativeBase.extend({
};
this.render();
// For some weird reason backbone events arent working anymore so
// For some weird reason backbone events aren't working anymore so
// im going to just wire this up manually
this.$('div.right').click(this.positive.bind(this));
this.$('div.left').click(this.negative.bind(this));
@ -208,7 +208,7 @@ var ModalView = Backbone.View.extend({
// add ourselves to the DOM
this.$el.html(this.template({}));
$('body').append(this.el);
// this doesnt necessarily show us though...
// this doesn't necessarily show us though...
},
stealKeyboard: function() {

View file

@ -359,7 +359,7 @@ GitVisuals.prototype.animateAllFromAttrToAttr = function(fromSnapshot, toSnapsho
}
if (!fromSnapshot[id] || !toSnapshot[id]) {
// its actually ok it doesnt exist yet
// its actually ok it doesn't exist yet
return;
}
obj.animateFromAttrToAttr(fromSnapshot[id], toSnapshot[id]);
@ -477,7 +477,7 @@ GitVisuals.prototype.getCommitUpstreamBranches = function(commit) {
GitVisuals.prototype.getBlendedHuesForCommit = function(commit) {
var branches = this.upstreamBranchSet[commit.get('id')];
if (!branches) {
throw new Error('that commit doesnt have upstream branches!');
throw new Error('that commit doesn\'t have upstream branches!');
}
return this.blendHuesFromBranchStack(branches);

View file

@ -40,19 +40,19 @@ Done things:
(place to merge). o/master gets updated regardless
[x] ok say I have branch banana and its one commit ahead of master. if I git
pull origin master while checked out on banana, it fetches those commits
(doesnt update origin/master) and then merges them into banana.
(doesn't update origin/master) and then merges them into banana.
[x] and then "git pull origin banana:origin/banana" works because it goes into
the remote branch and then merges the fetch HEAD with current location
[x] oh boy heres another data point. git fetch banana:banana will actually
fast-forward banana to what remote has, but not update o/banana. weirdly it
doesnt let you do this if you are checked out on banana
doesn't let you do this if you are checked out on banana
[x] furthermore, if banana has commits and its not a FF, it will reject the command. wth??
[x] test is failing because we create banana when we should only really be creating o/banana
[x] work on TABBED levels layout
[x] EASY -- make colors the same between remote branches and their remote counterparts
[x] fix undo not syncing the remote tracking
[x] get clone as a before command working in demonstration views (related to test infra as well)
[x] importTreeNow fails if origin isnt updated
[x] importTreeNow fails if origin isn't updated
[x] set checkout -b branch __remoteBranch to track the remote branch
[x] test coverage for hg!!! (in progress)
[x] tree pruning
@ -123,7 +123,7 @@ Done things:
[x] what if they just type "levels" ?
[x] hookup for when solving happens
[x] levels dropdown selection?
[x] git demonstration view -- shouldnt be too bad. LOL WHAT A FUCKING JOKE like 4 hours
[x] git demonstration view -- shouldn't be too bad. LOL WHAT A FUCKING JOKE like 4 hours
[x] gotoSandbox command
[x] "next level?" dialog after beating level
[x] keyboard input for confirm / cancel