Date: Fri, 13 Sep 2024 21:59:19 +0300
Subject: [PATCH 12/20] i18n: Translate the rest of Romanian messages
---
src/public/translations/ro/translation.json | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.json
index a64670d65..c6cfff3c7 100644
--- a/src/public/translations/ro/translation.json
+++ b/src/public/translations/ro/translation.json
@@ -1338,5 +1338,13 @@
},
"show_toc_widget_button": {
"show_toc": "Afișează cuprinsul"
+ },
+ "sync_status": {
+ "connected_no_changes": "Conectat la server-ul de sincronizare.
Toate modificările au fost deja sincronizate.
Clic pentru a forța o sincronizare.
",
+ "connected_with_changes": "Conectat la server-ul de sincronizare.
Există modificări nesincronizate.
Clic pentru a rula o sincronizare.
",
+ "disconnected_no_changes": "Nu s-a putut stabili conexiunea la server-ul de sincronizare.
Toate modificările cunoscute au fost deja sincronizate.
Clic pentru a reîncerca sincronizarea.
",
+ "disconnected_with_changes": "Nu s-a putut realiza conexiunea la server-ul de sincronizare.
Există modificări nesincronizate.
Clic pentru a rula o sincronizare.
",
+ "in_progress": "Sincronizare cu server-ul în curs.",
+ "unknown": "Starea sincronizării va fi cunoscută după o încercare de sincronizare.
Clic pentru a rula sincronizarea acum.
"
}
}
From 17c8708b54977a95ec29d61a0f038faa43278e53 Mon Sep 17 00:00:00 2001
From: Elian Doran
Date: Fri, 13 Sep 2024 22:08:52 +0300
Subject: [PATCH 13/20] client: Translate quick search
---
src/public/app/widgets/quick_search.js | 12 +++++++-----
src/public/translations/en/translation.json | 7 +++++++
src/public/translations/ro/translation.json | 7 +++++++
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/src/public/app/widgets/quick_search.js b/src/public/app/widgets/quick_search.js
index 5e0177ad1..7ae9ada66 100644
--- a/src/public/app/widgets/quick_search.js
+++ b/src/public/app/widgets/quick_search.js
@@ -5,6 +5,7 @@ import froca from "../services/froca.js";
import utils from "../services/utils.js";
import appContext from "../components/app_context.js";
import shortcutService from "../services/shortcuts.js";
+import { t } from "../services/i18n.js";
const TPL = `
@@ -35,7 +36,7 @@ const TPL = `
-
+
`;
const MAX_DISPLAYED_NOTES = 15;
@@ -94,7 +95,7 @@ export default class QuickSearchWidget extends BasicWidget {
}
this.$dropdownMenu.empty();
- this.$dropdownMenu.append(' Searching ...');
+ this.$dropdownMenu.append(`${t("quick-search.searching")}`);
const { searchResultNoteIds, error } = await server.get(`quick-search/${encodeURIComponent(searchString)}`);
@@ -115,7 +116,7 @@ export default class QuickSearchWidget extends BasicWidget {
this.$dropdownMenu.empty();
if (displayedNoteIds.length === 0) {
- this.$dropdownMenu.append('No results found');
+ this.$dropdownMenu.append(`${t("quick-search.no-results")}`);
}
for (const note of await froca.getNotes(displayedNoteIds)) {
@@ -140,11 +141,12 @@ export default class QuickSearchWidget extends BasicWidget {
}
if (searchResultNoteIds.length > MAX_DISPLAYED_NOTES) {
- this.$dropdownMenu.append(`... and ${searchResultNoteIds.length - MAX_DISPLAYED_NOTES} more results.`);
+ const numRemainingResults = (searchResultNoteIds.length - MAX_DISPLAYED_NOTES);
+ this.$dropdownMenu.append(`${t("quick-search.more-results", { number: numRemainingResults })}`);
}
const $showInFullButton = $('')
- .append($(''));
+ .append($(``));
this.$dropdownMenu.append($showInFullButton);
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index 0b477117c..529619706 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -1346,5 +1346,12 @@
},
"mermaid": {
"diagram_error": "The diagram could not be displayed. See help and examples."
+ },
+ "quick-search": {
+ "placeholder": "Quick search",
+ "searching": "Searching...",
+ "no-results": "No results found",
+ "more-results": "... and {{number}} more results.",
+ "show-in-full-search": "Show in full search"
}
}
diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.json
index c6cfff3c7..12bde1277 100644
--- a/src/public/translations/ro/translation.json
+++ b/src/public/translations/ro/translation.json
@@ -1346,5 +1346,12 @@
"disconnected_with_changes": "Nu s-a putut realiza conexiunea la server-ul de sincronizare.
Există modificări nesincronizate.
Clic pentru a rula o sincronizare.
",
"in_progress": "Sincronizare cu server-ul în curs.",
"unknown": "Starea sincronizării va fi cunoscută după o încercare de sincronizare.
Clic pentru a rula sincronizarea acum.
"
+ },
+ "quick-search": {
+ "more-results": "... și încă {{number}} rezultate.",
+ "no-results": "Niciun rezultat găsit",
+ "placeholder": "Căutare rapidă",
+ "searching": "Se caută...",
+ "show-in-full-search": "Afișează în căutare completă"
}
}
From d0061794dd3d2c34f9d4022585f33cdebe1c82ca Mon Sep 17 00:00:00 2001
From: Elian Doran
Date: Fri, 13 Sep 2024 22:17:22 +0300
Subject: [PATCH 14/20] client: Translate note icon
---
src/public/app/widgets/note_icon.js | 6 +++---
src/public/translations/en/translation.json | 5 ++++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/public/app/widgets/note_icon.js b/src/public/app/widgets/note_icon.js
index 771897444..e93e4e09b 100644
--- a/src/public/app/widgets/note_icon.js
+++ b/src/public/app/widgets/note_icon.js
@@ -70,9 +70,9 @@ const TPL = `
`;
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index e778b71d3..3788ec532 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -1356,5 +1356,14 @@
"no-results": "No results found",
"more-results": "... and {{number}} more results.",
"show-in-full-search": "Show in full search"
+ },
+ "note_tree": {
+ "collapse-title": "Collapse note tree",
+ "scroll-active-title": "Scroll to active note",
+ "tree-settings-title": "Tree settings",
+ "hide-archived-notes": "Hide archived notes",
+ "automatically-collapse-notes": "Automatically collapse notes",
+ "automatically-collapse-notes-title": "Notes will be collapsed after period of inactivity to declutter the tree.",
+ "save-changes": "Save & apply changes"
}
}
From 8c222368def3d152408ae25b4687c0f32bceb0ed Mon Sep 17 00:00:00 2001
From: Elian Doran
Date: Fri, 13 Sep 2024 22:26:56 +0300
Subject: [PATCH 16/20] i18n: Translate some more messages in Romanian
---
src/public/translations/ro/translation.json | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.json
index 12bde1277..58b7f20dd 100644
--- a/src/public/translations/ro/translation.json
+++ b/src/public/translations/ro/translation.json
@@ -1331,7 +1331,10 @@
"diagram_error": "Diagrama nu a putut fi afișată. Vedeți informații și exemple pe site-ul oficial."
},
"note_icon": {
- "change_note_icon": "Schimbă iconița notiței"
+ "change_note_icon": "Schimbă iconița notiței",
+ "category": "Categorie:",
+ "reset-default": "Resetează la iconița implicită",
+ "search": "Căutare:"
},
"show_highlights_list_widget_button": {
"show_highlights_list": "Afișează lista de evidențieri"
@@ -1353,5 +1356,14 @@
"placeholder": "Căutare rapidă",
"searching": "Se caută...",
"show-in-full-search": "Afișează în căutare completă"
+ },
+ "note_tree": {
+ "automatically-collapse-notes": "Minimează automat notițele",
+ "automatically-collapse-notes-title": "Notițele vor fi minimizate automat după o perioadă de inactivitate pentru a simplifica ierarhia notițelor.",
+ "collapse-title": "Minimizează ierarhia de notițe",
+ "hide-archived-notes": "Ascunde notițele arhivate",
+ "save-changes": "Salvează și aplică modificările",
+ "scroll-active-title": "Mergi la notița activă",
+ "tree-settings-title": "Setări ale ierarhiei notițelor"
}
}
From 93ca30fda0ee6766922be6a0911b089586b28080 Mon Sep 17 00:00:00 2001
From: Elian Doran
Date: Fri, 13 Sep 2024 22:46:15 +0300
Subject: [PATCH 17/20] build: Fix type not in dev dependencies
---
package-lock.json | 5 +++--
package.json | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 2cf0d0739..402d9c46e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,7 +12,6 @@
"@braintree/sanitize-url": "7.1.0",
"@electron/remote": "2.1.2",
"@excalidraw/excalidraw": "0.17.6",
- "@types/electron-squirrel-startup": "1.0.2",
"archiver": "7.0.1",
"async-mutex": "0.5.0",
"autocomplete.js": "0.38.1",
@@ -117,6 +116,7 @@
"@types/csurf": "1.11.5",
"@types/debounce": "1.2.4",
"@types/ejs": "3.1.5",
+ "@types/electron-squirrel-startup": "1.0.2",
"@types/escape-html": "1.0.4",
"@types/express": "4.17.21",
"@types/express-session": "1.18.0",
@@ -3327,7 +3327,8 @@
"node_modules/@types/electron-squirrel-startup": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@types/electron-squirrel-startup/-/electron-squirrel-startup-1.0.2.tgz",
- "integrity": "sha512-AzxnvBzNh8K/0SmxMmZtpJf1/IWoGXLP+pQDuUaVkPyotI8ryvAtBSqgxR/qOSvxWHYWrxkeNsJ+Ca5xOuUxJQ=="
+ "integrity": "sha512-AzxnvBzNh8K/0SmxMmZtpJf1/IWoGXLP+pQDuUaVkPyotI8ryvAtBSqgxR/qOSvxWHYWrxkeNsJ+Ca5xOuUxJQ==",
+ "dev": true
},
"node_modules/@types/escape-html": {
"version": "1.0.4",
diff --git a/package.json b/package.json
index ddfaa87ed..497c4a0cf 100644
--- a/package.json
+++ b/package.json
@@ -52,7 +52,6 @@
"@braintree/sanitize-url": "7.1.0",
"@electron/remote": "2.1.2",
"@excalidraw/excalidraw": "0.17.6",
- "@types/electron-squirrel-startup": "1.0.2",
"archiver": "7.0.1",
"async-mutex": "0.5.0",
"autocomplete.js": "0.38.1",
@@ -154,6 +153,7 @@
"@types/csurf": "1.11.5",
"@types/debounce": "1.2.4",
"@types/ejs": "3.1.5",
+ "@types/electron-squirrel-startup": "1.0.2",
"@types/escape-html": "1.0.4",
"@types/express": "4.17.21",
"@types/express-session": "1.18.0",
From 51b6725b91b86be12b775a8570da7cc3c316ece6 Mon Sep 17 00:00:00 2001
From: Elian Doran
Date: Fri, 13 Sep 2024 22:54:06 +0300
Subject: [PATCH 18/20] server,electron: Downgrade incompatible libraries for
now
---
package-lock.json | 111 +++++++++++-----------------------------------
package.json | 4 +-
2 files changed, 27 insertions(+), 88 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 402d9c46e..9e9b060da 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -49,10 +49,10 @@
"i18next": "23.15.1",
"i18next-fs-backend": "2.3.2",
"i18next-http-backend": "2.6.1",
- "image-type": "5.2.0",
+ "image-type": "4.1.0",
"ini": "5.0.0",
"is-animated": "2.0.2",
- "is-svg": "5.1.0",
+ "is-svg": "4.3.2",
"jimp": "0.22.12",
"joplin-turndown-plugin-gfm": "1.0.12",
"jquery": "3.7.1",
@@ -8531,24 +8531,18 @@
"license": "MIT"
},
"node_modules/fast-xml-parser": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz",
- "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/NaturalIntelligence"
- },
- {
- "type": "paypal",
- "url": "https://paypal.me/naturalintelligence"
- }
- ],
+ "version": "3.21.1",
+ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
+ "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"dependencies": {
- "strnum": "^1.0.5"
+ "strnum": "^1.0.4"
},
"bin": {
- "fxparser": "src/cli/cli.js"
+ "xml2js": "cli.js"
+ },
+ "funding": {
+ "type": "paypal",
+ "url": "https://paypal.me/naturalintelligence"
}
},
"node_modules/fastest-levenshtein": {
@@ -10375,77 +10369,22 @@
}
},
"node_modules/image-type": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/image-type/-/image-type-5.2.0.tgz",
- "integrity": "sha512-f0+6qHeGfyEh1HhFGPUWZb+Dqqm6raKeeAR6Opt01wBBIQL32/1wpZkPQm8gcliB/Ws6oiX2ofFYXB57+CV0iQ==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/image-type/-/image-type-4.1.0.tgz",
+ "integrity": "sha512-CFJMJ8QK8lJvRlTCEgarL4ro6hfDQKif2HjSvYCdQZESaIPV4v9imrf7BQHK+sQeTeNeMpWciR9hyC/g8ybXEg==",
"dependencies": {
- "file-type": "^18.1.0"
+ "file-type": "^10.10.0"
},
"engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=6"
}
},
"node_modules/image-type/node_modules/file-type": {
- "version": "18.7.0",
- "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.7.0.tgz",
- "integrity": "sha512-ihHtXRzXEziMrQ56VSgU7wkxh55iNchFkosu7Y9/S+tXHdKyrGjVK0ujbqNnsxzea+78MaLhN6PGmfYSAv1ACw==",
- "dependencies": {
- "readable-web-to-node-stream": "^3.0.2",
- "strtok3": "^7.0.0",
- "token-types": "^5.0.1"
- },
+ "version": "10.11.0",
+ "resolved": "https://registry.npmjs.org/file-type/-/file-type-10.11.0.tgz",
+ "integrity": "sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw==",
"engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/file-type?sponsor=1"
- }
- },
- "node_modules/image-type/node_modules/peek-readable": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.2.0.tgz",
- "integrity": "sha512-U94a+eXHzct7vAd19GH3UQ2dH4Satbng0MyYTMaQatL0pvYYL5CTPR25HBhKtecl+4bfu1/i3vC6k0hydO5Vcw==",
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/Borewit"
- }
- },
- "node_modules/image-type/node_modules/strtok3": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.1.1.tgz",
- "integrity": "sha512-mKX8HA/cdBqMKUr0MMZAFssCkIGoZeSCMXgnt79yKxNFguMLVFgRe6wB+fsL0NmoHDbeyZXczy7vEPSoo3rkzg==",
- "dependencies": {
- "@tokenizer/token": "^0.3.0",
- "peek-readable": "^5.1.3"
- },
- "engines": {
- "node": ">=16"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/Borewit"
- }
- },
- "node_modules/image-type/node_modules/token-types": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz",
- "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==",
- "dependencies": {
- "@tokenizer/token": "^0.3.0",
- "ieee754": "^1.2.1"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/Borewit"
+ "node": ">=6"
}
},
"node_modules/immediate": {
@@ -10784,14 +10723,14 @@
}
},
"node_modules/is-svg": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-5.1.0.tgz",
- "integrity": "sha512-uVg5yifaTxHoefNf5Jcx+i9RZe2OBYd/UStp1umx+EERa4xGRa3LLGXjoEph43qUORC0qkafUgrXZ6zzK89yGA==",
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.3.2.tgz",
+ "integrity": "sha512-mM90duy00JGMyjqIVHu9gNTjywdZV+8qNasX8cm/EEYZ53PHDgajvbBwNVvty5dwSAxLUD3p3bdo+7sR/UMrpw==",
"dependencies": {
- "fast-xml-parser": "^4.4.1"
+ "fast-xml-parser": "^3.19.0"
},
"engines": {
- "node": ">=14.16"
+ "node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
diff --git a/package.json b/package.json
index 497c4a0cf..a9fe22ec8 100644
--- a/package.json
+++ b/package.json
@@ -89,10 +89,10 @@
"i18next": "23.15.1",
"i18next-fs-backend": "2.3.2",
"i18next-http-backend": "2.6.1",
- "image-type": "5.2.0",
+ "image-type": "4.1.0",
"ini": "5.0.0",
"is-animated": "2.0.2",
- "is-svg": "5.1.0",
+ "is-svg": "4.3.2",
"jimp": "0.22.12",
"joplin-turndown-plugin-gfm": "1.0.12",
"jquery": "3.7.1",
From 28b8e59b4dc47f0425713acc2f39df071f423419 Mon Sep 17 00:00:00 2001
From: Elian Doran
Date: Fri, 13 Sep 2024 22:56:30 +0300
Subject: [PATCH 19/20] electron: Translate title bar button
---
src/public/app/widgets/title_bar_buttons.js | 3 ++-
src/public/translations/en/translation.json | 3 +++
src/public/translations/ro/translation.json | 3 +++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/public/app/widgets/title_bar_buttons.js b/src/public/app/widgets/title_bar_buttons.js
index ef5d5a816..edb270f77 100644
--- a/src/public/app/widgets/title_bar_buttons.js
+++ b/src/public/app/widgets/title_bar_buttons.js
@@ -1,6 +1,7 @@
import BasicWidget from "./basic_widget.js";
import options from "../services/options.js";
import utils from "../services/utils.js";
+import { t } from "../services/i18n.js";
const TPL = `