Merge pull request #4050 from kianmeng/fix-typos

Fix typos
This commit is contained in:
zadam 2023-06-22 22:33:09 +02:00 committed by GitHub
commit edae1a5d1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 30 additions and 30 deletions

View File

@ -16,7 +16,7 @@ noBackup=false
# host=0.0.0.0 # host=0.0.0.0
# port setting is relevant only for web deployments, desktop builds run on a fixed port (changeable with TRILIUM_PORT environment variable) # port setting is relevant only for web deployments, desktop builds run on a fixed port (changeable with TRILIUM_PORT environment variable)
port=8080 port=8080
# true for TLS/SSL/HTTPS (secure), false for HTTP (unsecure). # true for TLS/SSL/HTTPS (secure), false for HTTP (insecure).
https=false https=false
# path to certificate (run "bash bin/generate-cert.sh" to generate self-signed certificate). Relevant only if https=true # path to certificate (run "bash bin/generate-cert.sh" to generate self-signed certificate). Relevant only if https=true
certPath= certPath=

View File

@ -367,7 +367,7 @@ async function findSimilarNotes(noteId) {
* We want to improve standing of notes which have been created in similar time to each other since * We want to improve standing of notes which have been created in similar time to each other since
* there's a good chance they are related. * there's a good chance they are related.
* *
* But there's an exception - if they were created really close to each other (withing few seconds) then * But there's an exception - if they were created really close to each other (within few seconds) then
* they are probably part of the import and not created by hand - these OTOH should not benefit. * they are probably part of the import and not created by hand - these OTOH should not benefit.
*/ */
const {utcDateCreated} = candidateNote; const {utcDateCreated} = candidateNote;

View File

@ -237,7 +237,7 @@ paths:
schema: schema:
$ref: '#/components/schemas/EntityId' $ref: '#/components/schemas/EntityId'
get: get:
description: Returns note content idenfied by its ID description: Returns note content identified by its ID
operationId: getNoteContent operationId: getNoteContent
responses: responses:
'200': '200':
@ -247,7 +247,7 @@ paths:
schema: schema:
type: string type: string
put: put:
description: Updates note content idenfied by its ID description: Updates note content identified by its ID
operationId: putNoteContentById operationId: putNoteContentById
requestBody: requestBody:
description: html content of note description: html content of note

View File

@ -41,8 +41,8 @@ function initAttributeNameAutocomplete({ $el, attributeType, open }) {
async function initLabelValueAutocomplete({ $el, open, nameCallback }) { async function initLabelValueAutocomplete({ $el, open, nameCallback }) {
if ($el.hasClass("aa-input")) { if ($el.hasClass("aa-input")) {
// we reinit everytime because autocomplete seems to have a bug where it retains state from last // we reinit every time because autocomplete seems to have a bug where it retains state from last
// open even though the value was resetted // open even though the value was reset
$el.autocomplete('destroy'); $el.autocomplete('destroy');
} }

View File

@ -134,7 +134,7 @@ function initNoteAutocomplete($el, options) {
showRecentNotes($el); showRecentNotes($el);
// this will cause the click not give focus to the "show recent notes" button // this will cause the click not give focus to the "show recent notes" button
// this is important because otherwise input will lose focus immediatelly and not show the results // this is important because otherwise input will lose focus immediately and not show the results
return false; return false;
}); });

View File

@ -137,7 +137,7 @@ async function getRenderedContent(note, options = {}) {
$renderedContent.append($content); $renderedContent.append($content);
} }
else if (type === 'canvas') { else if (type === 'canvas') {
// make sure surrounding container has size of what is visible. Then image is shrinked to its boundaries // make sure surrounding container has size of what is visible. Then image is shrunk to its boundaries
$renderedContent.css({height: "100%", width:"100%"}); $renderedContent.css({height: "100%", width:"100%"});
const noteComplement = await froca.getNoteComplement(note.noteId); const noteComplement = await froca.getNoteComplement(note.noteId);

View File

@ -99,7 +99,7 @@ function parseSelectedHtml(selectedHtml) {
if (dom.length > 0 && dom[0].tagName && dom[0].tagName.match(/h[1-6]/i)) { if (dom.length > 0 && dom[0].tagName && dom[0].tagName.match(/h[1-6]/i)) {
const title = $(dom[0]).text(); const title = $(dom[0]).text();
// remove the title from content (only first occurence) // remove the title from content (only first occurrence)
const content = selectedHtml.replace(dom[0].outerHTML, ""); const content = selectedHtml.replace(dom[0].outerHTML, "");
return [title, content]; return [title, content];

View File

@ -157,7 +157,7 @@ class NoteListRenderer {
constructor($parent, parentNote, noteIds, showNotePath = false) { constructor($parent, parentNote, noteIds, showNotePath = false) {
this.$noteList = $(TPL); this.$noteList = $(TPL);
// note list must be added to the DOM immediatelly, otherwise some functionality scripting (canvas) won't work // note list must be added to the DOM immediately, otherwise some functionality scripting (canvas) won't work
$parent.empty(); $parent.empty();
this.parentNote = parentNote; this.parentNote = parentNote;

View File

@ -23,7 +23,7 @@ async function getHeaders(headers) {
} }
if (utils.isElectron()) { if (utils.isElectron()) {
// passing it explicitely here because of the electron HTTP bypass // passing it explicitly here because of the electron HTTP bypass
allHeaders.cookie = document.cookie; allHeaders.cookie = document.cookie;
} }

View File

@ -1,7 +1,7 @@
/** /**
* Fetch note with given ID from backend * Fetch note with given ID from backend
* *
* @param noteId of the given note to be fetched. If falsy, fetches current note. * @param noteId of the given note to be fetched. If false, fetches current note.
*/ */
async function fetchNote(noteId = null) { async function fetchNote(noteId = null) {
if (!noteId) { if (!noteId) {

View File

@ -26,7 +26,7 @@ export default class AbstractBulkAction {
} }
} }
// to be overriden // to be overridden
doRender() {} doRender() {}
async saveAction(data) { async saveAction(data) {

View File

@ -50,7 +50,7 @@ export default class RightDropdownButtonWidget extends BasicWidget {
this.$widget.find(".dropdown-menu").append(this.$dropdownContent); this.$widget.find(".dropdown-menu").append(this.$dropdownContent);
} }
// to be overriden // to be overridden
async dropdownShow() {} async dropdownShow() {}
hideDropdown() { hideDropdown() {

View File

@ -25,7 +25,7 @@ const TPL = `
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label title="Normal (soft) deletion only marks the notes as deleted and they can be undeleted (in recent changes dialog) within a period of time. Checking this option will erase the notes immediatelly and it won't be possible to undelete the notes."> <label title="Normal (soft) deletion only marks the notes as deleted and they can be undeleted (in recent changes dialog) within a period of time. Checking this option will erase the notes immediately and it won't be possible to undelete the notes.">
<input class="erase-notes" value="1" type="checkbox"> <input class="erase-notes" value="1" type="checkbox">
erase notes permanently (can't be undone), including all clones. This will force application reload. erase notes permanently (can't be undone), including all clones. This will force application reload.

View File

@ -9584,7 +9584,7 @@ const icons = [
"term": [ "term": [
"honor", "honor",
"honour", "honour",
"acheivement" "achievement"
] ]
}, },
{ {
@ -9595,7 +9595,7 @@ const icons = [
"term": [ "term": [
"honor", "honor",
"honour", "honour",
"acheivement" "achievement"
] ]
}, },
{ {

View File

@ -166,7 +166,7 @@ export default class NoteMapWidget extends NoteContextAwareWidget {
generateColorFromString(str) { generateColorFromString(str) {
if (this.themeStyle === "dark") { if (this.themeStyle === "dark") {
str = `0${str}`; // magic lightening modifier str = `0${str}`; // magic lightning modifier
} }
let hash = 0; let hash = 0;

View File

@ -1139,7 +1139,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
const note = froca.getNoteFromCache(ecAttr.noteId); const note = froca.getNoteFromCache(ecAttr.noteId);
if (note && note.getChildNoteIds().includes(ecAttr.value)) { if (note && note.getChildNoteIds().includes(ecAttr.value)) {
// there's new/deleted imageLink betwen note and its image child - which can show/hide // there's new/deleted imageLink between note and its image child - which can show/hide
// the image (if there is a imageLink relation between parent and child // the image (if there is a imageLink relation between parent and child
// then it is assumed to be "contained" in the note and thus does not have to be displayed in the tree) // then it is assumed to be "contained" in the note and thus does not have to be displayed in the tree)
noteIdsToReload.add(ecAttr.noteId); noteIdsToReload.add(ecAttr.noteId);

View File

@ -39,7 +39,7 @@ export default class AbstractSearchOption extends Component {
} }
} }
// to be overriden // to be overridden
doRender() {} doRender() {}
async deleteOption() { async deleteOption() {

View File

@ -78,7 +78,7 @@ const TPL = `
* *
* Discussion of storing svg in the note: * Discussion of storing svg in the note:
* - Pro: we will combat bit-rot. Showing the SVG will be very fast and easy, since it is already there. * - Pro: we will combat bit-rot. Showing the SVG will be very fast and easy, since it is already there.
* - Con: The note will get bigger (~40-50%?), we will generate more bandwith. However, using trilium * - Con: The note will get bigger (~40-50%?), we will generate more bandwidth. However, using trilium
* desktop instance mitigates that issue. * desktop instance mitigates that issue.
* *
* Roadmap: * Roadmap:

View File

@ -96,7 +96,7 @@ export default class EtapiOptions extends OptionsWidget {
.append($("<td>").append( .append($("<td>").append(
$('<span class="bx bx-pen token-table-button" title="Rename this token"></span>') $('<span class="bx bx-pen token-table-button" title="Rename this token"></span>')
.on("click", () => this.renameToken(token.etapiTokenId, token.name)), .on("click", () => this.renameToken(token.etapiTokenId, token.name)),
$('<span class="bx bx-trash token-table-button" title="Delete / deactive this token"></span>') $('<span class="bx bx-trash token-table-button" title="Delete / deactivate this token"></span>')
.on("click", () => this.deleteToken(token.etapiTokenId, token.name)) .on("click", () => this.deleteToken(token.etapiTokenId, token.name))
)) ))
); );

View File

@ -412,7 +412,7 @@ export default class RelationMapTypeWidget extends TypeWidget {
} }
}); });
// if there's no event, then this has been triggered programatically // if there's no event, then this has been triggered programmatically
if (!originalEvent) { if (!originalEvent) {
return; return;
} }

View File

@ -11,7 +11,7 @@ function addRecentNote(req) {
}).save(); }).save();
if (Math.random() < 0.05) { if (Math.random() < 0.05) {
// it's not necessary to run this everytime ... // it's not necessary to run this every time ...
const cutOffDate = dateUtils.utcDateTimeStr(new Date(Date.now() - 24 * 3600 * 1000)); const cutOffDate = dateUtils.utcDateTimeStr(new Date(Date.now() - 24 * 3600 * 1000));
sql.execute(`DELETE FROM recent_notes WHERE utcDateCreated < ?`, [cutOffDate]); sql.execute(`DELETE FROM recent_notes WHERE utcDateCreated < ?`, [cutOffDate]);

View File

@ -61,7 +61,7 @@ function checkSync() {
function syncNow() { function syncNow() {
log.info("Received request to trigger sync now."); log.info("Received request to trigger sync now.");
// when explicitly asked for set in progress status immediatelly for faster user feedback // when explicitly asked for set in progress status immediately for faster user feedback
ws.syncPullInProgress(); ws.syncPullInProgress();
return syncService.sync(); return syncService.sync();

View File

@ -352,7 +352,7 @@ class ConsistencyChecks {
({noteId, isProtected, type, mime}) => { ({noteId, isProtected, type, mime}) => {
if (this.autoFix) { if (this.autoFix) {
// it might be possible that the note_content is not available only because of the interrupted // it might be possible that the note_content is not available only because of the interrupted
// sync, and it will come later. It's therefore important to guarantee that this artifical // sync, and it will come later. It's therefore important to guarantee that this artificial
// record won't overwrite the real one coming from the sync. // record won't overwrite the real one coming from the sync.
const fakeDate = "2000-01-01 00:00:00Z"; const fakeDate = "2000-01-01 00:00:00Z";

View File

@ -473,7 +473,7 @@ function downloadImages(noteId, content) {
// once the download is finished, the image note representing downloaded image will be used // once the download is finished, the image note representing downloaded image will be used
// to replace the IMG link. // to replace the IMG link.
// However, there's another flow where user pastes the image and leaves the note before the images // However, there's another flow where user pastes the image and leaves the note before the images
// are downloaded and the IMG references are not updated. For this occassion we have this code // are downloaded and the IMG references are not updated. For this occasion we have this code
// which upon the download of all the images will update the note if the links have not been fixed before // which upon the download of all the images will update the note if the links have not been fixed before
sql.transactional(() => { sql.transactional(() => {

View File

@ -55,7 +55,7 @@ ${bundle.script}\r
} }
/** /**
* THIS METHOD CANT BE ASYNC, OTHERWISE TRANSACTION WRAPPER WON'T BE EFFECTIVE AND WE WILL BE LOSING THE * THIS METHOD CAN'T BE ASYNC, OTHERWISE TRANSACTION WRAPPER WON'T BE EFFECTIVE AND WE WILL BE LOSING THE
* ENTITY CHANGES IN CLS. * ENTITY CHANGES IN CLS.
* *
* This method preserves frontend startNode - that's why we start execution from currentNote and override * This method preserves frontend startNode - that's why we start execution from currentNote and override

View File

@ -13,7 +13,7 @@ class TaskContext {
this.noteDeletionHandlerTriggered = false; this.noteDeletionHandlerTriggered = false;
// progressCount is meant to represent just some progress - to indicate the task is not stuck // progressCount is meant to represent just some progress - to indicate the task is not stuck
this.progressCount = -1; // we're incrementing immediatelly this.progressCount = -1; // we're incrementing immediately
this.lastSentCountTs = 0; // 0 will guarantee first message will be sent this.lastSentCountTs = 0; // 0 will guarantee first message will be sent
// just the fact this has been initialized is a progress which should be sent to clients // just the fact this has been initialized is a progress which should be sent to clients

View File

@ -96,7 +96,7 @@
<li>From the Trilium Menu, click Options.</li> <li>From the Trilium Menu, click Options.</li>
<li>Click on Sync tab.</li> <li>Click on Sync tab.</li>
<li>Change server instance address to: <span id="current-host"></span> and click save.</li> <li>Change server instance address to: <span id="current-host"></span> and click save.</li>
<li>Click "Test sync" button to verify connection is successfull.</li> <li>Click "Test sync" button to verify connection is successful.</li>
<li>Once you've completed these steps, click <a href="/">here</a>.</li> <li>Once you've completed these steps, click <a href="/">here</a>.</li>
</ol> </ol>