From 5301e2507a6697b2566e4e6eb9481eaf853250d8 Mon Sep 17 00:00:00 2001 From: Eric Theise Date: Wed, 12 Oct 2022 13:01:18 -0700 Subject: [PATCH 1/3] Typos and grammatical (English) cleanups. Changes made to comments and text output, not css classes or variable names. --- src/client/editor/data-workers.js | 2 +- src/client/editor/index.js | 2 +- src/client/events/event-emitter.js | 2 +- src/client/events/utils.js | 4 ++-- src/client/locales/en.js | 2 +- src/client/parser.js | 2 +- src/client/widgets/basics/button.js | 4 ++-- src/client/widgets/basics/switch.js | 2 +- src/client/widgets/common/widget.js | 4 ++-- src/client/widgets/containers/keyboard.js | 2 +- src/client/widgets/containers/patchbay.js | 2 +- src/client/widgets/frames/image.js | 2 +- src/client/widgets/sliders/encoder.js | 6 +++--- src/client/widgets/sliders/range.js | 2 +- src/python/head.py | 2 +- src/scss/ui/workspaces.scss | 2 +- src/server/callbacks.js | 2 +- src/server/electron-window.js | 2 +- src/server/options.js | 4 ++-- src/server/settings.js | 2 +- 20 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/client/editor/data-workers.js b/src/client/editor/data-workers.js index 69f2cf60..f9267823 100644 --- a/src/client/editor/data-workers.js +++ b/src/client/editor/data-workers.js @@ -77,7 +77,7 @@ function updateWidget(widget, options={}) { // save state if (stateManager.queueCounter === 0) { - scrollState = {} // scrollbale modals don't store their scroll state in their value + scrollState = {} // scrollable modals don't store their scroll state in their value } stateManager.incrementQueue() for (let w of removedWidgets) { diff --git a/src/client/editor/index.js b/src/client/editor/index.js index d645b815..d7aa7089 100644 --- a/src/client/editor/index.js +++ b/src/client/editor/index.js @@ -64,7 +64,7 @@ class Editor { }) console.error( `Error while setting ${propName} to: ${JSON.stringify(value)}.\n` + - 'It\'s probably a bug, please open a new bug ticket with the followigin informations at' + + 'It\'s probably a bug, please open a new bug ticket with the following informations at' + 'https://github.com/jean-emmanuel/open-stage-control/issues' ) throw e diff --git a/src/client/events/event-emitter.js b/src/client/events/event-emitter.js index da1d84e3..1e6d3a6e 100644 --- a/src/client/events/event-emitter.js +++ b/src/client/events/event-emitter.js @@ -38,7 +38,7 @@ module.exports = class EventEmitter { } // Event bubbling - // DOM events won't buttle + // DOM events won't bubble // Virtual events will unless data.stopPropagation is set if (!data || !data.stopPropagation) { if (this.parent) this.parent.trigger(evt, data) diff --git a/src/client/events/utils.js b/src/client/events/utils.js index d8cb5eba..9a6379bb 100644 --- a/src/client/events/utils.js +++ b/src/client/events/utils.js @@ -84,7 +84,7 @@ module.exports = { // if (!event.traversing) { - // // css transfom fix (doesn't work well with traversing gestures) + // // css transform fix (doesn't work well with traversing gestures) // var transformedCoords = cssTransformCoords(event.firstTarget, event.movementX, event.movementY) // event.movementX = transformedCoords.x // event.movementY = transformedCoords.y @@ -102,7 +102,7 @@ module.exports = { event.offsetY = event.pageY - off.top // if (!event.traversing) { - // // css transfom fix (doesn't work well with traversing gestures) + // // css transform fix (doesn't work well with traversing gestures) // var transformedCoords = cssTransformCoords(event.firstTarget, event.offsetX, event.offsetY) // event.offsetX = transformedCoords.x // event.offsetY = transformedCoords.y diff --git a/src/client/locales/en.js b/src/client/locales/en.js index eb263bf0..bb67ff3d 100644 --- a/src/client/locales/en.js +++ b/src/client/locales/en.js @@ -64,7 +64,7 @@ module.exports = { fullscreen_addtohome: 'You must add this page to your home screen to launch it in fullscreen', // inspector - inspector_error: 'An error just occured, open the console to read more.', + inspector_error: 'An error just occurred, open the console to read more.', // nosleep nosleep: 'Prevent sleep', diff --git a/src/client/parser.js b/src/client/parser.js index 2ee6e8fe..9f4abc8b 100644 --- a/src/client/parser.js +++ b/src/client/parser.js @@ -59,7 +59,7 @@ var Parser = class Parser { if (i.indexOf('_') !== 0 && props[i] === undefined) props[i] = deepCopy(defaults[i]) } - // Genrate widget's id, based on its type + // Generate widget's id, based on its type if (props.id === 'auto' || !props.id) { var id while (!id || widgetManager.getWidgetById(id).length) { diff --git a/src/client/widgets/basics/button.js b/src/client/widgets/basics/button.js index 8f141c2f..14345706 100644 --- a/src/client/widgets/basics/button.js +++ b/src/client/widgets/basics/button.js @@ -36,7 +36,7 @@ class Button extends Widget { 'Set to `null` to send send no argument in the osc message. Must be different from `on`. Ignored if `mode` is `momentary` or `tap`.', ]}, mode: {type: 'string', value: 'toggle', choices: ['toggle', 'push', 'momentary', 'tap'], help: [ - 'Interraction mode:', + 'Interaction mode:', '- `toggle` (classic on/off switch)', '- `push` (press & release)', '- `momentary` (no release, no value sent with the address)', @@ -53,7 +53,7 @@ class Button extends Widget { }) defaults.scripting.onValue.help.push( - 'Additionnal variables:', + 'Additional variables:', '- `locals.touchCoords`: `[x, y]` array representing the touch coordinates, normalized between 0 and 1.' ) diff --git a/src/client/widgets/basics/switch.js b/src/client/widgets/basics/switch.js index 39e5c6c6..735ebc0a 100644 --- a/src/client/widgets/basics/switch.js +++ b/src/client/widgets/basics/switch.js @@ -29,7 +29,7 @@ class Switch extends MenuBase { '`Object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won\'t be kept', ]}, mode: {type: 'string', value: 'tap', choices: ['tap', 'slide', 'click', 'flip'], help: [ - 'Interraction mode:', + 'Interaction mode:', '- `tap`: activates when the pointer is down but prevents further scrolling', '- `slide`: same as `tap` but allows sliding between values', '- `click`: activates upon click only and allows further scrolling', diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index aed6de64..0ddeb5f7 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -124,7 +124,7 @@ class Widget extends EventEmitter { ]}, typeTags: {type: 'string', value: '', help: [ 'Defines the osc argument types, one letter per argument (including preArgs)', - '- If empty, the types are infered automatically from the values (with numbers casted to floats by default)', + '- If empty, the types are inferred automatically from the values (with numbers casted to floats by default)', '- If there are more arguments than type letters, the last type is used for the extra arguments', 'See OSC 1.0 specification for existing typetags' ]}, @@ -1128,7 +1128,7 @@ class Widget extends EventEmitter { }) - // escpape windows absolute file paths + // escape windows absolute file paths css = css.replace(/url\(([^)]*)\)/g, (m, url)=>{ var parser = urlParser(url) if (!parser.protocol.match(/http|data/)) m = m.replace(':', '_:_') diff --git a/src/client/widgets/containers/keyboard.js b/src/client/widgets/containers/keyboard.js index 8f941f1d..4722ca04 100644 --- a/src/client/widgets/containers/keyboard.js +++ b/src/client/widgets/containers/keyboard.js @@ -37,7 +37,7 @@ class Keyboard extends Panel { 'Set to `true` to map the touch coordinates between `off` (top) and `on` (bottom). Requires `on` and `off` to be numbers', ]}, mode: {type: 'string', value: 'push', choices: ['push', 'toggle', 'tap'], help: [ - 'Interraction mode:', + 'Interaction mode:', '- `push` (press & release)', '- `toggle` (on/off switches)', '- `tap` (no release)' diff --git a/src/client/widgets/containers/patchbay.js b/src/client/widgets/containers/patchbay.js index d177f6fa..eef74a1e 100644 --- a/src/client/widgets/containers/patchbay.js +++ b/src/client/widgets/containers/patchbay.js @@ -94,7 +94,7 @@ class PatchBay extends Container(Canvas) { }) defaults.style.css.help.concat( - 'The inputs/ouputs width can be adjusted by using the `.nodes` selector:', + 'The inputs/outputs width can be adjusted by using the `.nodes` selector:', '`.nodes { width: 25% }`', ) diff --git a/src/client/widgets/frames/image.js b/src/client/widgets/frames/image.js index 284fe31a..1edab754 100644 --- a/src/client/widgets/frames/image.js +++ b/src/client/widgets/frames/image.js @@ -87,7 +87,7 @@ module.exports = class Image extends StaticProperties(Widget, {bypass: true}) { var url = this.value, parser = urlParser(url) - // escpape windows absolute file paths + // escape windows absolute file paths if (!parser.protocol.match(/http|data/)) url = url.replace(':', '_:_') url = url.replace(/\\/g, '\\\\') diff --git a/src/client/widgets/sliders/encoder.js b/src/client/widgets/sliders/encoder.js index f63833e8..71162903 100644 --- a/src/client/widgets/sliders/encoder.js +++ b/src/client/widgets/sliders/encoder.js @@ -5,7 +5,7 @@ module.exports = class Encoder extends StaticProperties(Knob, {angle: 360, range static description() { - return 'A knob that sends a relative direction infomation instead of an absolute value.' + return 'A knob that sends a relative direction information instead of an absolute value.' } @@ -45,7 +45,7 @@ module.exports = class Encoder extends StaticProperties(Knob, {angle: 360, range }) defaults.scripting.onValue.help.push( - 'Additionnal variables:', + 'Additional variables:', '- `locals.speed`: encoder\'s speed (reduce `sensitivity` to increase averaging)', '- `locals.angle`: encoder\'s angle in degrees' ) @@ -218,7 +218,7 @@ module.exports = class Encoder extends StaticProperties(Knob, {angle: 360, range ) return - // sensitivity = ingore value updates + // sensitivity = ignore value updates var sensitivityIgnore = false if (this.getProp('sensitivity') < 1) { if (v != this.getProp('release')) { diff --git a/src/client/widgets/sliders/range.js b/src/client/widgets/sliders/range.js index 43d4f3b2..21196817 100644 --- a/src/client/widgets/sliders/range.js +++ b/src/client/widgets/sliders/range.js @@ -162,7 +162,7 @@ class Range extends Fader { if (!i) return - e.inertia = 1 // cancel mutlifinger inertia + e.inertia = 1 // cancel multifinger inertia if (e.shiftKey) { this.faders[0].trigger('drag', e) diff --git a/src/python/head.py b/src/python/head.py index 2011c7c3..6bf01d90 100644 --- a/src/python/head.py +++ b/src/python/head.py @@ -26,7 +26,7 @@ try: except Exception as e: if prebuilt_bin: - ipc_send('log', '(ERROR, MIDI) error while loading MIDI brigde program:\n %s' % (e.message if hasattr(e, 'message') else e)) + ipc_send('log', '(ERROR, MIDI) error while loading MIDI bridge program:\n %s' % (e.message if hasattr(e, 'message') else e)) else: ipc_send('log', '(ERROR, MIDI) error while loading python-rtmidi library (running with python %s):\n %s' % (".".join(map(str, version_info[:3])), e.message if hasattr(e, 'message') else e)) exit() diff --git a/src/scss/ui/workspaces.scss b/src/scss/ui/workspaces.scss index 54c5e94a..2124f631 100644 --- a/src/scss/ui/workspaces.scss +++ b/src/scss/ui/workspaces.scss @@ -292,7 +292,7 @@ osc-panel-inner { // opacity: 0; // } // 100% { -// tranform: scaleX(1); +// transform: scaleX(1); // opacity: var(--alpha-fill); // } // } diff --git a/src/server/callbacks.js b/src/server/callbacks.js index bb372c68..9308c45d 100644 --- a/src/server/callbacks.js +++ b/src/server/callbacks.js @@ -424,7 +424,7 @@ module.exports = { // target: ['host:port', ...], // preArgs: [arg1, ...], // address: '/address', - // typeTags: 'iif' // one letter per arg typetage + // typeTags: 'iif' // one letter per arg typetag // } // } // preArgs, target and typeTags can be empty strings diff --git a/src/server/electron-window.js b/src/server/electron-window.js index 39fb28fe..da95fa39 100644 --- a/src/server/electron-window.js +++ b/src/server/electron-window.js @@ -36,7 +36,7 @@ module.exports = function(options={}) { window.setBounds({x, y, width, height}) - // retreive last geometry + // retrieve last geometry if (settings.read('geometry') && settings.read('geometry')[options.id]) { var geometry = settings.read('geometry')[options.id], mScreen = screen.getDisplayMatching(geometry) diff --git a/src/server/options.js b/src/server/options.js index 6e13a7c2..ad4f9ca7 100644 --- a/src/server/options.js +++ b/src/server/options.js @@ -42,7 +42,7 @@ module.exports = { true : 'Port must be an integer >= 1024' } }, - 'tcp-targets': {type: 'array', describe: 'tcp servers to connect to (ip: port pairs), does not susbtitute for --send', + 'tcp-targets': {type: 'array', describe: 'tcp servers to connect to (ip: port pairs), does not substitute for --send', check: (s, argv)=>{ if (!argv['tcp-port']) return '--tcp-port must be set' return s.some(item=>!item.match(/^[^:]*:[0-9]{4,5}$/)) ? @@ -85,7 +85,7 @@ module.exports = { return a.match(/[^:]*:[^:]+/) ? true : 'Auth must be a user:password pair.' } }, - 'instance-name': {type: 'string', describe: 'used to differenciate multiple instances in a zeroconf network'}, + 'instance-name': {type: 'string', describe: 'used to differentiate multiple instances in a zeroconf network'}, 'use-ssl': {type: 'boolean', describe: 'set to true to use HTTPS protocol instead of HTTP (a self-signed certificate will be created)'}, // cli only diff --git a/src/server/settings.js b/src/server/settings.js index 3f5d20e4..fb90944e 100644 --- a/src/server/settings.js +++ b/src/server/settings.js @@ -5,7 +5,7 @@ var path = require('path'), options = require('./options'), address = require('./address') -// This prevents argv parsing to be breaked when the app is packaged (executed without 'electron' prefix) +// This prevents argv parsing from breaking when the app is packaged (executed without 'electron' prefix) var firstArgIndex = path.basename(process.argv[0]).match(/electron|node/) ? 2 : 1 if (process.env.OSC_SERVER_PROCESS) firstArgIndex++ From ca777f32749e5884bee8c7edcd60d29a8e1dee45 Mon Sep 17 00:00:00 2001 From: Eric Theise Date: Wed, 12 Oct 2022 11:56:06 -0700 Subject: [PATCH 2/3] A few typos fixed, fewer grammatical (English) cleanups. --- CHANGELOG.md | 16 ++++++++-------- resources/docs/docs/user-interface/editor.md | 2 +- resources/docs/docs/widgets/canvas.md | 2 +- .../docs/docs/widgets/properties-reference.md | 2 +- resources/docs/docs/widgets/scripting.md | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9336005e..8ba3ed5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ ## 1.16.4 - bug fixes - - modal: display issue when a modal receives the same value mutliple times + - modal: display issue when a modal receives the same value multiple times - patchbay: `outputs` property not handling object value properly - server: resolution conflict between app files and user files @@ -108,7 +108,7 @@ ## 1.15.5 - bug fixes - - matrix: avanced property issue in`props` property (bis) + - matrix: advanced property issue in `props` property (bis) - editor - inspector: add solo mode with `alt+click` for category panels @@ -116,7 +116,7 @@ ## 1.15.4 - bug fixes - - matrix: avanced property issue in`props` property + - matrix: advanced property issue in `props` property ## 1.15.3 @@ -196,7 +196,7 @@ - button: `locals.touchCoords` not updated since v1.14.0 - widgets - - clone/fragment: remove scripting properties as they are supposed to bo overriden in `props` + - clone/fragment: remove scripting properties as they are supposed to be overridden in `props` ## 1.14.2 @@ -209,7 +209,7 @@ - bug fixes - misc: sending typed arguments (`{type, value}` objects) should override the widget's `typeTags` definition - multixy: errors when `ephemeral` is `true` - - scripting: `setVar` not affecting all widgets when mutliple widgets match provided id + - scripting: `setVar` not affecting all widgets when multiple widgets match provided id - widgets - renamed `script` property to `onValue`, `draw` to `onDraw`, `touch` to `onTouch` @@ -234,7 +234,7 @@ - widgets - canvas: expose touch pressure (as `event.force`) in the `touch` script. - - canvas: expose touch events for extra elements added with the `html` propery + - canvas: expose touch events for extra elements added with the `html` property ## 1.13.1 @@ -247,7 +247,7 @@ - scripting: `storage.getItem()` not returning anything - editor - - new code editor for `script`, `touch`, `draw` and `props` properties with syntax hilighting, line numbers, etc + - new code editor for `script`, `touch`, `draw` and `props` properties with syntax highlighting, line numbers, etc - scripting - `set()`: add an option to prevent target widget's script @@ -262,7 +262,7 @@ - widgets - new **canvas** widget (under `pads`): allows creating custom widgets - - button: expose normalized touch coordinates in scipts as `locals.touchCoords` + - button: expose normalized touch coordinates in scripts as `locals.touchCoords` - print a warning in the console when using advanced syntaxes in the script property ## 1.11.1 diff --git a/resources/docs/docs/user-interface/editor.md b/resources/docs/docs/user-interface/editor.md index 0c7cdb18..3b790b76 100644 --- a/resources/docs/docs/user-interface/editor.md +++ b/resources/docs/docs/user-interface/editor.md @@ -42,7 +42,7 @@ Selected widget's properties are displayed and can be modified in the inspector. - Clicking on a property name spawns a help modal window - Properties are divided into multiple categories that can be toggled with a click. ++alt+"Click"++ on a category closes the other categories before toggling selected category. -Some properties (for example `onValue`) have a special code editor with syntax hilighting and many keyboard shortcuts (available by clicking on the "Help" button). In this properties, pressing `enter` will not submit pending changes and instead insert a new line at the cursor position (as you would expect in a regular editor). To submit pending changes, press ++ctrl+enter++ (or ++cmd+enter== on Mac) or click outside the editor. +Some properties (for example `onValue`) have a special code editor with syntax highlighting and many keyboard shortcuts (available by clicking on the "Help" button). In these properties, pressing `enter` will not submit pending changes but instead insert a new line at the cursor position (as you would expect in a regular editor). To submit pending changes, press ++ctrl+enter++ (or ++cmd+enter== on Mac) or click outside the editor. Widgets can be locked for edition by enabling their `lock` property. When locked, a widget can't be modified by the editor but it remains possible to delete it or to move it from a container to another in the project tree. diff --git a/resources/docs/docs/widgets/canvas.md b/resources/docs/docs/widgets/canvas.md index 0f772078..80695f42 100644 --- a/resources/docs/docs/widgets/canvas.md +++ b/resources/docs/docs/widgets/canvas.md @@ -42,7 +42,7 @@ This script has access to the same variables and functions as the `script` prope - `targetTagName`: tag name of the html element under the pointer - `offsetX`, `offsetY`: touch coordinates in pixels, relative to the html element under the pointer - `movementX`, `movementY`: movement of the pointer in pixels since the last event - - `pointerId`: unique identifier used to differenciate fingers in multitouch situation + - `pointerId`: unique identifier used to differentiate fingers in multitouch situation - `altKey`, `ctrlKey`, `shiftKey`: keyboard modifier states - `force`: amount of pressure applied to the touch surface between `0` and `1` (see [Touch.force](https://developer.mozilla.org/en-US/docs/Web/API/Touch/force)). Equals `0` if the API is not supported or if no pressure information is found. - `radiusX`, `radiusY`, `rotationAngle`: see [Touch.rotationAngle](https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle) diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index 46952160..9201b4aa 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -848,7 +848,7 @@ |
onTouch#
| `script` | "" | Script executed when the widget is touched and released. See documentation. | ??? api "
encoder#
" - A knob that sends a relative direction infomation instead of an absolute value. + A knob that sends relative direction information instead of an absolute value. === "style" diff --git a/resources/docs/docs/widgets/scripting.md b/resources/docs/docs/widgets/scripting.md index dbb7f5bb..86f9d41b 100644 --- a/resources/docs/docs/widgets/scripting.md +++ b/resources/docs/docs/widgets/scripting.md @@ -27,7 +27,7 @@ This script is called when the widget's value updates and when it receives a val The following variables are available in this context: -- `id` (`string`): id of the widget that's reponsible for the value update +- `id` (`string`): id of the widget that's responsible for the value update - `value`: widget's value - `touch`: see [Touch state](#touch-state) @@ -114,7 +114,7 @@ The following variables and functions are accessible in this context. - `platform`: operating system as seen by the client - `session`: session file path - `clipboard`: instance of navigator [Clipboard](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard) -- `Image`: javavscript's [Image](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image) constructor +- `Image`: javascript's [Image](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image) constructor !!! note "this" From e5d3ccf7b5f6fe5216a2fe41a18ee78ebdfe2814 Mon Sep 17 00:00:00 2001 From: Eric Theise Date: Thu, 13 Oct 2022 06:12:10 -0700 Subject: [PATCH 3/3] Change occurrences of 'catched' to 'caught'. --- src/client/widgets/containers/clone.js | 4 ++-- src/server/electron-window.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/widgets/containers/clone.js b/src/client/widgets/containers/clone.js index defc2c40..e012744e 100644 --- a/src/client/widgets/containers/clone.js +++ b/src/client/widgets/containers/clone.js @@ -120,7 +120,7 @@ class Clone extends Container() { getCloneTarget() { - // attempt to acquire a cloneTarget if 'widget-created' event has not been catched + // attempt to acquire a cloneTarget if 'widget-created' event has not been caught // (the target might have been created before the clone itself) var widgets = widgetManager.getWidgetById(this.getProp('widgetId')) @@ -197,7 +197,7 @@ class Clone extends Container() { this.cloneTarget = target // listen for cloneTarget's deletion - // if it is just edited, its recreation will be catched by the global 'widget-created' event handler + // if it is just edited, its recreation will be caught by the global 'widget-created' event handler this.cloneTarget.on('widget-removed', (e)=>{ if (this.cloneTarget === e.widget) { this.unbindTarget() diff --git a/src/server/electron-window.js b/src/server/electron-window.js index da95fa39..3e054136 100644 --- a/src/server/electron-window.js +++ b/src/server/electron-window.js @@ -120,7 +120,7 @@ module.exports = function(options={}) { // already bound to alt+f4 on windows window.webContents.on('before-input-event', (e, input)=>{ // using before-input-event because electron-localshortcut - // gets azerty keyboards wrong (ctrl + z would also be catched) + // gets azerty keyboards wrong (ctrl + z would also be caught) if ((input.key === 'w' || input.key === 'W') && input.control && input.type === 'keyDown') { window.close() }