Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #117

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Usage: ./sauce4zwift-1.1.4-dev.AppImage [--headless] --main-username USERNAME

Arguments:
--headless Run in headless mode. NOTE: All settings for
headless mode are seperate from normal mode.
headless mode are separated from normal mode.
--main-username USERNAME The main Zwift username (email)
(env variable: MAIN_USERNAME)
[REQUIRED]
Expand Down
2 changes: 1 addition & 1 deletion assets/notes/splines
Original file line number Diff line number Diff line change
@@ -1 +1 @@
catmull-rom spline and beizer are the two road splines used.
catmull-rom spline and bezier are the two road splines used.
2 changes: 1 addition & 1 deletion pages/geo-settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<div class="title">High Performance System Options:</div>
<div><small>NOTE: These options require a powerful CPU and/or GPU.</small></div>
<br/>
<label title="This setting directly affects GPU memory and image quality. High values may lead to visual corruption and instabilty.">
<label title="This setting directly affects GPU memory and image quality. High values may lead to visual corruption and instability.">
<key>Quality:</key>
<input type="range" name="quality" min="1" max="100"/>
<input type="number" name="quality" min="1" max="200" style="--size: 5"/>%
Expand Down
2 changes: 1 addition & 1 deletion pages/geo.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
main();
</script>
</head>
<body class="transparent-bg"><!-- XXX meh, dont like this but need to make sure tansparency setting works -->
<body class="transparent-bg"><!-- XXX meh, don't like this but need to make sure tansparency setting works -->
<div id="titlebar">
<header>
<div class="logo"><img src="images/icon128.png"/></div>
Expand Down
2 changes: 1 addition & 1 deletion pages/scss/groups.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ html {
border-radius: 1em;
margin-right: $content-pad;
margin-left: $content-pad;
align-self: center; // Dont' fill width;
align-self: center; // Don't fill width;

&:empty::after {
font-size: 0.8em;
Expand Down
2 changes: 1 addition & 1 deletion pages/scss/watching.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ html.settings-page .screen:not(.horizontal) {
//align-items: center;

// Begin horrible CSS hack.
// Echarts doesn't put classes on any of their spagetti old school tooltip html. :(
// Echarts doesn't put classes on any of their spaghetti old school tooltip html. :(
// Two items: key above \n (dot, value)
span:first-of-type:nth-last-of-type(2) {
// dot...
Expand Down
6 changes: 3 additions & 3 deletions pages/src/common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ export const settingsStore = doc.dataset.settingsKey && new SettingsStore(doc.da
function parseDependsOn(dependsOn) {
const m = dependsOn.match(/^(!)?([a-z0-9]+?)((==|!=|>|<|>=|<=)([a-z0-9]+?))?$/i);
if (!m) {
throw new Error("Invalid depends-on grammer field");
throw new Error("Invalid depends-on grammar field");
}
const negate = !!m[1];
const name = m[2];
Expand Down Expand Up @@ -1210,7 +1210,7 @@ function updateDependants(el) {
try {
({negate, operator, value} = parseDependsOn(d));
} catch(e) {
console.error("Invalid depends-on grammer field", d, e);
console.error("Invalid depends-on grammar field", d, e);
continue;
}
const elValue = el.type === 'checkbox' ? el.checked : el.value;
Expand Down Expand Up @@ -1307,7 +1307,7 @@ function bindFormData(selector, storageIface, options={}) {
try {
({negate, name, operator, value} = parseDependsOn(dependsOn));
} catch(e) {
console.error("Invalid depends-on grammer field", dependsOn, e);
console.error("Invalid depends-on grammar field", dependsOn, e);
continue;
}
const depEl = form.querySelector(`[name="${name}"]`);
Expand Down
2 changes: 1 addition & 1 deletion pages/src/elevation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ export class SauceElevationProfile {
if (watching.eventSubgroupId) {
sg = await common.rpc.getEventSubgroup(watching.eventSubgroupId);
}
// Note sg.routeId is sometimes out of sync with state.routeId; avoid thrash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thrash is actually the intended word here.

// Note sg.routeId is sometimes out of sync with state.routeId; avoid trash
if (sg && sg.routeId === watching.routeId) {
await this.setRoute(sg.routeId, {
laps: sg.laps,
Expand Down
2 changes: 1 addition & 1 deletion pages/src/map.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ export class SauceZwiftMap extends EventTarget {
if (watching.eventSubgroupId) {
sg = await common.rpc.getEventSubgroup(watching.eventSubgroupId);
}
// Note sg.routeId is sometimes out of sync with state.routeId; avoid thrash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thrash is actually the intended word here.

// Note sg.routeId is sometimes out of sync with state.routeId; avoid trash
if (sg && sg.routeId === watching.routeId) {
await this.setActiveRoute(sg.routeId, sg.laps);
} else {
Expand Down
2 changes: 1 addition & 1 deletion pages/src/overview.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function main() {
}
autoHidden = true;
doc.classList.add('windows-auto-hidden', 'windows-hidden');
console.debug("Auto hidding windows");
console.debug("Auto hiding windows");
common.rpc.hideAllWindows({autoHide: true});
}

Expand Down
2 changes: 1 addition & 1 deletion pages/src/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -3994,7 +3994,7 @@ globalThis.Sentry = function(exports) {
const {referrer} = global$1.document || {};
const {userAgent} = global$1.navigator || {};
const headers = Object.assign(Object.assign(Object.assign({}, event.request && event.request.headers), referrer && {
Referer: referrer
Referrer: referrer
}), userAgent && {
'User-Agent': userAgent
});
Expand Down
8 changes: 4 additions & 4 deletions pages/templates/analysis/selection-stats.html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>Distance:</key><value>{-humanDistance(env.distance, {suffix: true, html: true})-}</value>
</div>

<div class="seperator"></div>
<div class="separator"></div>

<div class="stats key-value-grid">
<key class="header"><ms>bolt</ms> Power:</key>
Expand Down Expand Up @@ -42,15 +42,15 @@
<% } %>
</div>

<div class="seperator"></div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need to update pages/scss/analysis.scss too since I mispelled it there too. :)

<div class="separator"></div>

<div class="stats key-value-grid">
<key class="header"><ms>readiness_score</ms> Energy:</key>
<value>{-humanNumber(power.kj, {suffix: 'kJ', html: true})-}</value>
<key><attr for="tp">TSS®</attr>:</key><value>{-humanNumber(power.tss)-}</value>
</div>

<div class="seperator"></div>
<div class="separator"></div>

<div class="stats key-value-grid">
<key class="header"><ms>elevation</ms> Grade:</key>
Expand All @@ -61,7 +61,7 @@
</div>

<% if (power.rank) { %>
<div class="seperator"></div>
<div class="separator"></div>

<div class="stats key-value-grid">
<key class="header"><ms>social_leaderboard</ms> Rank:</key>
Expand Down
4 changes: 2 additions & 2 deletions pages/templates/profile.html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<a title="You are not following this athlete, click to follow" href
data-action="follow"><ms>follow_the_signs</ms></a>
<% } %>
<a title="Toggle marked state for this person. Marked athletes will receieve extra attention and allow quick filtering. Recommended for friends or foes in race situations."
<a title="Toggle marked state for this person. Marked athletes will receive extra attention and allow quick filtering. Recommended for friends or foes in race situations."
data-action="toggleMarked" class="{{athlete.marked ? 'active' : ''}}"
href><ms>{{athlete.marked ? 'bookmark_added' : 'bookmark_add'}}</ms></a>
<% if (!obj.embedded) { %>
Expand Down Expand Up @@ -103,7 +103,7 @@
</sauce-row-editor>
</div>-->
<div class="row p2"><key>FTP</key>{-humanPower(athlete.ftp, {suffix: true, html: true})-}</div>
<div class="row p2" title="CP is Critical Power (often similiar to FTP) and W' (pronounced &quot;W Prime&quot;) is a the amount of energy (kJ) available when working harder than the CP value. Think of it as a battery level." >
<div class="row p2" title="CP is Critical Power (often similar to FTP) and W' (pronounced &quot;W Prime&quot;) is the amount of energy (kJ) available when working harder than the CP value. Think of it as a battery level." >
<key>CP</key><a title="Click to edit - Press Enter to save"
href="javascript:void(0)" data-key="cp" data-type="number"
class="inline-edit cp">{-humanPower(athlete.cp || athlete.ftp, {suffix: true, html: true})-}</a>,
Expand Down
2 changes: 1 addition & 1 deletion pages/zwift-monitor-login.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h1><img class="logo" src="images/logo_vert_120x320.png"/>
<li>This does NOT need to be a paid account</li>
<li>Only fill out the first form, then close the window</li>
<li>Disregard the trial period notices, they don't matter</li>
<li>I recommand an email alias such as, "[email protected]"</li>
<li>I recommend an email alias such as, "[email protected]"</li>
</ul>
</p>
<div>
Expand Down
2 changes: 1 addition & 1 deletion shared/curves.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export class RoadPath extends CurvePath {
nodes.push({end: end.point});
}
if (this.cropPercent && end.index === this.nodes.length - 2) {
// subpath is on our boundry so denormalize percent based on our trim..
// subpath is on our boundary so denormalize percent based on our trim..
cropPercent = end.percent * this.cropPercent;
} else {
cropPercent = end.percent;
Expand Down
2 changes: 1 addition & 1 deletion shared/sauce/data.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function resample(inData, outLen, options={}) {
}
const outData = [];
for (let i = 0; i < outLen; i++) {
// Round 0.5 down to avoid single use of index 0 and tripple use of final index.
// Round 0.5 down to avoid single use of index 0 and triple use of final index.
outData.push(inData[Math.min(inLen - 1, -Math.round(-i * step))]);
}
return outData;
Expand Down
6 changes: 3 additions & 3 deletions shared/sauce/power.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ export function cyclingDraftDragReduction(riders, position) {
* https://doi.org/10.1007/s12283-021-00345-2
*
* The values from this paper have been curve fitted to an exponential func
* so we can infer average CdA adaption with dynamic pack positions.
* so we can infer average CdA adaptation with dynamic pack positions.
*/
if (riders == null || position == null) {
throw new TypeError("riders and position are required arguments");
Expand Down Expand Up @@ -591,7 +591,7 @@ export function cyclingPowerVelocitySearchMultiPosition(riders, positions, args)


export function cyclingPowerVelocitySearch({power, ...args}) {
// Do not adjust without running test suite and tuning for 50% tollerance above failure
// Do not adjust without running test suite and tuning for 50% tolerance above failure
const epsilon = 0.000001;
const sampleSize = 300;
const filterPct = 0.50;
Expand Down Expand Up @@ -623,7 +623,7 @@ export function cyclingPowerVelocitySearch({power, ...args}) {
results.length = Math.min(Math.floor(sampleSize * filterPct), results.length);
const velocities = results.map(x => x[0]);
if (velocities.length === 0) {
throw new Error("Emnty Range");
throw new Error("Empty Range");
}
start = sauce.data.min(velocities);
end = sauce.data.max(velocities);
Expand Down
4 changes: 2 additions & 2 deletions src/headless.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ rpc.register(url => {

class NodeSauceApp extends app.SauceApp {
resetStorageState(sender) {
console.warn('Reseting state and quiting...');
console.warn('Reseting state and quitting…');
super.resetStorageState();
quit();
}
Expand All @@ -66,7 +66,7 @@ async function main() {
const args = parseArgs([
// Do not remove headless arg. It's informational here but handled by loader.mjs
{arg: 'headless', type: 'switch',
help: 'Run in headless mode. NOTE: All settings for headless mode are seperate from normal mode.'},
help: 'Run in headless mode. NOTE: All settings for headless mode are separate from normal mode.'},
{arg: 'main-username', label: 'USERNAME', required: true, env: 'MAIN_USERNAME',
help: 'The main Zwift username (email)'},
{arg: 'main-password', label: 'PASSWORD', required: true, env: 'MAIN_PASSWORD',
Expand Down
6 changes: 3 additions & 3 deletions src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ async function ensureSingleInstance() {
noLink: true,
});
if (response === 0) {
console.debug("User quiting due to existing instance");
console.debug("User quitting due to existing instance");
app.quit(0);
return false;
}
Expand Down Expand Up @@ -312,7 +312,7 @@ async function startNormal() {
// https://github.com/electron-userland/electron-builder/issues/2700
app.setAppUserModelId('io.saucellc.sauce4zwift'); // must match build.appId for windows

// If we are foreced to update to 114+ we'll have to switch our scrollbars to this...
// If we are forced to update to 114+ we'll have to switch our scrollbars to this...
// EDIT 2024-02 Maybe not, but it could look nicer in places where we will now require
// a visible scrollbar on windows and linux. Last I looked it was kind of buggy though
// so we have to retest everything before using.
Expand Down Expand Up @@ -355,7 +355,7 @@ async function startNormal() {

function startHeadless() {
// NOTE: Node doesn't expose posix-like exec() or fork() calls, so read the docs before
// infering anything related to child_process handling.
// inferring anything related to child_process handling.
const fqMod = path.join(__dirname, 'headless.mjs');
const args = [fqMod].concat(process.argv.slice(app?.isPackaged ? 1 : 2));
const {status} = require('node:child_process').spawnSync(process.execPath, args, {
Expand Down
2 changes: 1 addition & 1 deletion src/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export async function main({logEmitter, logFile, logQueue, sentryAnonId,
const args = parseArgs([
// Do not remove headless arg. It's informational here but handled by loader.mjs
{arg: 'headless', type: 'switch',
help: 'Run in headless mode. NOTE: All settings for headless mode are seperate from normal mode.'},
help: 'Run in headless mode. NOTE: All settings for headless mode are separate from normal mode.'},
{arg: 'disable-monitor', type: 'switch',
help: 'Do not start the Zwift monitor (no data)'},
{arg: 'athlete-id', type: 'num', label: 'ATHLETE_ID',
Expand Down
10 changes: 5 additions & 5 deletions src/stats.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ export class StatsProcessor extends events.EventEmitter {
}

resetStats() {
console.debug("Reseting stats...");
console.debug("Resetting stats...");
const wt = worldTimer.now();
for (const ad of this._athleteData.values()) {
this._resetAthleteData(ad, wt);
Expand Down Expand Up @@ -1260,7 +1260,7 @@ export class StatsProcessor extends events.EventEmitter {

putState(state) {
if (this.processState(state) === false) {
console.warn("State skipped by processer");
console.warn("State skipped by processor");
return;
}
if (this.listenerCount('states')) {
Expand All @@ -1283,7 +1283,7 @@ export class StatsProcessor extends events.EventEmitter {
if (x.ts === ts && x.from === payload.from) {
console.warn("Deduping chat message:", ts, payload.from, payload.message);
return;
} else if (x.from === payload.from && x.mesage === payload.message &&
} else if (x.from === payload.from && x.message === payload.message &&
payload.ts - x.ts < 5000) {
console.warn("Deduping chat message (content based):", ts, payload.from, payload.message);
debugger;
Expand Down Expand Up @@ -1701,7 +1701,7 @@ export class StatsProcessor extends events.EventEmitter {
if (delta < -10000) {
shiftHistory = true;
} else {
// Stopped and wiggling backwards. For safety we just nuke hist.
// Stopped and wiggling backwards. For safety we just nuke history.
ad.roadHistory.timeline.length = 0;
}
}
Expand Down Expand Up @@ -1942,7 +1942,7 @@ export class StatsProcessor extends events.EventEmitter {
meetup.allTags = this._parseEventTags(meetup);
meetup.ts = +new Date(meetup.eventStart);
meetup.courseId = env.getCourseId(meetup.mapId);
// Meetups are basicaly a hybrid event/subgroup
// Meetups are basically a hybrid event/subgroup
meetup.eventSubgroups = [{...meetup, id: meetup.eventSubgroupId, eventId: meetup.id}];
this._recentEventSubgroups.set(meetup.eventSubgroupId, meetup);
this._recentEvents.set(meetup.id, meetup);
Expand Down
2 changes: 1 addition & 1 deletion src/windows.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ function _openSpecWindow(spec) {
let bounds = spec.bounds;
const inBounds = !bounds || isWithinDisplayBounds(bounds);
if (!inBounds) {
console.warn("Reseting window that is out of bounds:", bounds);
console.warn("Resetting window that is out of bounds:", bounds);
}
if (!inBounds || !bounds) {
bounds = getBoundsForDisplay(getCurrentDisplay(), {...manifest.options, ...spec.options});
Expand Down
4 changes: 2 additions & 2 deletions src/zwift.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protobuf.parse.defaults.keepCase = _case;


// NOTE: this options object does not contain callback functions (as it might appear).
// A static type comparision is used by protobufjs's toObject function instead. :(
// A static type comparison is used by protobufjs's toObject function instead. :(
const _pbJSONOptions = {
...protobuf.util.toJSONOptions,
longs: Number,
Expand Down Expand Up @@ -2228,7 +2228,7 @@ export class GameConnectionServer extends net.Server {
async _start() {
await this.listenDone;
const {port} = this.address();
console.info("Registering game connnection server:", this.ip, port);
console.info("Registering game connection server:", this.ip, port);
this.port = port;
await this.api.fetch('/relay/profiles/me/phone', {
method: 'PUT',
Expand Down
6 changes: 3 additions & 3 deletions src/zwift.proto
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ enum FitnessPrivacy {
message ActivityFull { //where is primaryImageUrl, feedImageThumbnailUrl, activityRideOnCount, activityCommentCount, eventId, rideOnGiven
uint64 id = 1;
required uint64 athleteId = 2;
required int32 courseId = 3; // XXX double check that is is the same as the relay server courseId concept ie 6=watopia
required int32 courseId = 3; // XXX double check that is the same as the relay server courseId concept ie 6=watopia
required string name = 4;
string _f5 = 5;
bool privateActivity = 6;
Expand Down Expand Up @@ -1160,7 +1160,7 @@ message GameToCompanionCommand {
string powerupBackgrounColor = 12;
int32 customActionXXX2_f13 = 13; // 0
SocialPlayerAction socialAction = 16;
int32 f19 = 19; // saw 1 folling pairing_to
int32 f19 = 19; // saw 1 following pairing_to
GamePacket gamePacket = 21;
}

Expand Down Expand Up @@ -1345,7 +1345,7 @@ message EventSubgroup {
uint64 _f42 = 42;
string customUrl = 43;
bool _f44 = 44; // maybe one of unlisted, restricted, recurring
string _tags = 45; // semi-colon seperated
string _tags = 45; // semi-colon separated
uint32 lateJoinInMinutes = 46;
int32 mapId = 47; // actually worldId, but stay consistent with JSON
EventTimeTrialOptions timeTrialOptions = 48;
Expand Down