From 5c5e006e469cc485f9ff36ab94b9561b12112190 Mon Sep 17 00:00:00 2001 From: GitHubPang <61439577+GitHubPang@users.noreply.github.com> Date: Tue, 18 Aug 2020 15:55:16 +0800 Subject: [PATCH] docs: fix typos (#24982) * docs: sync table of content from pull-requests.md to CONTRIBUTING.md This also fixes some incorrect / dead links. * docs: fix a bunch of typos --- CONTRIBUTING.md | 8 ++++---- docs/api/app.md | 12 ++++++------ docs/api/crash-reporter.md | 2 +- docs/api/dialog.md | 2 +- docs/api/modernization/overview.md | 2 +- docs/api/native-theme.md | 2 +- docs/api/session.md | 4 ++-- docs/api/shell.md | 2 +- docs/api/structures/desktop-capturer-source.md | 2 +- docs/api/structures/printer-info.md | 2 +- docs/api/system-preferences.md | 2 +- docs/api/web-contents.md | 12 ++++++------ docs/development/pull-requests.md | 2 +- docs/tutorial/mojave-dark-mode-guide.md | 2 +- docs/tutorial/windows-arm.md | 4 ++-- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 61cbc75b9467c..b2f386c11cf59 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,17 +47,17 @@ dependencies, and tools contained in the `electron/electron` repository. * [Step 1: Fork](https://electronjs.org/docs/development/pull-requests#step-1-fork) * [Step 2: Build](https://electronjs.org/docs/development/pull-requests#step-2-build) * [Step 3: Branch](https://electronjs.org/docs/development/pull-requests#step-3-branch) -* [The Process of Making Changes](https://electronjs.org/docs/development/pull-requests#the-process-of-making-changes) +* [Making Changes](https://electronjs.org/docs/development/pull-requests#making-changes) * [Step 4: Code](https://electronjs.org/docs/development/pull-requests#step-4-code) * [Step 5: Commit](https://electronjs.org/docs/development/pull-requests#step-5-commit) * [Commit message guidelines](https://electronjs.org/docs/development/pull-requests#commit-message-guidelines) * [Step 6: Rebase](https://electronjs.org/docs/development/pull-requests#step-6-rebase) * [Step 7: Test](https://electronjs.org/docs/development/pull-requests#step-7-test) * [Step 8: Push](https://electronjs.org/docs/development/pull-requests#step-8-push) - * [Step 8: Opening the Pull Request](https://electronjs.org/docs/development/pull-requests#step-8-opening-the-pull-request) - * [Step 9: Discuss and Update](#step-9-discuss-and-update) + * [Step 9: Opening the Pull Request](https://electronjs.org/docs/development/pull-requests#step-9-opening-the-pull-request) + * [Step 10: Discuss and Update](https://electronjs.org/docs/development/pull-requests#step-10-discuss-and-update) * [Approval and Request Changes Workflow](https://electronjs.org/docs/development/pull-requests#approval-and-request-changes-workflow) - * [Step 10: Landing](https://electronjs.org/docs/development/pull-requests#step-10-landing) + * [Step 11: Landing](https://electronjs.org/docs/development/pull-requests#step-11-landing) * [Continuous Integration Testing](https://electronjs.org/docs/development/pull-requests#continuous-integration-testing) ## Style Guides diff --git a/docs/api/app.md b/docs/api/app.md index e424f43856d63..9c690899a39c1 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -370,7 +370,7 @@ Returns: Emitted when the GPU process crashes or is killed. **Deprecated:** This event is superceded by the `child-process-gone` event -which contains more information about why the child process dissapeared. It +which contains more information about why the child process disappeared. It isn't always because it crashed. The `killed` boolean can be replaced by checking `reason === 'killed'` when you switch to that event. @@ -385,7 +385,7 @@ Returns: Emitted when the renderer process of `webContents` crashes or is killed. **Deprecated:** This event is superceded by the `render-process-gone` event -which contains more information about why the render process dissapeared. It +which contains more information about why the render process disappeared. It isn't always because it crashed. The `killed` boolean can be replaced by checking `reason === 'killed'` when you switch to that event. @@ -405,7 +405,7 @@ Returns: * `launch-failure` - Process never successfully launched * `integrity-failure` - Windows code integrity checks failed -Emitted when the renderer process unexpectedly dissapears. This is normally +Emitted when the renderer process unexpectedly disappears. This is normally because it was crashed or killed. #### Event: 'child-process-gone' @@ -435,7 +435,7 @@ Returns: * `name` String (optional) - The name of the process. i.e. for plugins it might be Flash. Examples for utility: `Audio Service`, `Content Decryption Module Service`, `Network Service`, `Video Capture`, etc. -Emitted when the child process unexpectedly dissapears. This is normally +Emitted when the child process unexpectedly disappears. This is normally because it was crashed or killed. It does not include renderer processes. ### Event: 'accessibility-support-changed' _macOS_ _Windows_ @@ -1222,7 +1222,7 @@ Returns `Object`: * `path` String _Windows_ - The executable to an app that corresponds to a registry entry. * `args` String[] _Windows_ - the command-line arguments to pass to the executable. * `scope` String _Windows_ - one of `user` or `machine`. Indicates whether the registry entry is under `HKEY_CURRENT USER` or `HKEY_LOCAL_MACHINE`. - * `enabled` Boolean _Windows_ - `true` if the app registry key is startup approved and therfore shows as `enabled` in Task Manager and Windows settings. + * `enabled` Boolean _Windows_ - `true` if the app registry key is startup approved and therefore shows as `enabled` in Task Manager and Windows settings. ### `app.setLoginItemSettings(settings)` _macOS_ _Windows_ @@ -1356,7 +1356,7 @@ method returns false. If we fail to perform the copy, then this method will throw an error. The message in the error should be informative and tell you exactly what went wrong. -By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing. +By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing. For example: diff --git a/docs/api/crash-reporter.md b/docs/api/crash-reporter.md index ee8116642f298..874d030f39994 100644 --- a/docs/api/crash-reporter.md +++ b/docs/api/crash-reporter.md @@ -170,7 +170,7 @@ your crash reporting backend you should stitch together keys in this format. * `key` String - Parameter key, must be no longer than 39 bytes. -Remove a extra parameter from the current set of parameters. Future crashes +Remove an extra parameter from the current set of parameters. Future crashes will not include this parameter. ### `crashReporter.getParameters()` diff --git a/docs/api/dialog.md b/docs/api/dialog.md index c3903ce73af6b..d12f72b73a3eb 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -269,7 +269,7 @@ Shows a message box, it will block the process until the message box is closed. It returns the index of the clicked button. The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal. -If `browserWindow` is not shown dialog will not be attached to it. In such case It will be displayed as independed window. +If `browserWindow` is not shown dialog will not be attached to it. In such case it will be displayed as an independent window. ### `dialog.showMessageBox([browserWindow, ]options)` diff --git a/docs/api/modernization/overview.md b/docs/api/modernization/overview.md index f0df4d9994768..88498369abbd6 100644 --- a/docs/api/modernization/overview.md +++ b/docs/api/modernization/overview.md @@ -1,6 +1,6 @@ ## Modernization -The Electron team is currently undergoing an initiative to modernize our API in a few concrete ways. These include: updating our modules to use idiomatic JS properties instead of separate `getPropertyX` and `setpropertyX`, converting callbacks to promises, and removing some other anti-patterns present in our APIs. The current status of the Promise intiative can be tracked in the [promisification](promisification.md) tracking file. +The Electron team is currently undergoing an initiative to modernize our API in a few concrete ways. These include: updating our modules to use idiomatic JS properties instead of separate `getPropertyX` and `setpropertyX`, converting callbacks to promises, and removing some other anti-patterns present in our APIs. The current status of the Promise initiative can be tracked in the [promisification](promisification.md) tracking file. As we work to perform these updates, we seek to create the least disruptive amount of change at any given time, so as many changes as possible will be introduced in a backward compatible manner and deprecated after enough time has passed to give users a chance to upgrade their API calls. diff --git a/docs/api/native-theme.md b/docs/api/native-theme.md index 6a710656babd9..166e0125a8e04 100644 --- a/docs/api/native-theme.md +++ b/docs/api/native-theme.md @@ -58,7 +58,7 @@ Your application should then always use `shouldUseDarkColors` to determine what ### `nativeTheme.shouldUseHighContrastColors` _macOS_ _Windows_ _Readonly_ A `Boolean` for if the OS / Chromium currently has high-contrast mode enabled -or is being instructed to show a high-constrast UI. +or is being instructed to show a high-contrast UI. ### `nativeTheme.shouldUseInvertedColorScheme` _macOS_ _Windows_ _Readonly_ diff --git a/docs/api/session.md b/docs/api/session.md index 57fda024fa37c..d78a7e4306bd5 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -389,7 +389,7 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents * `permission` String - Enum of 'media'. * `requestingOrigin` String - The origin URL of the permission check * `details` Object - Some properties are only available on certain permission types. - * `securityOrigin` String - The security orign of the `media` check. + * `securityOrigin` String - The security origin of the `media` check. * `mediaType` String - The type of media access being requested, can be `video`, `audio` or `unknown` * `requestingUrl` String - The last URL the requesting frame loaded @@ -526,7 +526,7 @@ Returns `String[]` - An array of language codes the spellchecker is enabled for. will fallback to using `en-US`. By default on launch if this setting is an empty list Electron will try to populate this setting with the current OS locale. This setting is persisted across restarts. -**Note:** On macOS the OS spellchecker is used and has it's own list of languages. This API is a no-op on macOS. +**Note:** On macOS the OS spellchecker is used and has its own list of languages. This API is a no-op on macOS. #### `ses.setSpellCheckerDictionaryDownloadURL(url)` diff --git a/docs/api/shell.md b/docs/api/shell.md index 15d11160e3f11..404d5b7bfd58b 100644 --- a/docs/api/shell.md +++ b/docs/api/shell.md @@ -30,7 +30,7 @@ Show the given file in a file manager. If possible, select the file. * `path` String -Returns `Promise` - Resolves with an string containing the error message corresponding to the failure if a failure occurred, otherwise "". +Returns `Promise` - Resolves with a string containing the error message corresponding to the failure if a failure occurred, otherwise "". Open the given file in the desktop's default manner. diff --git a/docs/api/structures/desktop-capturer-source.md b/docs/api/structures/desktop-capturer-source.md index ffb34b79b7dda..2f11197b058fd 100644 --- a/docs/api/structures/desktop-capturer-source.md +++ b/docs/api/structures/desktop-capturer-source.md @@ -19,5 +19,5 @@ available. * `appIcon` [NativeImage](../native-image.md) - An icon image of the application that owns the window or null if the source has a type screen. - The size of the icon is not known in advance and depends on what the + The size of the icon is not known in advance and depends on what the application provides. diff --git a/docs/api/structures/printer-info.md b/docs/api/structures/printer-info.md index 6010b9ee4c4d0..7878b4b73b12e 100644 --- a/docs/api/structures/printer-info.md +++ b/docs/api/structures/printer-info.md @@ -7,7 +7,7 @@ * `isDefault` Boolean - whether or not a given printer is set as the default printer on the OS. * `options` Object - an object containing a variable number of platform-specific printer information. -The number represented by `status` means different things on different platforms: on Windows it's potential values can be found [here](https://docs.microsoft.com/en-us/windows/win32/printdocs/printer-info-2), and on Linux and macOS they can be found [here](https://www.cups.org/doc/cupspm.html). +The number represented by `status` means different things on different platforms: on Windows its potential values can be found [here](https://docs.microsoft.com/en-us/windows/win32/printdocs/printer-info-2), and on Linux and macOS they can be found [here](https://www.cups.org/doc/cupspm.html). ## Example diff --git a/docs/api/system-preferences.md b/docs/api/system-preferences.md index 234c3f722c4cd..5ba7e7a52e3f3 100644 --- a/docs/api/system-preferences.md +++ b/docs/api/system-preferences.md @@ -406,7 +406,7 @@ systemPreferences.promptTouchID('To get consent for a Security-Gated Thing').the }) ``` -This API itself will not protect your user data; rather, it is a mechanism to allow you to do so. Native apps will need to set [Access Control Constants](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags?language=objc) like [`kSecAccessControlUserPresence`](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags/ksecaccesscontroluserpresence?language=objc) on the their keychain entry so that reading it would auto-prompt for Touch ID biometric consent. This could be done with [`node-keytar`](https://github.com/atom/node-keytar), such that one would store an encryption key with `node-keytar` and only fetch it if `promptTouchID()` resolves. +This API itself will not protect your user data; rather, it is a mechanism to allow you to do so. Native apps will need to set [Access Control Constants](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags?language=objc) like [`kSecAccessControlUserPresence`](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags/ksecaccesscontroluserpresence?language=objc) on their keychain entry so that reading it would auto-prompt for Touch ID biometric consent. This could be done with [`node-keytar`](https://github.com/atom/node-keytar), such that one would store an encryption key with `node-keytar` and only fetch it if `promptTouchID()` resolves. **NOTE:** This API will return a rejected Promise on macOS systems older than Sierra 10.12.2. diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 0aa5609c9344d..a989b7a4a4b76 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -256,7 +256,7 @@ Returns: Emitted after a server side redirect occurs during navigation. For example a 302 redirect. -This event can not be prevented, if you want to prevent redirects you should +This event cannot be prevented, if you want to prevent redirects you should checkout out the `will-redirect` event above. #### Event: 'did-navigate' @@ -348,7 +348,7 @@ Returns: Emitted when the renderer process crashes or is killed. **Deprecated:** This event is superceded by the `render-process-gone` event -which contains more information about why the render process dissapeared. It +which contains more information about why the render process disappeared. It isn't always because it crashed. The `killed` boolean can be replaced by checking `reason === 'killed'` when you switch to that event. @@ -367,7 +367,7 @@ Returns: * `launch-failure` - Process never successfully launched * `integrity-failure` - Windows code integrity checks failed -Emitted when the renderer process unexpectedly dissapears. This is normally +Emitted when the renderer process unexpectedly disappears. This is normally because it was crashed or killed. #### Event: 'unresponsive' @@ -720,7 +720,7 @@ This event can be used to configure `webPreferences` for the `webContents` of a `` before it's loaded, and provides the ability to set settings that can't be set via `` attributes. -**Note:** The specified `preload` script option will be appear as `preloadURL` +**Note:** The specified `preload` script option will appear as `preloadURL` (not `preload`) in the `webPreferences` object emitted with this event. #### Event: 'did-attach-webview' @@ -1255,7 +1255,7 @@ is large then 0. #### `contents.incrementCapturerCount([size, stayHidden])` -* `size` [Size](structures/size.md) (optional) - The perferred size for the capturer. +* `size` [Size](structures/size.md) (optional) - The preferred size for the capturer. * `stayHidden` Boolean (optional) - Keep the page hidden instead of visible. Increase the capturer count by one. The page is considered visible when its browser window is @@ -1311,7 +1311,7 @@ Returns [`PrinterInfo[]`](structures/printer-info.md) * `success` Boolean - Indicates success of the print call. * `failureReason` String - Error description called back if the print fails. -When a custom `pageSize` is passed, Chromium attempts to validate platform specific minumum values for `width_microns` and `height_microns`. Width and height must both be minimum 353 microns but may be higher on some operating systems. +When a custom `pageSize` is passed, Chromium attempts to validate platform specific minimum values for `width_microns` and `height_microns`. Width and height must both be minimum 353 microns but may be higher on some operating systems. Prints window's web page. When `silent` is set to `true`, Electron will pick the system's default printer if `deviceName` is empty and the default settings for printing. diff --git a/docs/development/pull-requests.md b/docs/development/pull-requests.md index 9d39578b34353..b48dea4ce00c8 100644 --- a/docs/development/pull-requests.md +++ b/docs/development/pull-requests.md @@ -233,7 +233,7 @@ Try not to be discouraged. If you feel that a review is unfair, say so or seek the input of another project contributor. Often such comments are the result of a reviewer having taken insufficient time to review and are not ill-intended. Such difficulties can often be resolved with a bit of patience. That said, -reviewers should be expected to provide helpful feeback. +reviewers should be expected to provide helpful feedback. ### Step 11: Landing diff --git a/docs/tutorial/mojave-dark-mode-guide.md b/docs/tutorial/mojave-dark-mode-guide.md index 3744361f3d9f8..e7af1936e6b18 100644 --- a/docs/tutorial/mojave-dark-mode-guide.md +++ b/docs/tutorial/mojave-dark-mode-guide.md @@ -17,7 +17,7 @@ to automate the `Info.plist` changes during app build time. anything where the UI comes from macOS and not your app. As of Electron 7.0.0, the default behavior is to opt into this automatic theming from the OS. If you wish to opt-out and are using Electron > 8.0.0, you must set the `NSRequiresAquaSystemAppearance` key in the `Info.plist` file to `true`. -Please note that Electron 8.0.0 and above will not let your opt-out of this theming, due to the use +Please note that Electron 8.0.0 and above will not let you opt-out of this theming, due to the use of the macOS 10.14 SDK. ## Automatically updating your own interfaces diff --git a/docs/tutorial/windows-arm.md b/docs/tutorial/windows-arm.md index 8413b7955a795..29f139e7d2881 100644 --- a/docs/tutorial/windows-arm.md +++ b/docs/tutorial/windows-arm.md @@ -26,7 +26,7 @@ if (process.arch === 'x64') { If you want to target arm64, logic like this will typically select the wrong architecture, so carefully check your application and build scripts for conditions like this. In custom build and packaging scripts, you should always check the value of `npm_config_arch` in the environment, rather than relying on the current process arch. ### Native modules -If you use native modules, you must make sure that that they compile against v142 of the MSVC compiler (provided in Visual Studio 2017). You must also check that any pre-built `.dll` or or `.lib` files provided or referenced by the native module are available for Windows on Arm. +If you use native modules, you must make sure that they compile against v142 of the MSVC compiler (provided in Visual Studio 2017). You must also check that any pre-built `.dll` or `.lib` files provided or referenced by the native module are available for Windows on Arm. ### Testing your app To test your app, use a Windows on Arm device running Windows 10 (version 1903 or later). Make sure that you copy your application over to the target device - Chromium's sandbox will not work correctly when loading your application assets from a network location. @@ -84,7 +84,7 @@ After completing all of the above, open your cross-compilation command prompt an Debugging native modules can be done with Visual Studio 2017 (running on your development machine) and corresponding [Visual Studio Remote Debugger](https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging-cpp?view=vs-2019) running on the target device. To debug: -1. Lanch your app `.exe` on the target device via the _Command Prompt_ (passing `--inspect-brk` to pause it before any native modules are loaded). +1. Launch your app `.exe` on the target device via the _Command Prompt_ (passing `--inspect-brk` to pause it before any native modules are loaded). 2. Launch Visual Studio 2017 on your development machine. 3. Connect to the target device by selecting _Debug > Attach to Process..._ and enter the device's IP address and the port number displayed by the Visual Studio Remote Debugger tool. 4. Click _Refresh_ and select the [appropriate Electron process to attach](../development/debug-instructions-windows.md).