Skip to content

Commit

Permalink
Merge pull request #489 from rex4539/typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
sisou authored Mar 4, 2024
2 parents f105734 + 330159f commit 906c1f5
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 30 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ for tags with the `data-i18n` attribute and put in the appropriate translation.
<input data-i18n-value="my-value-translation"/>
```

Similarily, I18n will translate the texts for value and placeholder.
Similarly, I18n will translate the texts for value and placeholder.

### Language picker

Expand Down
2 changes: 1 addition & 1 deletion client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</head>
<body>
<button onclick="keyguard.list()">list</button>
<button onclick="keyguard.create()">reate</button>
<button onclick="keyguard.create()">create</button>
<button onclick="signTransaction()">sign-transaction(low, basic)</button>
<button onclick="signTransaction(EncryptionType.HIGH)">sign-transaction(high, basic)</button>
<button onclick="signTransaction(undefined, TransactionType.EXTENDED, 'Hokus pokus!')">sign-transaction(low, extended)</button>
Expand Down
4 changes: 2 additions & 2 deletions client/src/PublicRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export type SignSwapRequestCommon = SimpleRequest & {
| 'sender' // Only known in second step (in swap-iframe)
| 'senderType' // Must be HTLC
| 'senderLabel' // Not used
| 'recipientType' // Must by BASIC (can only redeem to signer adress)
| 'recipientType' // Must be BASIC (can only redeem to signer address)
| 'flags' // Must be NONE, as it cannot be CONTRACT_CREATION
>
& { recipientLabel: string }
Expand Down Expand Up @@ -603,7 +603,7 @@ export type KeyguardError = {
GOTO_CREATE: 'GOTO_CREATE',
// Specifically used to trigger a redirect to a special import after returning to caller
GOTO_RESET_PASSWORD: 'GOTO_RESET_PASSWORD',
// used to signal a user initiated cancelation of the request
// used to signal a user initiated cancellation of the request
CANCELED: 'CANCELED',
// used to signal that the request expired
EXPIRED: 'EXPIRED',
Expand Down
2 changes: 1 addition & 1 deletion demos/rpc.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@
});
}
close() {
// Clean up old requests and disconnect. Note that until the popup get's closed by the user
// Clean up old requests and disconnect. Note that until the popup gets closed by the user
// it's possible to connect again though by calling init.
this._connectionState = 0 /* DISCONNECTED */;
window.removeEventListener('message', this._receiveListener);
Expand Down
2 changes: 1 addition & 1 deletion src/components/DownloadLoginFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class DownloadLoginFile extends Nimiq.Observable {

try {
await new Promise((resolve, reject) => {
// Consider the long-touch successfull after LONG_TOUCH_DURATION
// Consider the long-touch successful after LONG_TOUCH_DURATION
window.setTimeout(resolve, DownloadLoginFile.LONG_TOUCH_DURATION);
this.$loginfile.addEventListener('touchstart', reject, { once: true }); // Second finger cancels overlay
this.$loginfile.addEventListener('touchend', reject, { once: true });
Expand Down
4 changes: 2 additions & 2 deletions src/lib/CookieJar.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ class CookieJar { // eslint-disable-line no-unused-vars
const id = key.substr(2);
return new KeyInfo(id, type, true, hasPin, new Uint8Array(20 /* Nimiq.Address.SERIALIZED_SIZE */));
// Cookies are only eaten during IframeApi.list(), in which the KeyInfo is
// converted into a KeyguardRequest.KeyInfoObject, loosing the 'encrypted' status flag.
// Thus it does not matter what we pass to the KeyInfo contructor here for that flag.
// converted into a KeyguardRequest.KeyInfoObject, losing the 'encrypted' status flag.
// Thus it does not matter what we pass to the KeyInfo constructor here for that flag.
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ErrorConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ErrorConstants = {
GOTO_CREATE: 'GOTO_CREATE',
// Specifically used to trigger a redirect to a special import after returning to caller
GOTO_RESET_PASSWORD: 'GOTO_RESET_PASSWORD',
// used to signal a user initiated cancelation of the request
// used to signal a user initiated cancellation of the request
CANCELED: 'CANCELED',
// used to signal that the request expired
EXPIRED: 'EXPIRED',
Expand Down
4 changes: 2 additions & 2 deletions src/lib/QrScannerWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
function numBetween(value, min, max) {
return value < min ? min : value > max ? max : value;
}
// Like BitMatrix but accepts arbitry Uint8 values
// Like BitMatrix but accepts arbitrary Uint8 values
class Matrix {
constructor(width, height, buffer) {
this.width = width;
Expand Down Expand Up @@ -2571,7 +2571,7 @@
const run = end.x - origin.x;
const towardsEnd = countBlackWhiteRunTowardsPoint(origin, end, matrix, Math.ceil(length / 2));
const awayFromEnd = countBlackWhiteRunTowardsPoint(origin, { x: origin.x - run, y: origin.y - rise }, matrix, Math.ceil(length / 2));
const middleValue = towardsEnd.shift() + awayFromEnd.shift() - 1; // Substract one so we don't double count a pixel
const middleValue = towardsEnd.shift() + awayFromEnd.shift() - 1; // Subtract one so we don't double count a pixel
return awayFromEnd.concat(middleValue).concat(...towardsEnd);
}
// Takes in a black white run and an array of expected ratios. Returns the average size of the run as well as the "error" -
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Utf8Tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Conversion functions taken from
* https://github.com/google/closure-library/blob/master/closure/goog/crypt/crypt.js
*
* UTF-8 validitiy limit values from
* UTF-8 validity limit values from
* https://lemire.me/blog/2018/05/09/how-quickly-can-you-check-that-a-string-is-valid-unicode-utf-8/
*/

Expand Down Expand Up @@ -94,7 +94,7 @@ class Utf8Tools { // eslint-disable-line no-unused-vars
* @returns {boolean}
*/
static isValidUtf8(bytes) {
// We cannot use the build-in TextDecoder to check for validity, as we need to
// We cannot use the built-in TextDecoder to check for validity, as we need to
// also filter out control characters, which are valid UTF8.

let i = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/request/TopLevelApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ class TopLevelApi extends RequestParser {
}

/**
* Can be overwritten by a request's API class to excute code before the handler's run() is called
* Can be overwritten by a request's API class to execute code before the handler's run() is called
* @param {Parsed<T>} parsedRequest
*/
async onBeforeRun(parsedRequest) { // eslint-disable-line no-unused-vars
// noop
}

/**
* Can be overwritten by a request's API class to excute custom code when the user clicks
* Can be overwritten by a request's API class to execute custom code when the user clicks
* the global-cancel button.
* The instantiated handler is passed as the only argument.
* @param {any} handler
Expand Down
4 changes: 0 additions & 4 deletions src/request/export/Export.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@

class Export {
/**
* If a complete page is missing it will be created.
* However these pages wil be the default pages which usually don't match the applications requirements.
* Refer to the corresponsing _buildMoreExportOptions as well as
* the Build functions of ExportWords and ExportFile to see the general Structure.
* @param {Parsed<KeyguardRequest.ExportRequest>} request
* @param {Export.resolve} resolve
* @param {reject} reject
Expand Down
3 changes: 0 additions & 3 deletions src/request/export/ExportFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@

class ExportFile extends Nimiq.Observable {
/**
* if a complete page is missing it will be created.
* However these pages wil be the default pages which usually don't match the applications requirements.
* Refer to the corresponsing _build(Privcy | RecoveryWords | ValidateWords) to see the general Structure.
* @param {Parsed<KeyguardRequest.ExportRequest>} request
* @param {ExportFile.resolve} resolve
* @param {reject} reject
Expand Down
3 changes: 0 additions & 3 deletions src/request/export/ExportWords.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

class ExportWords extends Nimiq.Observable {
/**
* if a complete page is missing it will be created.
* However these pages wil be the default pages which usually don't match the applications requirements.
* Refer to the corresponsing _build(Privcy | RecoveryWords | ValidateWords) to see the general Structure.
* @param {Parsed<KeyguardRequest.ExportRequest>} request
* @param {ExportWords.resolve} resolve
* @param {reject} reject
Expand Down
2 changes: 1 addition & 1 deletion src/request/remove-key/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h1 data-i18n="remove-key-heading" class="nq-h1">Don't lose Access</h1>
</div>
<div>
<div class="question" data-i18n="remove-key-login-file-question">
Is your Login File savely stored and accessible?
Is your Login File safely stored and accessible?
</div>
<button id="show-download-login-file" data-i18n="remove-key-download-login-file"
class="nq-button-s">
Expand Down
2 changes: 1 addition & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@

"remove-key-heading": "Don't lose Access",
"remove-key-intro-text": "If you log out without saving your account, you will irreversibly lose access to it!",
"remove-key-login-file-question": "Is your Login File savely stored and accessible?",
"remove-key-login-file-question": "Is your Login File safely stored and accessible?",
"remove-key-download-login-file": "Download Login File",
"remove-key-recovery-words-question": "Do you know where your Recovery Words are?",
"remove-key-show-recovery-words": "Create a backup",
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/AddressUtils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('AddressUtils', function() {
expect(AddressUtils.isValidAddress('nq7021sy835nv68yq2ahk64auA7gbjbcdb70')).toBe(true);
expect(AddressUtils.isValidAddress(' NQ7021SY 835nv68y Q2AHK64A ua7gbjbc DB70 ')).toBe(true);

// Invalid addressses
// Invalid addresses
expect(AddressUtils.isValidAddress('21SY 835N V68Y Q2AH K64A UA7G BJBC DB70')).toBe(false);
expect(AddressUtils.isValidAddress('NQ71 21SY 835N V68Y Q2AH K64A UA7G BJBC DB70')).toBe(false);
expect(AddressUtils.isValidAddress('NQAB 21SY 835N V68Y Q2AH K64A UA7G BJBC DB70')).toBe(false);
Expand Down
2 changes: 1 addition & 1 deletion tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [ -z "${SHA256SUM}" ]; then
fi

# Detecting whether we're using GNU or BSD sed. There is a small but significant
# idiosyncracy regarding the inplace option (-i).
# idiosyncrasy regarding the inplace option (-i).
# Fair warning: Yes, that's quite a hack, but distinguishing GNU and BSD utils
# isn't that easy.
if sed --in-place 2>&1 | head -1 | grep -q "illegal"; then
Expand Down
2 changes: 1 addition & 1 deletion tools/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function findDependencies(startFile, class2Path, deps) {
}

/**
* Retrieve all script pathes from an HTML file
* Retrieve all script paths from an HTML file
*
* @param {string} indexPath
* @returns {string[]}
Expand Down

0 comments on commit 906c1f5

Please sign in to comment.