Skip to content

Commit

Permalink
chore: Fix typos (#5742)
Browse files Browse the repository at this point in the history
These typos were reported by an internal tool at Google. This fixes
typos and updates our public tooling to catch future instances of these.
  • Loading branch information
joeyparrish committed Oct 6, 2023
1 parent 4f6f83b commit 3c091ea
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions build/misspellings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
r'(?i)cur+ent': 'current',
r"(?i)doens?'t": "doesn't",
r'(?i)droping': 'dropping',
r'(?i)e\.g[^.a-z0-9_]': r'e.g.',
r'(?i)errr+or': r'error',
r'(?i)errorr+': r'error',
r'(?i)ful+screen': 'fullscreen',
r'(?i)futher': 'further',
r'(?i)gene?ra?tor': 'generator',
r'(?i)(?:(in|)n*)ac+ur+ate': r'\1accurate',
r'(?i)infomation': r'information',
r'(?i)in?ter[ai]ble': 'iterable',
r'(?i)int(er|re)p(er|re)tation': 'interpretation',
r'(?i)langauge': 'language',
Expand All @@ -20,6 +24,7 @@
r'(?i)oc+ur+(?!ed|ing|ence)': 'occur',
r'(?i)oc+ur+(ed|ing|ence)': r'occurr\1',
r'(?i)oc+ur+ance': 'occurrence',
r'(?i)orginal': 'original',
r'(?i)parrent': 'parent',
r'(?i)pol+yfil+': 'polyfill',
r'(?i)propogate': 'propagate',
Expand Down
2 changes: 1 addition & 1 deletion externs/shaka/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ shaka.extern.TimelineRegionInfo;
* @property {?number} channelsCount
* The number of audio channels, or null if unknown.
* @property {?string} pixelAspectRatio
* The pixel aspect ratio value; e.g "1:1".
* The pixel aspect ratio value; e.g. "1:1".
* @property {?number} width
* The video width in pixels.
* @exportDoc
Expand Down
2 changes: 1 addition & 1 deletion lib/media/media_source_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ shaka.media.MediaSourceEngine = class {
const uint8ArrayData = shaka.util.BufferUtils.toUint8(data);
let mimeType = this.sourceBufferTypes_[contentType];
if (this.transmuxers_[contentType]) {
mimeType = this.transmuxers_[contentType].getOrginalMimeType();
mimeType = this.transmuxers_[contentType].getOriginalMimeType();
}
if (shaka.util.TsParser.probe(uint8ArrayData)) {
const tsParser = new shaka.util.TsParser().parse(uint8ArrayData);
Expand Down
2 changes: 1 addition & 1 deletion lib/media/quality_observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ shaka.media.QualityObserver.QualityChangePosition;
*
* @description
* Contains media quality information for a specific content type
* e.g video or audio.
* e.g. video or audio.
*
* @property {!Array.<shaka.media.QualityObserver.QualityChangePosition>}
* qualityChangePositions
Expand Down
2 changes: 1 addition & 1 deletion lib/media/transmuxer.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ shaka.media.Transmuxer = class {
* Returns the original mimetype of the transmuxer.
* @return {string}
*/
getOrginalMimeType() {
getOriginalMimeType() {
return this.originalMimeType_;
}

Expand Down
4 changes: 2 additions & 2 deletions test/media/transmuxer_integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ describe('Transmuxer', () => {
});
});

it('getOrginalMimeType returns the correct mimeType', () => {
expect(transmuxer.getOrginalMimeType()).toBe(transmuxerMimeType);
it('getOriginalMimeType returns the correct mimeType', () => {
expect(transmuxer.getOriginalMimeType()).toBe(transmuxerMimeType);
});

describe('transmuxing', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/test/util/simple_fakes.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ shaka.test.FakeTransmuxer = class {
jasmine.createSpy('transmux').and.returnValue(Promise.resolve(output));

/** @type {!jasmine.Spy} */
this.getOrginalMimeType =
jasmine.createSpy('getOrginalMimeType').and.returnValue('mimeType');
this.getOriginalMimeType =
jasmine.createSpy('getOriginalMimeType').and.returnValue('mimeType');
}
};
2 changes: 1 addition & 1 deletion third_party/closure-uri/uri.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* Use new goog.Uri(string) to parse a URI string.
*
* e.g: <code>var myUri = new goog.Uri(window.location);</code>
* e.g.: <code>var myUri = new goog.Uri(window.location);</code>
*
* Implements RFC 3986 for parsing/formatting URIs.
* http://www.ietf.org/rfc/rfc3986.txt
Expand Down

0 comments on commit 3c091ea

Please sign in to comment.