1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-09-02 20:46:21 +02:00

Compare commits

...

76 Commits

Author SHA1 Message Date
Laurent Cozic
23e6e6e69d Android release v1.0.241 2019-03-10 20:35:01 +00:00
Laurent Cozic
ade5af2559 Electron release v1.0.140 2019-03-10 20:32:43 +00:00
Laurent Cozic
0a993dc012 Update translations 2019-03-10 20:32:28 +00:00
xcffl
4baa46507f update zh-CN translation (#1321) 2019-03-10 20:31:39 +00:00
Laurent Cozic
0d8878abd3 Mobile: For now, make notebooks sorted by title 2019-03-10 20:30:31 +00:00
Helmut K. C. Tessarek
f962084591 Merge pull request #1318 from Ouvill/feature/update_jp_translation
update jp translation
2019-03-10 00:48:35 -05:00
Helmut K. C. Tessarek
921b45286b Merge pull request #1316 from tessus/localization-de_DE
Update de_DE.po
2019-03-10 00:48:13 -05:00
Ouvill
301bfed05e update jp translation 2019-03-09 12:56:55 +09:00
Helmut K. C. Tessarek
62e7d6fa86 Update de_DE.po 2019-03-08 13:51:08 -05:00
Laurent Cozic
7e34cd4452 Android release v1.0.240 2019-03-08 17:43:01 +00:00
Laurent Cozic
b35cb9a7ab Electron release v1.0.139 2019-03-08 17:40:11 +00:00
Laurent Cozic
18b836525c Updated translations 2019-03-08 17:39:26 +00:00
Caleb John
e34e49b88d Add joplin.desktop file for xfce and mate desktops (#1304) 2019-03-08 17:33:15 +00:00
Renato Rosa
5bf879c2d9 Update pt_BR.po (#1303)
Minor typo fixed.
2019-03-08 17:33:01 +00:00
Joel Simpson
61d6309c0e Desktop: Adding progress bar and text changes to install script. (#1294) 2019-03-08 17:32:20 +00:00
Helmut K. C. Tessarek
17c9c0f9ef Mobile: version info changes (#1290)
* update the version info string for mobiles to be consistent with the desktop

Joplin vX.Y.Z -> Joplin X.Y.Z
hardcoded the string. Joplin is a product name, no need for translation.

* show version as X.Y.Z in update dialog

* update .po files so that the previous commit won't break translations

* tag -> Schlagwort
2019-03-08 17:31:48 +00:00
Laurent Cozic
9bd62fd3d4 All: Refresh folder order when a new folder is added or modified 2019-03-08 17:25:32 +00:00
Laurent Cozic
de73d4baa7 Minor issue 2019-03-08 17:19:06 +00:00
Laurent Cozic
379ff5163b Merge branch 'master' of github.com:laurent22/joplin 2019-03-08 17:18:31 +00:00
Laurent Cozic
d9538ccb08 No longer using fixed IDs 2019-03-08 17:17:37 +00:00
Laurent Cozic
9289dbdf77 All: Refactor Markdown rendering (#1315)
* Refactoring MdToHtml to avoid manually rendering tokens

* Minor fix

* Fixed loading of resources

* Handle clicking on checkboxes

* Added back Katex support

* Fixed issues with Katex and note rendering

* Added back support for links

* Restored code block highlighting support

* clean up

* Applying update to mobile

* Fixed handling of links and cleaned up to share more code between mobile and desktop

* Restored content caching and improved handling of additional assets

* Clean up and a few fixes

* Applied more updates to mobile and added code highlighting support
2019-03-08 17:14:17 +00:00
Laurent Cozic
5719ae495a Merge branch 'master' of github.com:laurent22/joplin 2019-03-08 17:13:07 +00:00
Helmut K. C. Tessarek
a89e3b7924 fix another minor typo 2019-03-08 03:34:48 -05:00
Helmut K. C. Tessarek
e576d09712 Merge pull request #1310 from lyndonbarrie/master
fix spelling mistake
2019-03-08 03:12:33 -05:00
lyndonbarrie
43600a7824 fix spelling mistake 2019-03-07 09:13:34 +00:00
Laurent Cozic
921f01d9dc Desktop: Fixed regression on external edit 2019-03-06 22:22:37 +00:00
Laurent Cozic
dec5668582 CLI: Added command to decrypt a file 2019-03-05 20:57:15 +00:00
Laurent Cozic
e30bc12354 All: Disabled Mermaid support for now 2019-03-06 07:11:55 +00:00
Laurent Cozic
fca4fa666d Electron release v1.0.138 2019-03-03 17:14:28 +00:00
Laurent Cozic
59478160c8 Added Arabic translation 2019-03-03 17:14:17 +00:00
Laurent Cozic
8110fe89ef Electron release v1.0.137 2019-03-03 00:59:04 +00:00
Laurent Cozic
c7ed1b5eae Trying to fix Windows 32-bit build 2019-03-03 00:58:41 +00:00
Laurent Cozic
25951e7097 Trying to fix Windows 32-bit build 2019-03-03 00:51:54 +00:00
Laurent Cozic
687b9d1bef All: Improve rendering of Mermaid graphs 2019-03-03 00:31:41 +00:00
Laurent Cozic
630e77b9eb Electron release v1.0.136 2019-03-02 23:40:58 +00:00
Laurent Cozic
68ff2e17b3 Trying to fix Windows 32-bit build 2019-03-02 23:35:18 +00:00
Laurent Cozic
945d83608a All: Include injected Mermaid JS only when necessary 2019-03-02 23:22:41 +00:00
Laurent Cozic
833d473268 Desktop: Resolves #206: Added support for sorting notebooks by title or last modified 2019-03-02 17:35:57 +00:00
Laurent Cozic
2256b0c5ec Desktop: Fixes very slow startup since Electron 4 upgrade 2019-02-28 23:24:28 +00:00
Laurent Cozic
677aa7d59b Merge branch 'master' of github.com:laurent22/joplin 2019-02-28 22:32:47 +00:00
Laurent Cozic
4363005e92 All: Resolves #1105: Added support for macro persistence for Katex 2019-02-28 22:32:29 +00:00
Helmut K. C. Tessarek
2e3ef618db Merge pull request #1271 from RenatoXSR/pt_BR-update-20190227
Updated pt_BR locale to correct unicode char escapes.
2019-02-27 21:16:43 -05:00
Laurent Cozic
1adbbd14c6 Fix images 2019-02-28 00:36:44 +00:00
Laurent Cozic
4dfd7db729 Fixing image 2019-02-28 00:28:46 +00:00
Laurent Cozic
e70562a102 Fixing image 2019-02-28 00:27:25 +00:00
Laurent Cozic
a0e5947ba4 All: Resolves #163: Added Mermaid support to desktop and mobile 2019-02-28 00:22:53 +00:00
Laurent Cozic
e841ea8a91 Fixing bad commit 2019-02-27 23:41:32 +00:00
Laurent Cozic
770a435029 Revert "Revert "Update website""
This reverts commit 49b56e84a7.
2019-02-27 23:38:50 +00:00
Laurent Cozic
49b56e84a7 Revert "Update website"
This reverts commit ff1a6fdbbd.
2019-02-27 23:38:21 +00:00
Laurent Cozic
ff1a6fdbbd Update website 2019-02-27 23:37:16 +00:00
Laurent Cozic
2168090b96 Electron release v1.0.135 2019-02-27 22:52:08 +00:00
Laurent Cozic
33f7b680bc Desktop: Fixes #1273: Trying to improve accuracy of sidebar resizing 2019-02-27 22:44:10 +00:00
Laurent Cozic
0957298cb8 Desktop: Fixes #1268: Fix exporting to PDF and printing, which were broken following upgrade to Electron 4 2019-02-27 22:35:26 +00:00
Laurent Cozic
08f2f982cf Update website 2019-02-27 15:04:34 +00:00
RenatoXSR
3376fbfa55 Updated pt_BR locale to correct unicode char escapes. 2019-02-27 10:31:54 -03:00
Laurent Cozic
4a31e5fe73 Electron release v1.0.134 2019-02-27 10:03:07 +00:00
Laurent Cozic
baacec5ba6 Electron release v1.0.133 2019-02-27 00:14:24 +00:00
Laurent Cozic
95188b71b8 Desktop: Fixes #1265: Fixed column resize on Windows. Also increased minimum and maximum sizes of columns. 2019-02-27 00:13:56 +00:00
Laurent Cozic
cf57be6e98 Merge branch 'master' of github.com:laurent22/joplin 2019-02-26 23:40:16 +00:00
Laurent Cozic
b691092d7a iOS v10.0.30 2019-02-26 23:39:52 +00:00
Helmut K. C. Tessarek
03e60fc028 Merge pull request #1262 from cybertramp/patch-1
한국말 -> 한국어
2019-02-26 16:52:16 -05:00
Andros Fenollosa
2e25ec318f Update language es_ES (#1257)
* Update language es_ES

* Add Last-Translator

* Translation fix
2019-02-26 16:51:51 -05:00
cybertramp
7236e5e9ae 한국말 -> 한국어
"한국말" -> "한국어"
Korean translation error update.
2019-02-26 19:36:45 +09:00
Helmut K. C. Tessarek
6f7dd51a98 Merge pull request #1261 from tessus/localization-de_DE
Update de_DE.po
2019-02-25 20:32:09 -05:00
Helmut K. C. Tessarek
db1dab9293 Update de_DE.po 2019-02-25 20:24:59 -05:00
Laurent Cozic
06f1b9e4d7 Electron release v1.0.132 2019-02-24 23:46:17 +00:00
Laurent Cozic
8f958ac931 Desktop: Trying to fix sign server 2019-02-24 23:46:05 +00:00
Laurent Cozic
eae63bfb79 Electron release v1.0.131 2019-02-24 19:30:09 +00:00
Laurent Cozic
8adfc81c30 Trying to fix Windows build 2019-02-24 19:30:04 +00:00
Laurent Cozic
0c516443e3 Android release v1.0.239 2019-02-24 18:08:54 +00:00
Laurent Cozic
ad9bc0bf63 Electron release v1.0.130 2019-02-24 18:06:09 +00:00
Laurent Cozic
b0596670a6 Revert "New tag adding dialogue (#1206)"
This reverts commit 229dd7a6dd.
2019-02-24 18:04:25 +00:00
Laurent Cozic
998011ff43 Mobile: Apply tag duplication fix to mobile too 2019-02-24 18:02:50 +00:00
Laurent Cozic
081e1c5b62 Electron release v1.0.129 2019-02-24 17:27:11 +00:00
Laurent Cozic
edfd2c4d54 Desktop: Updated build process to fix buggy electron-builder https://github.com/electron-userland/electron-builder/issues/3660#issuecomment-465461491 2019-02-24 17:26:46 +00:00
Laurent Cozic
9d65a3a34c Android release v1.0.238 2019-02-24 12:53:00 +00:00
159 changed files with 4824 additions and 2769 deletions

1
.gitignore vendored
View File

@@ -39,6 +39,7 @@ node_modules
Tools/github_oauth_token.txt
_releases
ReactNativeClient/lib/csstojs/
ReactNativeClient/lib/rnInjectedJs/
ElectronClient/app/gui/note-viewer/fonts/
ElectronClient/app/gui/note-viewer/lib.js
Tools/commit_hook.txt

View File

@@ -20,9 +20,9 @@ Again, please check that it has not already been requested. If it has, simply **
- If you want to add a new feature, consider asking about it before implementing it or checking existing discussions to make sure it is within the scope of the project. That scope, due to limited resources, might be narrower than you think. As a rule of thumb **if your change is likely to involve more than 50 lines of code, you should discuss it in the forum**, just so that you don't waste your time implementing something that might not be accepted.
- Bug fixes have a very high change of being accepted.
- Bug fixes have a very high chance of being accepted.
- A pull request that is relevant to the current roadmap has a very high change of being accepted.
- A pull request that is relevant to the current roadmap has a very high chance of being accepted.
Building the apps is relatively easy - please [see the build instructions](https://github.com/laurent22/joplin/blob/master/BUILD.md) for more details.

View File

@@ -6,6 +6,10 @@ const DecryptionWorker = require('lib/services/DecryptionWorker');
const MasterKey = require('lib/models/MasterKey');
const BaseItem = require('lib/models/BaseItem');
const Setting = require('lib/models/Setting.js');
const { shim } = require('lib/shim');
const pathUtils = require('lib/path-utils.js');
const imageType = require('image-type');
const readChunk = require('read-chunk');
class Command extends BaseCommand {
@@ -14,7 +18,7 @@ class Command extends BaseCommand {
}
description() {
return _('Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, `status` and `target-status`.');
return _('Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, `status`, `decrypt-file` and `target-status`.');
}
options() {
@@ -22,6 +26,7 @@ class Command extends BaseCommand {
// This is here mostly for testing - shouldn't be used
['-p, --password <password>', 'Use this password as master password (For security reasons, it is not recommended to use this option).'],
['-v, --verbose', 'More verbose output for the `target-status` command'],
['-o, --output <directory>', 'Output directory'],
];
}
@@ -30,6 +35,18 @@ class Command extends BaseCommand {
const options = args.options;
const askForMasterKey = async (error) => {
const masterKeyId = error.masterKeyId;
const password = await this.prompt(_('Enter master password:'), { type: 'string', secure: true });
if (!password) {
this.stdout(_('Operation cancelled'));
return false;
}
Setting.setObjectKey('encryption.passwordCache', masterKeyId, password);
await EncryptionService.instance().loadMasterKeysFromSettings();
return true;
}
if (args.command === 'enable') {
const password = options.password ? options.password.toString() : await this.prompt(_('Enter master password:'), { type: 'string', secure: true });
if (!password) {
@@ -59,14 +76,8 @@ class Command extends BaseCommand {
break;
} catch (error) {
if (error.code === 'masterKeyNotLoaded') {
const masterKeyId = error.masterKeyId;
const password = await this.prompt(_('Enter master password:'), { type: 'string', secure: true });
if (!password) {
this.stdout(_('Operation cancelled'));
return;
}
Setting.setObjectKey('encryption.passwordCache', masterKeyId, password);
await EncryptionService.instance().loadMasterKeysFromSettings();
const ok = await askForMasterKey(error);
if (!ok) return;
continue;
}
@@ -85,6 +96,36 @@ class Command extends BaseCommand {
return;
}
if (args.command === 'decrypt-file') {
while (true) {
try {
const outputDir = options.output ? options.output : require('os').tmpdir();
let outFile = outputDir + '/' + pathUtils.filename(args.path) + '.' + Date.now() + '.bin';
await EncryptionService.instance().decryptFile(args.path, outFile);
const buffer = await readChunk(outFile, 0, 64);
const detectedType = imageType(buffer);
if (detectedType) {
const newOutFile = outFile + '.' + detectedType.ext;
await shim.fsDriver().move(outFile, newOutFile);
outFile = newOutFile;
}
this.stdout(outFile);
break;
} catch (error) {
if (error.code === 'masterKeyNotLoaded') {
const ok = await askForMasterKey(error);
if (!ok) return;
continue;
}
throw error;
}
}
return;
}
if (args.command === 'target-status') {
const fs = require('fs-extra');
const pathUtils = require('lib/path-utils.js');

1793
CliClient/locales/ar.po Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -125,9 +125,10 @@ msgstr "Marca un llistat de tasques pendents com a fet."
msgid "Note is not a to-do: \"%s\""
msgstr "La nota no és un llistat de tasques pendents: «%s»"
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Gestiona la configuració E2EE. Les ordres són «enable», «disable», "
"«decrypt», «status» i «target-status»"
@@ -755,11 +756,11 @@ msgid "An update is available, do you want to download it now?"
msgstr "Hi ha disponible una actualització. Voleu baixar-la ara?"
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -964,6 +965,9 @@ msgstr "Títol del bloc de notes:"
msgid "Add or remove tags:"
msgstr "Afegeix o suprimeix etiquetes:"
msgid "Separate each tag by a comma."
msgstr "Separeu les etiquetes amb comes."
msgid "Rename notebook:"
msgstr "Canvia el nom del bloc de notes:"
@@ -1166,7 +1170,7 @@ msgstr "Recursos: %d."
msgid "Please select where the sync status should be exported to"
msgstr "Seleccioneu on s'hauria d'exportar l'estat de la sincronització"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1320,6 +1324,12 @@ msgstr "Xifrat"
msgid "Encrypted items cannot be modified"
msgstr "Els elements xifrats no es poden modificar"
msgid "title"
msgstr "títol"
msgid "updated date"
msgstr "data d'actualització"
msgid "Conflicts"
msgstr "Conflictes"
@@ -1330,12 +1340,6 @@ msgstr "No es pot moure el bloc de notes a aquesta ubicació"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "Els blocs de notes no poden tenir el nom «%s», és un títol reservat."
msgid "title"
msgstr "títol"
msgid "updated date"
msgstr "data d'actualització"
msgid "created date"
msgstr "data de creació"
@@ -1380,6 +1384,10 @@ msgstr "Ordena les notes per"
msgid "Reverse sort order"
msgstr "Ordre invers"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Ordena les notes per"
msgid "Save geo-location with notes"
msgstr "Desa la geolocalització a les notes"
@@ -1758,10 +1766,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Lloc web del Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Lloc web del Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1885,8 +1889,9 @@ msgstr ""
msgid "Welcome"
msgstr "Benvingut"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Separeu les etiquetes amb comes."
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "Lloc web del Joplin"
#~ msgid "State: %s."
#~ msgstr "Estat: %s"

View File

@@ -124,9 +124,10 @@ msgstr "Označí to-do jako hotové."
msgid "Note is not a to-do: \"%s\""
msgstr "Poznámka není to-do: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Nastavuje šifrování. Příkazy jsou `enable` (zapnout), `disable` (vypnout), "
"`decrypt` (dešifrovat), `status` (stav) a `target-status` (stav v cíli "
@@ -737,11 +738,11 @@ msgid "An update is available, do you want to download it now?"
msgstr "Je k dispozici update, chcete jej stáhnout?"
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -934,6 +935,9 @@ msgstr "Název zápisníku:"
msgid "Add or remove tags:"
msgstr "Přidat či odebrat tagy:"
msgid "Separate each tag by a comma."
msgstr "Tagy oddělujte čárkami."
msgid "Rename notebook:"
msgstr "Přejmenovat zápisník:"
@@ -1133,7 +1137,7 @@ msgstr "Zdroje: %d."
msgid "Please select where the sync status should be exported to"
msgstr "Prosím vyberte, kam má být stav synchronizace exportován"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1288,6 +1292,14 @@ msgstr "Zašifrováno"
msgid "Encrypted items cannot be modified"
msgstr "Nelze editovat zašifrovanou položku"
#, fuzzy
msgid "title"
msgstr "Bez názvu"
#, fuzzy
msgid "updated date"
msgstr "Upraveno: %d."
msgid "Conflicts"
msgstr "Konflikty"
@@ -1299,14 +1311,6 @@ msgstr "Poznámku nelze přesunout do zápisníku \"%s\""
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "Zápisník se nemůže jmenovat \"%s\", tento název je rezervován."
#, fuzzy
msgid "title"
msgstr "Bez názvu"
#, fuzzy
msgid "updated date"
msgstr "Upraveno: %d."
#, fuzzy
msgid "created date"
msgstr "Vytvořeno: %d."
@@ -1353,6 +1357,10 @@ msgstr "Řadit poznámky podle"
msgid "Reverse sort order"
msgstr "Řadit od konce"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Řadit poznámky podle"
msgid "Save geo-location with notes"
msgstr "Ukládat k poznámkám informace o poloze (geolokaci)"
@@ -1725,10 +1733,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Web Joplinu"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Web Joplinu"
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1851,8 +1855,9 @@ msgstr "Nemáte žádný zápisník. Vytvořte jeden kliknutím na tlačítko (+
msgid "Welcome"
msgstr "Vítejte"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Tagy oddělujte čárkami."
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "Web Joplinu"
#~ msgid "State: %s."
#~ msgstr "Stav: %s."

View File

@@ -123,9 +123,10 @@ msgstr "Markerer en opgave som udført."
msgid "Note is not a to-do: \"%s\""
msgstr "Noten er ikke en opgave: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Udfører E2EE konfiguration. Kommandoer er `enable`(aktiver), "
"`disable`(sluk), `decrypt`(dekrypter), `status` og `target-status` (modtager-"
@@ -742,11 +743,11 @@ msgid "An update is available, do you want to download it now?"
msgstr "Opdatering er til rådighed, vil du hente den nu?"
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -943,6 +944,9 @@ msgstr "Notesbogs titel:"
msgid "Add or remove tags:"
msgstr "Tilføj eller slet mærker:"
msgid "Separate each tag by a comma."
msgstr "Adskil hver mærke med komma."
msgid "Rename notebook:"
msgstr "Omdøb notesbog:"
@@ -1142,7 +1146,7 @@ msgstr "Ressourcer: %d."
msgid "Please select where the sync status should be exported to"
msgstr "Vælg hvor sync status skal eksporteres til"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1297,6 +1301,14 @@ msgstr "Krypteret"
msgid "Encrypted items cannot be modified"
msgstr "Krypteret emner kan ikke rettes"
#, fuzzy
msgid "title"
msgstr "Samlet"
#, fuzzy
msgid "updated date"
msgstr "Opdateret %d."
msgid "Conflicts"
msgstr "Konflikter"
@@ -1308,14 +1320,6 @@ msgstr "Kan ikke flytte note til \"%s\" notesbog"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "Notesbøger kan ikke få navnet \"%s\", da det er en beskyttet titel."
#, fuzzy
msgid "title"
msgstr "Samlet"
#, fuzzy
msgid "updated date"
msgstr "Opdateret %d."
#, fuzzy
msgid "created date"
msgstr "Oprettet: %d."
@@ -1362,6 +1366,10 @@ msgstr "Sorter noter efter"
msgid "Reverse sort order"
msgstr "Modsat sorterings orden"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Sorter noter efter"
msgid "Save geo-location with notes"
msgstr "Gem geo-lokation i noter"
@@ -1734,10 +1742,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Joplin hjemmeside"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin hjemmeside"
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1860,8 +1864,9 @@ msgstr "Du har ingen notesbøger. Opret en ved at klikke på (+) knappen."
msgid "Welcome"
msgstr "Velkommen"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Adskil hver mærke med komma."
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "Joplin hjemmeside"
#~ msgid "State: %s."
#~ msgstr "Tilstand: %s."

View File

@@ -18,7 +18,8 @@ msgstr ""
msgid "To delete a tag, untag the associated notes."
msgstr ""
"Um ein Tag zu löschen, entferne es bei allen damit verbundenen Notizen."
"Um ein Schlagwort zu löschen, entferne es bei allen damit verbundenen "
"Notizen."
msgid "Please select the note or notebook to be deleted first."
msgstr ""
@@ -130,7 +131,7 @@ msgstr "Notiz ist kein To-Do: \"%s\""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Verwaltet die E2EE-Konfiguration. Die Befehle lauten `enable`, `disable`, "
"`decrypt`, `status` und `target-status`."
@@ -617,9 +618,8 @@ msgstr "Importiere „%s“ ins „%s“ Format. Bitte warten..."
msgid "PDF File"
msgstr "PDF-Datei"
#, fuzzy
msgid "&File"
msgstr "Datei"
msgstr "&Datei"
msgid "New note"
msgstr "Neue Notiz"
@@ -649,9 +649,8 @@ msgstr "%s ausblenden"
msgid "Quit"
msgstr "Verlassen"
#, fuzzy
msgid "&Edit"
msgstr "Bearbeiten"
msgstr "&Bearbeiten"
msgid "Copy"
msgstr "Kopieren"
@@ -686,9 +685,8 @@ msgstr "Alle Notizen durchsuchen"
msgid "Search in current note"
msgstr "Aktuelle Notiz durchsuchen"
#, fuzzy
msgid "&View"
msgstr "Ansicht"
msgstr "&Ansicht"
msgid "Toggle sidebar"
msgstr "Seitenleiste umschalten"
@@ -699,9 +697,8 @@ msgstr "Editor-Layout umschalten"
msgid "Focus"
msgstr "Fokus"
#, fuzzy
msgid "&Tools"
msgstr "Werkzeuge"
msgstr "&Werkzeuge"
msgid "Synchronisation status"
msgstr "Status der Synchronisation"
@@ -715,9 +712,8 @@ msgstr "Verschlüsselungsoptionen"
msgid "General Options"
msgstr "Allgemeine Einstellungen"
#, fuzzy
msgid "&Help"
msgstr "Hilfe"
msgstr "&Hilfe"
msgid "Website and documentation"
msgstr "Webseite und Dokumentation"
@@ -760,12 +756,12 @@ msgstr ""
"Es ist eine Aktualisierung verfügbar. Soll sie jetzt heruntergeladen werden?"
#, javascript-format
msgid "Your version: v%s"
msgstr "Deine Version: v%s"
msgid "Your version: %s"
msgstr "Deine Version: %s"
#, javascript-format
msgid "New version: v%s"
msgstr "Neue Version: v%s"
msgid "New version: %s"
msgstr "Neue Version: %s"
msgid "Yes"
msgstr "Ja"
@@ -972,6 +968,9 @@ msgstr "Notizbuch-Titel:"
msgid "Add or remove tags:"
msgstr "Schlagwörter hinzufügen oder entfernen:"
msgid "Separate each tag by a comma."
msgstr "Trenne jedes Schlagwort mit einem Komma."
msgid "Rename notebook:"
msgstr "Notizbuch umbenennen:"
@@ -1140,18 +1139,19 @@ msgstr "Verschlüsselungsoptionen"
msgid "Clipper Options"
msgstr "Clipper-Einstellungen"
#, fuzzy, javascript-format
#, javascript-format
msgid ""
"Delete notebook \"%s\"?\n"
"\n"
"All notes and sub-notebooks within this notebook will also be deleted."
msgstr ""
"Notizbuch wirklich löschen? Alle Notizen und Unternotizen darin werden "
"ebenfalls gelöscht."
"Notizbuch \"%s\" wirklich löschen?\n"
"\n"
"Alle Notizen und Unternotizen darin werden ebenfalls gelöscht."
#, fuzzy, javascript-format
#, javascript-format
msgid "Remove tag \"%s\" from all notes?"
msgstr "Dieses Schlagwort von allen Notizen entfernen?"
msgstr "Schlagwort \"%s\" von allen Notizen entfernen?"
msgid "Remove this search from the sidebar?"
msgstr "Diese Suche von der Seitenleiste entfernen?"
@@ -1177,8 +1177,8 @@ msgid "Please select where the sync status should be exported to"
msgstr ""
"Bitte wähle aus, wohin der Synchronisations-Status exportiert werden soll"
msgid "Remove?"
msgstr ""
msgid "Table of contents"
msgstr "Inhaltsverzeichnis"
msgid "Add or remove tags"
msgstr "Schlagwörter hinzufügen oder entfernen"
@@ -1328,6 +1328,12 @@ msgstr "Verschlüsselt"
msgid "Encrypted items cannot be modified"
msgstr "Verschlüsselte Objekte können nicht verändert werden"
msgid "title"
msgstr "Titel"
msgid "updated date"
msgstr "Aktualisierungsdatum"
msgid "Conflicts"
msgstr "Konflikte"
@@ -1339,12 +1345,6 @@ msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr ""
"Notizbuch kann nicht \"%s\" genannt werden. Dieser Name ist reserviert.."
msgid "title"
msgstr "Titel"
msgid "updated date"
msgstr "Aktualisierungsdatum"
msgid "created date"
msgstr "Erstelldatum"
@@ -1389,6 +1389,9 @@ msgstr "Sortiere Notizen nach"
msgid "Reverse sort order"
msgstr "Sortierreihenfolge umdrehen"
msgid "Sort notebooks by"
msgstr "Sortiere Notizbücher nach"
msgid "Save geo-location with notes"
msgstr "Momentanen Standort zusammen mit Notizen speichern"
@@ -1779,10 +1782,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Website von Joplin"
#, javascript-format
msgid "Joplin v%s"
msgstr "Joplin v%s"
#, javascript-format
msgid "Database v%s"
msgstr "Datenbank v%s"
@@ -1907,8 +1906,11 @@ msgstr ""
msgid "Welcome"
msgstr "Willkommen"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Trenne jedes Schlagwort mit einem Komma."
#~ msgid "Joplin v%s"
#~ msgstr "Joplin v%s"
#~ msgid "Remove?"
#~ msgstr "Löschen?"
#~ msgid "Delete notes?"
#~ msgstr "Notizen löschen?"

View File

@@ -119,7 +119,7 @@ msgstr ""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
msgid "Enter master password:"
@@ -664,11 +664,11 @@ msgid "An update is available, do you want to download it now?"
msgstr ""
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -848,6 +848,9 @@ msgstr ""
msgid "Add or remove tags:"
msgstr ""
msgid "Separate each tag by a comma."
msgstr ""
msgid "Rename notebook:"
msgstr ""
@@ -1043,7 +1046,7 @@ msgstr ""
msgid "Please select where the sync status should be exported to"
msgstr ""
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1186,6 +1189,12 @@ msgstr ""
msgid "Encrypted items cannot be modified"
msgstr ""
msgid "title"
msgstr ""
msgid "updated date"
msgstr ""
msgid "Conflicts"
msgstr ""
@@ -1196,12 +1205,6 @@ msgstr ""
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr ""
msgid "title"
msgstr ""
msgid "updated date"
msgstr ""
msgid "created date"
msgstr ""
@@ -1246,6 +1249,9 @@ msgstr ""
msgid "Reverse sort order"
msgstr ""
msgid "Sort notebooks by"
msgstr ""
msgid "Save geo-location with notes"
msgstr ""
@@ -1591,10 +1597,6 @@ msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Joplin v%s"
msgstr ""
#, javascript-format
msgid "Database v%s"
msgstr ""

View File

@@ -1,19 +1,21 @@
# Joplin translation to Spanish (Spain)
# Copyright (C) 2017 Lucas Vieites
# Copyright (C) 2019 Andros Fenollosa
# This file is distributed under the same license as the Joplin-CLI package.
# Lucas Vieites <lucas.vieites@gmail.com>, 2017.
# Andros Fenollosa <andros@fenollosa.email>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: Joplin-CLI 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Fernando Martín <f@mrtn.es>\n"
"Last-Translator: Andros Fenollosa <andros@fenollosa.email>\n"
"Language-Team: Spanish <lucas.vieites@gmail.com>\n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.11\n"
"X-Generator: Poedit 2.2.1\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
@@ -35,7 +37,7 @@ msgid "No notebook selected."
msgstr "No se ha seleccionado ninguna libreta."
msgid "No notebook has been specified."
msgstr "Ninguna libreta fue especificada"
msgstr "Ninguna libreta fue especificada."
msgid "Y"
msgstr "Y"
@@ -125,9 +127,10 @@ msgstr "Marca una tarea como hecha."
msgid "Note is not a to-do: \"%s\""
msgstr "La nota no es una tarea: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Maneja la configuración E2EE. Comandos disponibles `enable`, `disable`, "
"`decrypt`, `status` y `target-status`."
@@ -463,7 +466,6 @@ msgstr "Descargando recursos..."
msgid "Cancelling... Please wait."
msgstr "Cancelando... Por favor espere."
#, fuzzy
msgid ""
"<tag-command> can be \"add\", \"remove\" or \"list\" to assign or remove "
"[tag] from [note], or to list the notes associated with [tag]. The command "
@@ -591,13 +593,11 @@ msgstr "Barra lateral"
msgid "Note list"
msgstr "Lista de notas"
#, fuzzy
msgid "Note title"
msgstr "Título de libreta:"
msgstr "Titulo de nota"
#, fuzzy
msgid "Note body"
msgstr "Libretas"
msgstr "Cuerpo de nota"
#, javascript-format
msgid "Importing from \"%s\" as \"%s\" format. Please wait..."
@@ -606,9 +606,8 @@ msgstr "Importando el formato de \"%s\" a \"%s\". Por favor espere..."
msgid "PDF File"
msgstr "Archivo PDF"
#, fuzzy
msgid "&File"
msgstr "Archivo"
msgstr "&Archivo"
msgid "New note"
msgstr "Nueva nota"
@@ -638,9 +637,8 @@ msgstr "Oculta %s"
msgid "Quit"
msgstr "Salir"
#, fuzzy
msgid "&Edit"
msgstr "Editar"
msgstr "&Editar"
msgid "Copy"
msgstr "Copiar"
@@ -651,9 +649,8 @@ msgstr "Cortar"
msgid "Paste"
msgstr "Pegar"
#, fuzzy
msgid "Select all"
msgstr "Seleccione fecha"
msgstr "Seleccionar todo"
msgid "Bold"
msgstr "Negrita"
@@ -673,13 +670,11 @@ msgstr "Editar con un editor externo"
msgid "Search in all the notes"
msgstr "Buscar en todas las notas"
#, fuzzy
msgid "Search in current note"
msgstr "Buscar en todas las notas"
msgstr "Buscar en nota actual"
#, fuzzy
msgid "&View"
msgstr "Ver"
msgstr "&Ver"
msgid "Toggle sidebar"
msgstr "Cambia la barra lateral"
@@ -687,13 +682,11 @@ msgstr "Cambia la barra lateral"
msgid "Toggle editor layout"
msgstr "Cambia el diseño del editor"
#, fuzzy
msgid "Focus"
msgstr "Foco en el cuerpo"
msgstr "Foco"
#, fuzzy
msgid "&Tools"
msgstr "Herramientas"
msgstr "&Herramientas"
msgid "Synchronisation status"
msgstr "Estado de la sincronización"
@@ -707,9 +700,8 @@ msgstr "Opciones de cifrado"
msgid "General Options"
msgstr "Opciones generales"
#, fuzzy
msgid "&Help"
msgstr "Ayuda"
msgstr "&Ayuda"
msgid "Website and documentation"
msgstr "Sitio web y documentación"
@@ -751,12 +743,12 @@ msgid "An update is available, do you want to download it now?"
msgstr "Hay disponible una actualización. ¿Quiere descargarla ahora?"
#, javascript-format
msgid "Your version: v%s"
msgstr "Tu versión: v%s"
msgid "Your version: %s"
msgstr "Tu versión: %s"
#, javascript-format
msgid "New version: v%s"
msgstr ""
msgid "New version: %s"
msgstr "Nueva versión: %s"
msgid "Yes"
msgstr "Sí"
@@ -765,7 +757,7 @@ msgid "No"
msgstr "No"
msgid "Token has been copied to the clipboard!"
msgstr "El token ha sido copiado al portapapeles"
msgstr "¡El token ha sido copiado al portapapeles!"
msgid "The web clipper service is enabled and set to auto-start."
msgstr ""
@@ -817,9 +809,8 @@ msgstr "Paso 2: Instalar la extensión"
msgid "Download and install the relevant extension for your browser:"
msgstr "Descargar e instalar para su navegador:"
#, fuzzy
msgid "Advanced options"
msgstr "Mostrar opciones avanzadas"
msgstr "Opciones avanzadas"
msgid "Authorisation token:"
msgstr "Token de autorización:"
@@ -935,9 +926,8 @@ msgstr "Estado"
msgid "Encryption is:"
msgstr "El cifrado está:"
#, fuzzy
msgid "Usage"
msgstr "Uso: %s"
msgstr "Uso"
msgid "Back"
msgstr "Atrás"
@@ -957,7 +947,10 @@ msgid "Notebook title:"
msgstr "Título de libreta:"
msgid "Add or remove tags:"
msgstr "Agregar o borrar etiquetas: "
msgstr "Agregar o borrar etiquetas:"
msgid "Separate each tag by a comma."
msgstr "Separar cada etiqueta por una coma."
msgid "Rename notebook:"
msgstr "Renombrar libreta:"
@@ -994,13 +987,13 @@ msgid ""
msgstr "No hay ninguna libreta. Cree una pulsando en «Libreta nueva»."
msgid "Location"
msgstr ""
msgstr "Localización"
msgid "URL"
msgstr ""
msgstr "URL"
msgid "Note properties"
msgstr ""
msgstr "Propiedades de nota"
msgid "Open..."
msgstr "Abrir..."
@@ -1019,7 +1012,7 @@ msgid "Copy Link Address"
msgstr "Copiar enlace"
msgid "This attachment is not downloaded or not decrypted yet."
msgstr ""
msgstr "El adjunto no ha sido descargado o desencriptado todavía."
#, javascript-format
msgid "Unsupported link or message: %s"
@@ -1034,7 +1027,7 @@ msgstr ""
"editar la nota."
msgid "Only one note can be printed or exported to PDF at a time."
msgstr ""
msgstr "Solo una nota puede ser impresa o exportada a PDF a la vez."
msgid "strong text"
msgstr "texto destacado"
@@ -1122,18 +1115,19 @@ msgstr "Opciones de cifrado"
msgid "Clipper Options"
msgstr "Opciones de recorte"
#, fuzzy, javascript-format
#, javascript-format
msgid ""
"Delete notebook \"%s\"?\n"
"\n"
"All notes and sub-notebooks within this notebook will also be deleted."
msgstr ""
"¿Desea eliminar la libreta? Todas las notas y sublibretas dentro de esta "
"libreta también serán eliminadas."
"Borrar Libreta \"%s\"?\n"
"\n"
"Todas las notas y sublibretas de esta libreta serán borradas."
#, fuzzy, javascript-format
#, javascript-format
msgid "Remove tag \"%s\" from all notes?"
msgstr "¿Desea eliminar esta etiqueta de todas las notas?"
msgstr "Desea borrar las etiquetas pertenecientes a \"%s\" de todas las notas?"
msgid "Remove this search from the sidebar?"
msgstr "¿Desea eliminar esta búsqueda de la barra lateral?"
@@ -1149,16 +1143,16 @@ msgstr "Libretas"
#, javascript-format
msgid "Decrypting items: %d/%d"
msgstr "Descifrando elementos: %d/%d."
msgstr "Descifrando elementos: %d/%d"
#, fuzzy, javascript-format
#, javascript-format
msgid "Fetching resources: %d"
msgstr "Recursos: %d."
msgstr "Obteniendo refuersos: %d"
msgid "Please select where the sync status should be exported to"
msgstr "Seleccione a dónde se debería exportar el estado de sincronización"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1174,24 +1168,22 @@ msgstr "%s - Copiar"
msgid "Switch between note and to-do type"
msgstr "Cambiar entre nota y lista de tareas"
#, fuzzy
msgid "Switch to note type"
msgstr "Cambiar entre nota y lista de tareas"
msgstr "Cambiar a nota"
#, fuzzy
msgid "Switch to to-do type"
msgstr "Cambiar entre nota y lista de tareas"
msgstr "Cambiar a lista de tareas"
msgid "Copy Markdown link"
msgstr "Copiar el enlace de Markdown"
#, fuzzy, javascript-format
#, javascript-format
msgid "Delete note \"%s\"?"
msgstr "Elimina una libreta \"%s\"?"
msgstr "¿Borrar nota \"%s\"?"
#, fuzzy, javascript-format
#, javascript-format
msgid "Delete these %d notes?"
msgstr "¿Desea borrar estas notas?"
msgstr "Borrar %d notas?"
#, javascript-format
msgid "Usage: %s"
@@ -1311,6 +1303,12 @@ msgstr "Cifrado"
msgid "Encrypted items cannot be modified"
msgstr "Los elementos cifrados no pueden ser modificados"
msgid "title"
msgstr "título"
msgid "updated date"
msgstr "fecha de actualización"
msgid "Conflicts"
msgstr "Conflictos"
@@ -1322,12 +1320,6 @@ msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr ""
"No se puede usar el nombre «%s» para una libreta; es un título reservado."
msgid "title"
msgstr "título"
msgid "updated date"
msgstr "fecha de actualización"
msgid "created date"
msgstr "fecha de creación"
@@ -1372,6 +1364,10 @@ msgstr "Ordenar notas por"
msgid "Reverse sort order"
msgstr "Invierte el orden"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Ordenar notas por"
msgid "Save geo-location with notes"
msgstr "Guardar geolocalización en las notas"
@@ -1398,16 +1394,18 @@ msgid ""
"this setting so that your notes are constantly being synchronised, thus "
"reducing the number of conflicts."
msgstr ""
"Esto permitirá que Joplin se ejecute en segundo plano. Se recomienda "
"habilitar esta configuración para que sus notas estén sincronizadas "
"constantemente, reduciendo así el número de conflictos."
msgid "Start application minimised in the tray icon"
msgstr ""
msgstr "Iniciar aplicación minimizada en el icono de la bandeja"
msgid "Global zoom percentage"
msgstr "Establecer el porcentaje de aumento de la aplicación"
#, fuzzy
msgid "Editor font size"
msgstr "Fuente del editor"
msgstr "Editar tamaño de fuente"
msgid "Editor font family"
msgstr "Fuente del editor"
@@ -1424,11 +1422,11 @@ msgid "Automatically update the application"
msgstr "Actualizar la aplicación automáticamente"
msgid "Get pre-releases when checking for updates"
msgstr ""
msgstr "Obtenga pre-lanzamientos cuando busque actualizaciones"
#, javascript-format
msgid "See the pre-release page for more details: %s"
msgstr ""
msgstr "Ver la página de pre-lanzamiento para más detalles: %s"
msgid "Synchronisation interval"
msgstr "Intervalo de sincronización"
@@ -1489,6 +1487,9 @@ msgid ""
"to it before syncing, otherwise all files will be removed! See the FAQ for "
"more details: %s"
msgstr ""
"Atención: Si cambias esta ubicación, asegúrate de copiar todo tu contenido "
"antes de sincronizarlo, de lo contrario todos los archivos serán eliminados. "
"Consulte las preguntas frecuentes para obtener más detalles: %s"
msgid "Nextcloud username"
msgstr "Usuario de Nextcloud"
@@ -1527,28 +1528,24 @@ msgstr "Ignorar errores en certificados TLS"
msgid "Invalid option value: \"%s\". Possible values are: %s."
msgstr "Opción inválida: «%s». Los valores posibles son: %s."
#, fuzzy
msgid "General"
msgstr "Opciones generales"
msgstr "General"
#, fuzzy
msgid "Synchronisation"
msgstr "Estado de la sincronización"
msgstr "Sincronización"
msgid "Appearance"
msgstr ""
msgstr "Apariencia"
#, fuzzy
msgid "Note"
msgstr "Libretas"
msgstr "Nota"
#, fuzzy
msgid "Application"
msgstr "Salir de la aplicación."
msgstr "Aplicación"
#, javascript-format
msgid "The tag \"%s\" already exists. Please choose a different name."
msgstr ""
msgstr "La etiqueta \"%s\" ya existe. Por favor, busque un nuevo nombre."
msgid "Joplin Export File"
msgstr "Archivo de exportación de Joplin"
@@ -1562,9 +1559,8 @@ msgstr "Directorio para exportar de Joplin"
msgid "Evernote Export File"
msgstr "Archivo exportado de Evernote"
#, fuzzy
msgid "Json Export Directory"
msgstr "Directorio para exportar de Joplin"
msgstr "Directorio para exportar JSON"
msgid "File"
msgstr "Archivo"
@@ -1644,10 +1640,10 @@ msgid "On %s: %s"
msgstr "En %s: %s"
msgid "Permission to use camera"
msgstr ""
msgstr "Permiso para usar tu cámara"
msgid "Your permission to use your camera is required."
msgstr ""
msgstr "El permiso para usar tu cámara es necesario."
msgid "There are currently no notes. Create one by clicking on the (+) button."
msgstr "No hay notas. Cree una pulsando en el botón (+)."
@@ -1677,9 +1673,8 @@ msgstr "¿Desea mover %d notas a libreta «%s»?"
msgid "Press to set the decryption password."
msgstr "Presione para establecer la contraseña de descifrado."
#, fuzzy
msgid "Clear alarm"
msgstr "Establecer alarma"
msgstr "Quitar alarma"
msgid "Save alarm"
msgstr "Establecer alarma"
@@ -1693,22 +1688,21 @@ msgstr "Confirmar"
msgid "Cancel synchronisation"
msgstr "Cancelar sincronización"
#, fuzzy
msgid "Checking... Please wait."
msgstr "Cancelando... Por favor espere."
msgstr "Comprobando... Por favor espere."
#, fuzzy
msgid "Success! Synchronisation configuration appears to be correct."
msgstr "Comprobar sincronización"
msgstr "¡Éxito! La configuración de sincronización es correcta."
msgid ""
"Error. Please check that URL, username, password, etc. are correct and that "
"the sync target is accessible. The reported error was:"
msgstr ""
"Error. Por favor comprueba URL, nombre de usuario, contraseña, etc. son "
"correctos y el servicio a sincronizar este accesible. El código de error fue:"
#, fuzzy
msgid "The application has been authorised!"
msgstr "La aplicacion ha sido autorizada éxitosamente."
msgstr "¡La aplicacion ha sido autorizada!"
#, javascript-format
msgid ""
@@ -1718,10 +1712,15 @@ msgid ""
"\n"
"Please try again."
msgstr ""
"No se pudo autorizar aplicación:\n"
"\n"
"%s\n"
"\n"
"Por favor, vuelva a intentarlo."
#, fuzzy, javascript-format
#, javascript-format
msgid "Decrypted items: %s / %s"
msgstr "Descifrando elementos: %d/%d."
msgstr "Descifrando elementos: %s / %s"
msgid "New tags:"
msgstr "Nuevas etiquetas:"
@@ -1755,24 +1754,19 @@ msgstr ""
msgid "Joplin website"
msgstr "Sitio web de Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Sitio web de Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
msgstr "Base de datos v%s"
#, fuzzy, javascript-format
#, javascript-format
msgid "FTS enabled: %d"
msgstr "Borrar: %d"
msgstr "FTS activado: %d"
msgid "Login with Dropbox"
msgstr "Acceder con Dropbox"
#, fuzzy
msgid "Enter code here"
msgstr "Entrar en modo línea de comandos"
msgstr "Introduce código aquí"
#, javascript-format
msgid "Master Key %s"
@@ -1826,9 +1820,8 @@ msgstr ""
msgid "Unsupported image type: %s"
msgstr "Tipo de imagen no soportado: %s"
#, fuzzy
msgid "Take photo"
msgstr "Adjuntar foto"
msgstr "Tomar foto"
msgid "Attach photo"
msgstr "Adjuntar foto"
@@ -1855,7 +1848,7 @@ msgid "View on map"
msgstr "Ver en un mapa"
msgid "Go to source URL"
msgstr ""
msgstr "Ir a origen URL"
msgid "Edit"
msgstr "Editar"
@@ -1883,8 +1876,11 @@ msgstr ""
msgid "Welcome"
msgstr "Bienvenido"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Separar cada etiqueta por una coma."
#~ msgid "Joplin v%s"
#~ msgstr "Joplin v%s"
#~ msgid "Remove?"
#~ msgstr "¿Borrar?"
#~ msgid "Delete notes?"
#~ msgstr "¿Desea eliminar notas?"

View File

@@ -125,9 +125,10 @@ msgstr "Markatu zeregina egindakotzat."
msgid "Note is not a to-do: \"%s\""
msgstr "Oharra ez da zeregina: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"E2EEren konfigurazioa erabiltzen du. Komandoak dira `enable`, `disable`, "
"`decrypt`, `status` eta `target-status`."
@@ -749,11 +750,11 @@ msgid "An update is available, do you want to download it now?"
msgstr ""
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -951,6 +952,9 @@ msgstr "Koadernoaren izenburua: "
msgid "Add or remove tags:"
msgstr "Gehitu edo ezabatu etiketak:"
msgid "Separate each tag by a comma."
msgstr "Banatu etiketak koma erabiliaz."
msgid "Rename notebook:"
msgstr "Berrizendatu koadernoa:"
@@ -1155,7 +1159,7 @@ msgstr "Baliabideak: %d."
msgid "Please select where the sync status should be exported to"
msgstr "Aukeratu nora esportatu sinkronizazioaren egoera, mesedez"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1310,6 +1314,14 @@ msgstr "Zifratuta"
msgid "Encrypted items cannot be modified"
msgstr "Zifratutako itemak ezin aldatu daitezke"
#, fuzzy
msgid "title"
msgstr "Titulu gabekoa"
#, fuzzy
msgid "updated date"
msgstr "Eguneratuta: %d."
msgid "Conflicts"
msgstr "Gatazkak"
@@ -1322,14 +1334,6 @@ msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr ""
"Koadernoak ezin izendatu daitezke \"%s\", izen hori Joplinek gordeta dauka"
#, fuzzy
msgid "title"
msgstr "Titulu gabekoa"
#, fuzzy
msgid "updated date"
msgstr "Eguneratuta: %d."
#, fuzzy
msgid "created date"
msgstr "Sortuta: %d."
@@ -1378,6 +1382,10 @@ msgstr ""
msgid "Reverse sort order"
msgstr "Alderantziz antolatzen du."
#, fuzzy
msgid "Sort notebooks by"
msgstr "Editatu koadernoa"
msgid "Save geo-location with notes"
msgstr "Gore geokokapena oharrekin"
@@ -1753,10 +1761,6 @@ msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Joplin v%s"
msgstr ""
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1880,9 +1884,6 @@ msgstr "Oraindik ez duzu koadernorik. Sortu bat (+) botoian sakatuta."
msgid "Welcome"
msgstr "Ongi etorri!"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Banatu etiketak koma erabiliaz."
#, fuzzy
#~ msgid "State: %s."
#~ msgstr "Egoera: \"%s\"."

View File

@@ -125,10 +125,11 @@ msgstr "La note n'est pas une tâche : \"%s\""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Gérer la configuration E2EE (Chiffrement de bout à bout). Les commandes sont "
"`enable`, `disable`, `decrypt` et `status` et `target-status`."
"`enable`, `disable`, `decrypt` et `status`, `decrypt-file` et `target-"
"status`."
msgid "Enter master password:"
msgstr "Entrer le mot de passe maître :"
@@ -740,12 +741,12 @@ msgstr ""
"Une mise à jour est disponible, souhaitez vous la télécharger maintenant ?"
#, javascript-format
msgid "Your version: v%s"
msgstr "Votre version : v%s"
msgid "Your version: %s"
msgstr "Votre version : %s"
#, javascript-format
msgid "New version: v%s"
msgstr "Nouvelle version : v%s"
msgid "New version: %s"
msgstr "Nouvelle version : %s"
msgid "Yes"
msgstr "Oui"
@@ -952,6 +953,9 @@ msgstr "Titre du carnet :"
msgid "Add or remove tags:"
msgstr "Modifier les étiquettes :"
msgid "Separate each tag by a comma."
msgstr "Séparez chaque étiquette par une virgule."
msgid "Rename notebook:"
msgstr "Renommer le carnet :"
@@ -1158,8 +1162,8 @@ msgid "Please select where the sync status should be exported to"
msgstr ""
"Veuillez sélectionner un répertoire ou exporter l'état de la synchronisation"
msgid "Remove?"
msgstr "Supprimer ?"
msgid "Table of contents"
msgstr "Table des matières"
msgid "Add or remove tags"
msgstr "Gérer les étiquettes"
@@ -1309,6 +1313,12 @@ msgstr "Chiffré"
msgid "Encrypted items cannot be modified"
msgstr "Les objets chiffrés ne peuvent être modifiés"
msgid "title"
msgstr "titre"
msgid "updated date"
msgstr "date de modification"
msgid "Conflicts"
msgstr "Conflits"
@@ -1319,12 +1329,6 @@ msgstr "Impossible de déplacer le carnet à cet endroit"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "Les carnets ne peuvent être nommés \"%s\" car c'est un nom réservé."
msgid "title"
msgstr "titre"
msgid "updated date"
msgstr "date de modification"
msgid "created date"
msgstr "date de création"
@@ -1369,6 +1373,9 @@ msgstr "Trier les notes par"
msgid "Reverse sort order"
msgstr "Inverser l'ordre"
msgid "Sort notebooks by"
msgstr "Trier les carnets par"
msgid "Save geo-location with notes"
msgstr "Enregistrer l'emplacement avec les notes"
@@ -1755,10 +1762,6 @@ msgstr "- Position : Pour attacher à une note les coordonnées GPS."
msgid "Joplin website"
msgstr "Site web de Joplin"
#, javascript-format
msgid "Joplin v%s"
msgstr "Joplin v%s"
#, javascript-format
msgid "Database v%s"
msgstr "Base de données v%s"
@@ -1882,8 +1885,11 @@ msgstr ""
msgid "Welcome"
msgstr "Bienvenue"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Séparez chaque étiquette par une virgule."
#~ msgid "Joplin v%s"
#~ msgstr "Joplin v%s"
#~ msgid "Remove?"
#~ msgstr "Supprimer ?"
#~ msgid "Delete notes?"
#~ msgstr "Supprimer les notes ?"

View File

@@ -122,9 +122,10 @@ msgstr "Marca unha tarefa como feita."
msgid "Note is not a to-do: \"%s\""
msgstr "A nota non é unha tarefa: «%s»"
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Xestiona a configuración E2EE. As orde son «enable», «disable», «decrypt», "
"«status» e «target-status»."
@@ -742,11 +743,11 @@ msgid "An update is available, do you want to download it now?"
msgstr "Hai unha actualización dispoñíbel, desexa descargala agora?"
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -941,6 +942,9 @@ msgstr "Título do caderno:"
msgid "Add or remove tags:"
msgstr "Engadir ou eliminar etiquetas:"
msgid "Separate each tag by a comma."
msgstr "Separar cada etiqueta por unha coma."
msgid "Rename notebook:"
msgstr "Renomear caderno:"
@@ -1142,7 +1146,7 @@ msgstr "Recursos: %d."
msgid "Please select where the sync status should be exported to"
msgstr "Seleccione onde exportar o estado da sincronización"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1297,6 +1301,14 @@ msgstr "Cifrado"
msgid "Encrypted items cannot be modified"
msgstr "Non é posíbel modificar elementos cifrados"
#, fuzzy
msgid "title"
msgstr "Sen título"
#, fuzzy
msgid "updated date"
msgstr "Actualizado: %d."
msgid "Conflicts"
msgstr "Conflitos"
@@ -1308,14 +1320,6 @@ msgstr "Non é posíbel mover a nota ao caderno «%s»"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "Os cadernos non poden levar o nome «%s» porque é un título reservado."
#, fuzzy
msgid "title"
msgstr "Sen título"
#, fuzzy
msgid "updated date"
msgstr "Actualizado: %d."
#, fuzzy
msgid "created date"
msgstr "Creado: %d."
@@ -1362,6 +1366,10 @@ msgstr "Ordenar notas por"
msgid "Reverse sort order"
msgstr "Orde inversa"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Ordenar notas por"
msgid "Save geo-location with notes"
msgstr "Gardar xeolocalización coas notas"
@@ -1734,10 +1742,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Sitio web de Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Sitio web de Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1860,8 +1864,9 @@ msgstr "Non ten cadernos actualmente. Cree un premendo no botón (+)."
msgid "Welcome"
msgstr "Benvido/a"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Separar cada etiqueta por unha coma."
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "Sitio web de Joplin"
#~ msgid "State: %s."
#~ msgstr "Estado: %s."

View File

@@ -128,7 +128,7 @@ msgstr "Bilješka nije zadatak: \"%s\""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
msgid "Enter master password:"
@@ -748,11 +748,11 @@ msgid "An update is available, do you want to download it now?"
msgstr ""
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -938,6 +938,9 @@ msgstr "Naslov bilježnice:"
msgid "Add or remove tags:"
msgstr "Dodaj ili makni oznake:"
msgid "Separate each tag by a comma."
msgstr "Odvoji oznake zarezom."
msgid "Rename notebook:"
msgstr "Preimenuj bilježnicu:"
@@ -1142,7 +1145,7 @@ msgstr "Resursi: %d."
msgid "Please select where the sync status should be exported to"
msgstr "Odaberi lokaciju za izvoz statusa sinkronizacije"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1295,6 +1298,14 @@ msgstr ""
msgid "Encrypted items cannot be modified"
msgstr "Neke stavke se ne mogu sinkronizirati."
#, fuzzy
msgid "title"
msgstr "Nenaslovljen"
#, fuzzy
msgid "updated date"
msgstr "Ažurirano: %d."
msgid "Conflicts"
msgstr "Sukobi"
@@ -1306,14 +1317,6 @@ msgstr "Ne mogu premjestiti bilješku u bilježnicu %s"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "Naslov \"%s\" je rezerviran i ne može se koristiti."
#, fuzzy
msgid "title"
msgstr "Nenaslovljen"
#, fuzzy
msgid "updated date"
msgstr "Ažurirano: %d."
#, fuzzy
msgid "created date"
msgstr "Stvoreno: %d."
@@ -1362,6 +1365,10 @@ msgstr ""
msgid "Reverse sort order"
msgstr "Mijenja redoslijed."
#, fuzzy
msgid "Sort notebooks by"
msgstr "Uredi bilježnicu"
msgid "Save geo-location with notes"
msgstr "Spremi geolokacijske podatke sa bilješkama"
@@ -1730,10 +1737,6 @@ msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Joplin v%s"
msgstr ""
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1858,9 +1861,6 @@ msgstr "Trenutno nemaš nijednu bilježnicu. Stvori novu klikom na (+) gumb."
msgid "Welcome"
msgstr "Dobro došli"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Odvoji oznake zarezom."
#, fuzzy
#~ msgid "State: %s."
#~ msgstr "Stanje: \"%s\"."

View File

@@ -124,9 +124,10 @@ msgstr "Segna un \"Cose-da-fare\" come completato."
msgid "Note is not a to-do: \"%s\""
msgstr "La nota non è un \"Cose-da-fare\": \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Gestisci la configurazione E2EE. I comandi sono `abilita`, `disabilita`, "
"`decripta`, `stato` e `stato-target`."
@@ -753,11 +754,11 @@ msgid "An update is available, do you want to download it now?"
msgstr "È disponibile un aggiornamento, vuoi scaricarlo ora?"
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -962,6 +963,9 @@ msgstr "Titolo del Taccuino:"
msgid "Add or remove tags:"
msgstr "Aggiungi or rimuovi etichetta:"
msgid "Separate each tag by a comma."
msgstr "Separa ogni etichetta da una virgola."
msgid "Rename notebook:"
msgstr "Rinomina il Taccuino:"
@@ -1164,7 +1168,7 @@ msgstr "Risorse: %d."
msgid "Please select where the sync status should be exported to"
msgstr ""
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1315,6 +1319,12 @@ msgstr "Crittografato"
msgid "Encrypted items cannot be modified"
msgstr "Gli elementi crittografati non possono essere modificati"
msgid "title"
msgstr "Titolo"
msgid "updated date"
msgstr "Data di aggiornamento"
msgid "Conflicts"
msgstr "Conflitti"
@@ -1325,12 +1335,6 @@ msgstr "Impossibile spostare il Taccuino in questa posizione"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "I blocchi non possono essere chiamati \"%s\". È un titolo riservato."
msgid "title"
msgstr "Titolo"
msgid "updated date"
msgstr "Data di aggiornamento"
msgid "created date"
msgstr "Data di creazione"
@@ -1375,6 +1379,10 @@ msgstr "Ordina le note per"
msgid "Reverse sort order"
msgstr "Inverti l'ordine"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Ordina le note per"
msgid "Save geo-location with notes"
msgstr "Salva geolocalizzazione con le note"
@@ -1759,10 +1767,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Sito web Joplin"
#, javascript-format
msgid "Joplin v%s"
msgstr "Joplin v%s"
#, javascript-format
msgid "Database v%s"
msgstr "Database v%s"
@@ -1885,8 +1889,8 @@ msgstr ""
msgid "Welcome"
msgstr "Benvenuto"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Separa ogni etichetta da una virgola."
#~ msgid "Joplin v%s"
#~ msgstr "Joplin v%s"
#~ msgid "Delete notes?"
#~ msgstr "Eliminare le note?"

View File

@@ -123,9 +123,10 @@ msgstr "ToDoを完了としてマークします。"
msgid "Note is not a to-do: \"%s\""
msgstr "ノートはToDoリストではありません:\"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"E2EEの設定を変更します。コマンドは `enable`, `disable`, `decrypt`, `status` "
"and `target-status` です。"
@@ -735,11 +736,11 @@ msgid "An update is available, do you want to download it now?"
msgstr "アップデートがあります。すぐにダウンロードしますか?"
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -942,6 +943,9 @@ msgstr "ノートブックの題名:"
msgid "Add or remove tags:"
msgstr "タグの追加・削除:"
msgid "Separate each tag by a comma."
msgstr "それぞれのタグをカンマ(,)で区切ってください。"
msgid "Rename notebook:"
msgstr "ノートブックの名前を変更:"
@@ -1141,7 +1145,7 @@ msgstr "取得中のリソース: %d"
msgid "Please select where the sync status should be exported to"
msgstr "同期状況の出力先を選択してください"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1292,6 +1296,12 @@ msgstr "暗号化済"
msgid "Encrypted items cannot be modified"
msgstr "暗号化したアイテムは修正できません"
msgid "title"
msgstr "タイトル"
msgid "updated date"
msgstr "アップデート日"
msgid "Conflicts"
msgstr "衝突"
@@ -1304,12 +1314,6 @@ msgstr ""
"\"%s\" というノートブックの名称はシステムで使用するために予約済みです。名称の"
"変更はできません。"
msgid "title"
msgstr "タイトル"
msgid "updated date"
msgstr "アップデート日"
msgid "created date"
msgstr "作成日"
@@ -1354,6 +1358,10 @@ msgstr "ノートのソート方法"
msgid "Reverse sort order"
msgstr "逆順に並び替え"
#, fuzzy
msgid "Sort notebooks by"
msgstr "ノートのソート方法"
msgid "Save geo-location with notes"
msgstr "ノートに位置情報を保存"
@@ -1406,11 +1414,11 @@ msgid "Automatically update the application"
msgstr "アプリケーションを自動的にアップデート"
msgid "Get pre-releases when checking for updates"
msgstr ""
msgstr "更新をチェックする時、開発版を取得する"
#, javascript-format
msgid "See the pre-release page for more details: %s"
msgstr ""
msgstr "詳細についてはプレリリースページを参照してください: %s"
msgid "Synchronisation interval"
msgstr "同期間隔"
@@ -1736,10 +1744,6 @@ msgstr "- 位置情報: ノートに位置情報を添付するのに必要で
msgid "Joplin website"
msgstr "JoplinのWebサイト"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "JoplinのWebサイト"
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1863,8 +1867,9 @@ msgstr ""
msgid "Welcome"
msgstr "ようこそ"
#~ msgid "Separate each tag by a comma."
#~ msgstr "それぞれのタグをカンマ(,)で区切ってください。"
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "JoplinのWebサイト"
#~ msgid "State: %s."
#~ msgstr "状態: \"%s\"."

View File

@@ -119,7 +119,7 @@ msgstr ""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
msgid "Enter master password:"
@@ -664,11 +664,11 @@ msgid "An update is available, do you want to download it now?"
msgstr ""
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -848,6 +848,9 @@ msgstr ""
msgid "Add or remove tags:"
msgstr ""
msgid "Separate each tag by a comma."
msgstr ""
msgid "Rename notebook:"
msgstr ""
@@ -1043,7 +1046,7 @@ msgstr ""
msgid "Please select where the sync status should be exported to"
msgstr ""
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1186,6 +1189,12 @@ msgstr ""
msgid "Encrypted items cannot be modified"
msgstr ""
msgid "title"
msgstr ""
msgid "updated date"
msgstr ""
msgid "Conflicts"
msgstr ""
@@ -1196,12 +1205,6 @@ msgstr ""
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr ""
msgid "title"
msgstr ""
msgid "updated date"
msgstr ""
msgid "created date"
msgstr ""
@@ -1246,6 +1249,9 @@ msgstr ""
msgid "Reverse sort order"
msgstr ""
msgid "Sort notebooks by"
msgstr ""
msgid "Save geo-location with notes"
msgstr ""
@@ -1591,10 +1597,6 @@ msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Joplin v%s"
msgstr ""
#, javascript-format
msgid "Database v%s"
msgstr ""

View File

@@ -124,9 +124,10 @@ msgstr "'할 일' 항목을 완료로 표시합니다."
msgid "Note is not a to-do: \"%s\""
msgstr "노트는 '할 일' 항목이 아닙니다: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"E2EE(종단간 암호화) 설정을 관리합니다. 명령어는 `enable`, `disable`, "
"`decrypt`, `status`, `target-status` 입니다."
@@ -732,12 +733,12 @@ msgid "An update is available, do you want to download it now?"
msgstr "업데이트가 있습니다. 지금 다운로드할까요?"
#, javascript-format
msgid "Your version: v%s"
msgstr "현재 버전: v%s"
msgid "Your version: %s"
msgstr "현재 버전: %s"
#, javascript-format
msgid "New version: v%s"
msgstr "새 버전: v%s"
msgid "New version: %s"
msgstr "새 버전: %s"
msgid "Yes"
msgstr "예"
@@ -936,6 +937,9 @@ msgstr "노트북 제목:"
msgid "Add or remove tags:"
msgstr "태그 추가 및 제거:"
msgid "Separate each tag by a comma."
msgstr "각각의 태그를 쉼표로 구분합니다."
msgid "Rename notebook:"
msgstr "노트북 이름 바꾸기:"
@@ -1135,7 +1139,7 @@ msgstr "리소스 가져오는 중: %d."
msgid "Please select where the sync status should be exported to"
msgstr "동기화 상태를 내보낼 대상을 선택하세요"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1286,6 +1290,12 @@ msgstr "암호화됨"
msgid "Encrypted items cannot be modified"
msgstr "암호화된 항목은 변경될 수 없습니다"
msgid "title"
msgstr "제목"
msgid "updated date"
msgstr "업데이트된 날짜"
msgid "Conflicts"
msgstr "충돌"
@@ -1296,12 +1306,6 @@ msgstr "노트북을 이 위치로 옮길 수 없습니다"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "노트북을 \"%s\" 제목으로 정할 수 없습니다. 이미 예약중입니다."
msgid "title"
msgstr "제목"
msgid "updated date"
msgstr "업데이트된 날짜"
msgid "created date"
msgstr "만들어진 날짜"
@@ -1346,6 +1350,10 @@ msgstr "노트를 다음 기준으로 정렬"
msgid "Reverse sort order"
msgstr "정렬 순서 반전"
#, fuzzy
msgid "Sort notebooks by"
msgstr "노트를 다음 기준으로 정렬"
msgid "Save geo-location with notes"
msgstr "노트에 지리적 위치 정보 포함시키기"
@@ -1728,10 +1736,6 @@ msgstr "- 위치: 지리적 위치 정보를 노트에 첨부하기 위해서
msgid "Joplin website"
msgstr "조플린 웹사이트"
#, javascript-format
msgid "Joplin v%s"
msgstr "조플린 v%s"
#, javascript-format
msgid "Database v%s"
msgstr "데이터베이스 v%s"
@@ -1852,8 +1856,8 @@ msgstr "노트북이 없습니다. (+) 버튼을 눌러 새로 만드세요."
msgid "Welcome"
msgstr "환영합니다"
#~ msgid "Separate each tag by a comma."
#~ msgstr "각각의 태그를 쉼표로 구분합니다."
#~ msgid "Joplin v%s"
#~ msgstr "조플린 v%s"
#~ msgid "State: %s."
#~ msgstr "상태: %s."

View File

@@ -124,9 +124,10 @@ msgstr "Markerer et gjøremål som ferdig."
msgid "Note is not a to-do: \"%s\""
msgstr "Notat er ikke et gjøremål: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Utfører E2EE-konfiguration. Tilgjengelige kommandoer er: `enable`(aktiver), "
"`disable`(lukk), `decrypt`(dekrypter), `status` og `target-status` (mottager-"
@@ -741,12 +742,12 @@ msgid "An update is available, do you want to download it now?"
msgstr "En oppdatering er tilgjengelig, vil du laste den ned nå?"
#, javascript-format
msgid "Your version: v%s"
msgstr "Din versjon: v%s"
msgid "Your version: %s"
msgstr "Din versjon: %s"
#, javascript-format
msgid "New version: v%s"
msgstr "Ny versjon: v%s"
msgid "New version: %s"
msgstr "Ny versjon: %s"
msgid "Yes"
msgstr "Ja"
@@ -951,6 +952,9 @@ msgstr "Tittel på notatbok:"
msgid "Add or remove tags:"
msgstr "Legge til eller fjern merkelapp:"
msgid "Separate each tag by a comma."
msgstr "Separer hver merkelapp med komma."
msgid "Rename notebook:"
msgstr "Gi nytt navn til notatbok:"
@@ -1150,7 +1154,7 @@ msgstr "Henter ressurser: %d"
msgid "Please select where the sync status should be exported to"
msgstr "Velg hvor synkroniseringsstatusen skal eksporteres til"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1301,6 +1305,12 @@ msgstr "Kryptert"
msgid "Encrypted items cannot be modified"
msgstr "Krypterte elementer kan ikke modifiseres"
msgid "title"
msgstr "tittel"
msgid "updated date"
msgstr "sist oppdatert"
msgid "Conflicts"
msgstr "Konflikter"
@@ -1311,12 +1321,6 @@ msgstr "Kan ikke flytte notatboken til denne plasseringen"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "Notatbøker kan ikke hete %s, som er en reservert tittel."
msgid "title"
msgstr "tittel"
msgid "updated date"
msgstr "sist oppdatert"
msgid "created date"
msgstr "opprettet"
@@ -1361,6 +1365,10 @@ msgstr "Sorter notater etter"
msgid "Reverse sort order"
msgstr "Reverser sorteringsrekkefølge"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Sorter notater etter"
msgid "Save geo-location with notes"
msgstr "Lagre stedsinformasjon med notater"
@@ -1746,10 +1754,6 @@ msgstr "- Sted: for å legge ved stedsinformation til notatet."
msgid "Joplin website"
msgstr "Joplins nettsted"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin v%s"
#, javascript-format
msgid "Database v%s"
msgstr "Database v%s"
@@ -1871,5 +1875,6 @@ msgstr "Du har enda ingen notatbok. Lag en ved å klikke på (+)-knappen."
msgid "Welcome"
msgstr "Velkommen"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Separer hver merkelapp med komma."
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "Joplin v%s"

View File

@@ -125,9 +125,10 @@ msgstr "Markeer een to-do als voltooid. "
msgid "Note is not a to-do: \"%s\""
msgstr "Notitie is geen to-do: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Beheert E2EE configuratie. Commando's zijn `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
@@ -751,11 +752,11 @@ msgid "An update is available, do you want to download it now?"
msgstr ""
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -953,6 +954,9 @@ msgstr "Notitieboek titel:"
msgid "Add or remove tags:"
msgstr "Voeg tag toe of verwijder tag"
msgid "Separate each tag by a comma."
msgstr "Scheid iedere tag met een komma."
msgid "Rename notebook:"
msgstr "Hernoem notitieboek:"
@@ -1159,7 +1163,7 @@ msgstr "Middelen: %d."
msgid "Please select where the sync status should be exported to"
msgstr "Selecteer waar de synchronisatie status naar geëxporteerd moet worden"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1314,6 +1318,14 @@ msgstr "Versleuteld"
msgid "Encrypted items cannot be modified"
msgstr "Versleutelde items kunnen niet aangepast worden"
#, fuzzy
msgid "title"
msgstr "Untitled"
#, fuzzy
msgid "updated date"
msgstr "Bijgewerkt: %d."
msgid "Conflicts"
msgstr "Conflicten"
@@ -1327,14 +1339,6 @@ msgstr ""
"Notitieboeken kunnen niet \"%s\" genoemd worden, dit is een gereserveerd "
"woord."
#, fuzzy
msgid "title"
msgstr "Untitled"
#, fuzzy
msgid "updated date"
msgstr "Bijgewerkt: %d."
#, fuzzy
msgid "created date"
msgstr "Aangemaakt: %d."
@@ -1383,6 +1387,10 @@ msgstr ""
msgid "Reverse sort order"
msgstr "Draait de sorteervolgorde om."
#, fuzzy
msgid "Sort notebooks by"
msgstr "Bewerk notitieboek"
msgid "Save geo-location with notes"
msgstr "Sla geo-locatie op bij notities"
@@ -1757,10 +1765,6 @@ msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Joplin v%s"
msgstr ""
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1886,9 +1890,6 @@ msgstr ""
msgid "Welcome"
msgstr "Welkom"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Scheid iedere tag met een komma."
#, fuzzy
#~ msgid "State: %s."
#~ msgstr "Status: \"%s\""

View File

@@ -127,9 +127,10 @@ msgstr "Markeert een taak als afgerond."
msgid "Note is not a to-do: \"%s\""
msgstr "Notitie is geen taak: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Beheert de E2EE-configuratie. Opdrachten zijn: `enable`, `disable`, "
"`decrypt`, `status` en `target-status`."
@@ -751,11 +752,11 @@ msgid "An update is available, do you want to download it now?"
msgstr "Er is een update beschikbaar. Wil je deze nu downloaden?"
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -961,6 +962,9 @@ msgstr "Titel van notitieboek:"
msgid "Add or remove tags:"
msgstr "Labels toevoegen of verwijderen:"
msgid "Separate each tag by a comma."
msgstr "Scheidt elk label met een komma."
msgid "Rename notebook:"
msgstr "Notitieboeknaam wijzigen:"
@@ -1164,7 +1168,7 @@ msgstr "Bronnen: %d."
msgid "Please select where the sync status should be exported to"
msgstr "Kies waar de synchronisatiestatus naar moet worden geëxporteerd"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1317,6 +1321,12 @@ msgstr "Versleuteld"
msgid "Encrypted items cannot be modified"
msgstr "Versleutelde items kunnen niet worden bewerkt"
msgid "title"
msgstr "titel"
msgid "updated date"
msgstr "bijgewerkt op"
msgid "Conflicts"
msgstr "Conflicten"
@@ -1327,12 +1337,6 @@ msgstr "Kan notitieboek niet verplaatsen naar deze locatie"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "Notitieboeken mogen niet \"%s\" heten; dit is een gereserveerde titel."
msgid "title"
msgstr "titel"
msgid "updated date"
msgstr "bijgewerkt op"
msgid "created date"
msgstr "gecreëerd op"
@@ -1377,6 +1381,10 @@ msgstr "Notities sorteren op"
msgid "Reverse sort order"
msgstr "Sorteervolgorde omdraaien"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Notities sorteren op"
msgid "Save geo-location with notes"
msgstr "Locatie opslaan in notities"
@@ -1762,10 +1770,6 @@ msgstr "- Locatie: zodat je locatie-informatie kunt toevoegen aan een notitie."
msgid "Joplin website"
msgstr "Joplin-website"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin-website"
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1889,8 +1893,9 @@ msgstr ""
msgid "Welcome"
msgstr "Welkom"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Scheidt elk label met een komma."
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "Joplin-website"
#~ msgid "State: %s."
#~ msgstr "Status: %s."

View File

@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.7\n"
"X-Generator: Poedit 2.2.1\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid "To delete a tag, untag the associated notes."
@@ -124,9 +124,10 @@ msgstr "Marca uma tarefa como feita."
msgid "Note is not a to-do: \"%s\""
msgstr "Nota não é uma tarefa: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Gerencia a configuração E2EE. Os comandos são `enable`, `disable`, "
"`decrypt`, `status` e `target-status`."
@@ -746,11 +747,11 @@ msgid "An update is available, do you want to download it now?"
msgstr "Uma atualização está disponível, você quer baixar agora?"
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -760,7 +761,7 @@ msgid "No"
msgstr "Não"
msgid "Token has been copied to the clipboard!"
msgstr "Token foi copiado para a \\u00e1rea de transfer\\u00eancia!"
msgstr "Token foi copiado para a área de transferência!"
msgid "The web clipper service is enabled and set to auto-start."
msgstr ""
@@ -815,17 +816,17 @@ msgid "Advanced options"
msgstr "Mostrar opções avançadas"
msgid "Authorisation token:"
msgstr "Token de autoriza\\u00e7\\u00e3o:"
msgstr "Token de autorização:"
msgid "Copy token"
msgstr "Copira token"
msgstr "Copiar token"
msgid ""
"This authorisation token is only needed to allow third-party applications to "
"access Joplin."
msgstr ""
"Esse token de autoriza\\u00e7\\u00e3o só é necess\\u00e1rio para permitir "
"que aplicativos de terceiros acessem o Joplin."
"Esse token de autorização só é necessário para permitir que aplicativos de "
"terceiros acessem o Joplin."
#, javascript-format
msgid "Notes and settings are stored in: %s"
@@ -955,6 +956,9 @@ msgstr "Título do caderno:"
msgid "Add or remove tags:"
msgstr "Adicionar ou remover tags:"
msgid "Separate each tag by a comma."
msgstr "Separe cada tag por vírgula."
msgid "Rename notebook:"
msgstr "Renomear caderno:"
@@ -1156,7 +1160,7 @@ msgstr ""
"Favor selecionar o local para onde o status de sincronia deveria ser "
"exportado"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1307,6 +1311,12 @@ msgstr "Encriptado"
msgid "Encrypted items cannot be modified"
msgstr "Itens encriptados não podem ser modificados"
msgid "title"
msgstr "título"
msgid "updated date"
msgstr "data de atualização"
msgid "Conflicts"
msgstr "Conflitos"
@@ -1318,12 +1328,6 @@ msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr ""
"Os cadernos não podem ser nomeados como\"%s\", que é um título reservado."
msgid "title"
msgstr "título"
msgid "updated date"
msgstr "data de atualização"
msgid "created date"
msgstr "data de criação"
@@ -1368,6 +1372,10 @@ msgstr "Ordenar notas por"
msgid "Reverse sort order"
msgstr "Inverter ordem de classificação"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Ordenar notas por"
msgid "Save geo-location with notes"
msgstr "Salvar geolocalização com notas"
@@ -1643,10 +1651,10 @@ msgid "On %s: %s"
msgstr "Em %s: %s"
msgid "Permission to use camera"
msgstr "Permissão para utilizar sua c\\u00e2mera"
msgstr "Permissão para utilizar sua câmera"
msgid "Your permission to use your camera is required."
msgstr "É necessária a sua permissão para utilizar sua c\\u00e2mera."
msgstr "É necessária a sua permissão para utilizar sua câmera."
msgid "There are currently no notes. Create one by clicking on the (+) button."
msgstr "Atualmente, não há notas. Crie uma, clicando no botão (+)."
@@ -1758,10 +1766,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Site do Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Site do Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1883,8 +1887,9 @@ msgstr "Você não possui cadernos. Crie um clicando no botão (+)."
msgid "Welcome"
msgstr "Bem-vindo"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Separe cada tag por vírgula."
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "Site do Joplin"
#~ msgid "Delete notes?"
#~ msgstr "Excluir notas?"

View File

@@ -123,7 +123,7 @@ msgstr "Notița nu este o sarcină: \"%s\""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
msgid "Enter master password:"
@@ -686,11 +686,11 @@ msgid "An update is available, do you want to download it now?"
msgstr ""
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -872,6 +872,9 @@ msgstr "Titlul caietului de notițe:"
msgid "Add or remove tags:"
msgstr "Adăugați ori eliminați etichete:"
msgid "Separate each tag by a comma."
msgstr "Separați fiecare etichetă printr-o virgulă."
msgid "Rename notebook:"
msgstr "Redenumiți caietul de notițe:"
@@ -1067,7 +1070,7 @@ msgstr "Resurse: %d."
msgid "Please select where the sync status should be exported to"
msgstr ""
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1213,6 +1216,12 @@ msgstr "Criptat"
msgid "Encrypted items cannot be modified"
msgstr "Itemii criptați nu pot fi editați"
msgid "title"
msgstr "titlu"
msgid "updated date"
msgstr "data actualizării"
msgid "Conflicts"
msgstr "Conflicte"
@@ -1223,12 +1232,6 @@ msgstr "Nu se poate muta caietul de notițe în această locație"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr ""
msgid "title"
msgstr "titlu"
msgid "updated date"
msgstr "data actualizării"
msgid "created date"
msgstr "data creării"
@@ -1273,6 +1276,10 @@ msgstr "Sortați notițele după"
msgid "Reverse sort order"
msgstr "Inversați ordinea sortării"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Sortați notițele după"
msgid "Save geo-location with notes"
msgstr "Salvați geo-locația în notițe"
@@ -1625,10 +1632,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Website Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Website Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1751,8 +1754,9 @@ msgstr ""
msgid "Welcome"
msgstr "Bine ați venit"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Separați fiecare etichetă printr-o virgulă."
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "Website Joplin"
#~ msgid "State: %s."
#~ msgstr "Statut: %s."

View File

@@ -127,9 +127,10 @@ msgstr "Отмечает задачу как выполненную."
msgid "Note is not a to-do: \"%s\""
msgstr "Заметка не является задачей: «%s»"
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Управляет конфигурацией E2EE. Команды: `enable`, `disable`, `decrypt`, "
"`status` и `target-status`."
@@ -748,12 +749,12 @@ msgid "An update is available, do you want to download it now?"
msgstr "Доступно обновление, вы хотите загрузить его сейчас?"
#, javascript-format
msgid "Your version: v%s"
msgstr "Ваша версия: v%s"
msgid "Your version: %s"
msgstr "Ваша версия: %s"
#, javascript-format
msgid "New version: v%s"
msgstr "Новая версия: v%s"
msgid "New version: %s"
msgstr "Новая версия: %s"
msgid "Yes"
msgstr "Да"
@@ -957,6 +958,9 @@ msgstr "Название блокнота:"
msgid "Add or remove tags:"
msgstr "Добавить или удалить метки:"
msgid "Separate each tag by a comma."
msgstr "Разделяйте каждую метку запятой."
msgid "Rename notebook:"
msgstr "Переименовать блокнот:"
@@ -1158,7 +1162,7 @@ msgid "Please select where the sync status should be exported to"
msgstr ""
"Пожалуйста, выберите, куда должен быть экспортирован статус синхронизации"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1309,6 +1313,12 @@ msgstr "Зашифровано"
msgid "Encrypted items cannot be modified"
msgstr "Зашифрованные элементы не могут быть изменены"
msgid "title"
msgstr "заголовок"
msgid "updated date"
msgstr "дата обновления"
msgid "Conflicts"
msgstr "Конфликты"
@@ -1320,12 +1330,6 @@ msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr ""
"Блокнот не может быть назван \"%s\", так как это зарезервированное название."
msgid "title"
msgstr "заголовок"
msgid "updated date"
msgstr "дата обновления"
msgid "created date"
msgstr "дата создания"
@@ -1370,6 +1374,10 @@ msgstr "Сортировать заметки по"
msgid "Reverse sort order"
msgstr "Обратный порядок сортировки"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Сортировать заметки по"
msgid "Save geo-location with notes"
msgstr "Сохранять информацию о геолокации в заметках"
@@ -1756,10 +1764,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Сайт Joplin"
#, javascript-format
msgid "Joplin v%s"
msgstr "Joplin v%s"
#, javascript-format
msgid "Database v%s"
msgstr "База данных v%s"
@@ -1882,5 +1886,5 @@ msgstr "У вас сейчас нет блокнота. Создайте его
msgid "Welcome"
msgstr "Добро пожаловать"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Разделяйте каждую метку запятой."
#~ msgid "Joplin v%s"
#~ msgstr "Joplin v%s"

View File

@@ -123,9 +123,10 @@ msgstr "Označi seznam opravil kot končan."
msgid "Note is not a to-do: \"%s\""
msgstr "Zabeležka ni formata seznam opravil: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Upravlja z E2EE nastavitvami. Ukazi so `enable`, `disable`, `decrypt`, "
"`status` in `target-status`."
@@ -748,11 +749,11 @@ msgid "An update is available, do you want to download it now?"
msgstr "Posodobitev je na voljo, jo želite prenesti sedaj?"
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -950,6 +951,9 @@ msgstr "Naslov beležnice:"
msgid "Add or remove tags:"
msgstr "Dodaj ali odstrani oznako:"
msgid "Separate each tag by a comma."
msgstr "Loči vsako oznako z vejico."
msgid "Rename notebook:"
msgstr "Preimenuj beležnico:"
@@ -1157,7 +1161,7 @@ msgstr "Viri: %d."
msgid "Please select where the sync status should be exported to"
msgstr "Prosim izberite, kam želite izvoziti sinhronizacijski status"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1312,6 +1316,14 @@ msgstr "Enkriptirano"
msgid "Encrypted items cannot be modified"
msgstr "Enkriptirani predmeti ne morejo biti spremenjeni"
#, fuzzy
msgid "title"
msgstr "Neimenovano"
#, fuzzy
msgid "updated date"
msgstr "Posodobljeno: %d."
msgid "Conflicts"
msgstr "Konfikti"
@@ -1323,14 +1335,6 @@ msgstr "Ni moč premakniti zabeležke v \"%s\" beležnico"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "Beležnica ne more biti imenovana \"%s\", ker je to rezerviran naslov."
#, fuzzy
msgid "title"
msgstr "Neimenovano"
#, fuzzy
msgid "updated date"
msgstr "Posodobljeno: %d."
#, fuzzy
msgid "created date"
msgstr "Ustvarjeno: %d."
@@ -1377,6 +1381,10 @@ msgstr "Razporedi zabeležko po"
msgid "Reverse sort order"
msgstr "Obrni vrstni red"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Razporedi zabeležko po"
msgid "Save geo-location with notes"
msgstr "Shrani geo-lokacijo z zabeležkami"
@@ -1749,10 +1757,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Joplin spletna stran"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin spletna stran"
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1875,8 +1879,9 @@ msgstr "Trenutno nimate nobene beležnice. Ustvarite jo s klikom na (+) gumb."
msgid "Welcome"
msgstr "Dobrodošli"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Loči vsako oznako z vejico."
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "Joplin spletna stran"
#~ msgid "State: %s."
#~ msgstr "Stanje: %s."

View File

@@ -124,9 +124,10 @@ msgstr "Märker en att-göra som gjord."
msgid "Note is not a to-do: \"%s\""
msgstr "Anteckning är inte en att-göra: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"Hanterar E2EE-konfiguration. Kommandon är `enable`,` disable`, `decrypt`,` "
"status` och `target-status`."
@@ -749,12 +750,12 @@ msgid "An update is available, do you want to download it now?"
msgstr "En uppdatering är tillgänglig, vill du hämta den nu?"
#, javascript-format
msgid "Your version: v%s"
msgstr "Din version: v%s"
msgid "Your version: %s"
msgstr "Din version: %s"
#, javascript-format
msgid "New version: v%s"
msgstr "Ny version: v%s"
msgid "New version: %s"
msgstr "Ny version: %s"
msgid "Yes"
msgstr "Ja"
@@ -958,6 +959,9 @@ msgstr "Titel på anteckningsbok:"
msgid "Add or remove tags:"
msgstr "Lägg till eller ta bort taggar:"
msgid "Separate each tag by a comma."
msgstr "Separera varje tagg med ett komma."
msgid "Rename notebook:"
msgstr "Byt namn på anteckningsbok:"
@@ -1160,7 +1164,7 @@ msgstr "Hämtar resurser: %d"
msgid "Please select where the sync status should be exported to"
msgstr "Välj vart synkroniseringstillståndet ska exporteras till"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1313,6 +1317,12 @@ msgstr "Krypterad"
msgid "Encrypted items cannot be modified"
msgstr "Krypterade objekt kan inte ändras"
msgid "title"
msgstr "titel"
msgid "updated date"
msgstr "uppdaterad datum"
msgid "Conflicts"
msgstr "Konflikter"
@@ -1324,12 +1334,6 @@ msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr ""
"Anteckningsböcker kan inte namnges \"%s\", vilket är en reserverad titel."
msgid "title"
msgstr "titel"
msgid "updated date"
msgstr "uppdaterad datum"
msgid "created date"
msgstr "skapad datum"
@@ -1374,6 +1378,10 @@ msgstr "Sortera anteckningar efter"
msgid "Reverse sort order"
msgstr "Omvänd sorteringsordning"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Sortera anteckningar efter"
msgid "Save geo-location with notes"
msgstr "Spara geolokalisering med anteckningar"
@@ -1763,10 +1771,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Joplin-webbplats"
#, javascript-format
msgid "Joplin v%s"
msgstr "Joplin v%s"
#, javascript-format
msgid "Database v%s"
msgstr "Databas v%s"
@@ -1891,8 +1895,8 @@ msgstr ""
msgid "Welcome"
msgstr "Välkommen"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Separera varje tagg med ett komma."
#~ msgid "Joplin v%s"
#~ msgstr "Joplin v%s"
#~ msgid "State: %s."
#~ msgstr "Tillstånd: %s."

View File

@@ -126,7 +126,7 @@ msgstr ""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
msgid "Enter master password:"
@@ -717,12 +717,12 @@ msgid "An update is available, do you want to download it now?"
msgstr "Güncelleme mevcut, şimdi indirmek ister misiniz?"
#, javascript-format
msgid "Your version: v%s"
msgstr "Sürümün: v%s"
msgid "Your version: %s"
msgstr "Sürümün: %s"
#, javascript-format
msgid "New version: v%s"
msgstr "Yeni sürüm: v%s"
msgid "New version: %s"
msgstr "Yeni sürüm: %s"
msgid "Yes"
msgstr "Evet"
@@ -928,6 +928,9 @@ msgstr "Not defteri başlığı:"
msgid "Add or remove tags:"
msgstr "Etiket ekle veya kaldır:"
msgid "Separate each tag by a comma."
msgstr "Her etiketi virgülle ayırın."
msgid "Rename notebook:"
msgstr "Not defterini yeniden adlandır:"
@@ -1130,7 +1133,7 @@ msgstr "Kaynaklar alınıyor: %d"
msgid "Please select where the sync status should be exported to"
msgstr "Lütfen senkronizasyon durumunun nereye aktarılacağını seçin"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
#, fuzzy
@@ -1283,6 +1286,12 @@ msgstr "Şifrelenmiş"
msgid "Encrypted items cannot be modified"
msgstr "Şifrelenmiş öğeler değiştirilemez"
msgid "title"
msgstr "başlık"
msgid "updated date"
msgstr "güncelleme zamanı"
msgid "Conflicts"
msgstr "Çakışmalar"
@@ -1293,12 +1302,6 @@ msgstr "Not defteri bu konuma taşınamıyor"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "Not defterine ayrılmış bir başlık adı olan \"%s\" adı verilemez."
msgid "title"
msgstr "başlık"
msgid "updated date"
msgstr "güncelleme zamanı"
msgid "created date"
msgstr "oluşturma zamanı"
@@ -1343,6 +1346,10 @@ msgstr "Notları sırala"
msgid "Reverse sort order"
msgstr "Sıralamayı değiştir"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Notları sırala"
msgid "Save geo-location with notes"
msgstr "Coğrafi konumu notlarla kaydedin"
@@ -1725,10 +1732,6 @@ msgstr ""
msgid "Joplin website"
msgstr "Joplin Web Sitesi"
#, javascript-format
msgid "Joplin v%s"
msgstr "Joplin v%s"
#, javascript-format
msgid "Database v%s"
msgstr "Veritabanı v%s"
@@ -1851,5 +1854,5 @@ msgstr ""
msgid "Welcome"
msgstr "Hoşgeldiniz"
#~ msgid "Separate each tag by a comma."
#~ msgstr "Her etiketi virgülle ayırın."
#~ msgid "Joplin v%s"
#~ msgstr "Joplin v%s"

View File

@@ -123,10 +123,10 @@ msgstr "笔记非待办事项:\"%s\""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"管理E2EE配置。命令为:`enable`, `disable`, `decrypt`, `status` 和 `target-"
"status`。"
"管理 E2EE 配置。命令为:`enable``disable``decrypt``status、`decrypt-"
"file` 和 `target-status`。"
msgid "Enter master password:"
msgstr "输入主密码:"
@@ -138,7 +138,7 @@ msgid ""
"Starting decryption... Please wait as it may take several minutes depending "
"on how much there is to decrypt."
msgstr ""
"开始解密... 请稍后。因解密环节取决于需解密的文件数量,可能需要等待几分钟。"
"开始解密,请稍候... 取决于需解密的文件数量,解密环节可能需要等待几分钟。"
msgid "Completed decryption."
msgstr "已完成解密。"
@@ -151,7 +151,7 @@ msgstr "已禁用"
#, javascript-format
msgid "Encryption is: %s"
msgstr "加密:%s"
msgstr "加密状态:%s"
msgid "Edit note."
msgstr "编辑笔记。"
@@ -201,7 +201,7 @@ msgid "Displays a geolocation URL for the note."
msgstr "显示该笔记的地理定位 URL 地址。"
msgid "Displays usage information."
msgstr "显示用量信息。"
msgstr "显示用法提示。"
#, javascript-format
msgid "For information on how to customise the shortcuts please visit %s"
@@ -215,7 +215,7 @@ msgid ""
"all` for the complete usage information."
msgstr ""
"输入 `help [command]` 来获取有关该命令的更多信息;或输入 `help all` 获取完整"
"的使用说明。"
"的用法提示。"
msgid "The possible commands are:"
msgstr "可用的命令有:"
@@ -240,7 +240,7 @@ msgid "To maximise/minimise the console, press \"tc\"."
msgstr "按 \"TC\" 最大化/最小化控制台。"
msgid "To enter command line mode, press \":\""
msgstr "按 \":\" 键进入命令行模式"
msgstr "按“:”键进入命令行模式"
msgid "To exit command line mode, press ESCAPE"
msgstr "按 ESC 键退出命令行模式"
@@ -363,7 +363,7 @@ msgstr "删除笔记(不要求确认)。"
#, javascript-format
msgid "%d notes match this pattern. Delete them?"
msgstr "有%d条笔记符合此模式。是否删除?"
msgstr "有 %d 条笔记匹配。是否删除?"
msgid "Delete note?"
msgstr "是否删除笔记?"
@@ -397,7 +397,7 @@ msgstr "认证未完成(未收到认证令牌)。"
msgid ""
"To allow Joplin to synchronise with Dropbox, please follow the steps below:"
msgstr "为了让 Joplin 与 Dropbox 同步,请遵循以下步骤:"
msgstr "让 Joplin 与 Dropbox 同步,请按下列步骤操作:"
msgid "Step 1: Open this URL in your browser to authorise the application:"
msgstr "步骤一:在浏览器中打开此 URL 来授权应用程序:"
@@ -407,10 +407,10 @@ msgstr "步骤二:输入 Dropbox 提供的代码:"
#, javascript-format
msgid "Not authentified with %s. Please provide any missing credentials."
msgstr "%s 并未被验证。请提供缺少的凭。"
msgstr "未授予 %s 的权限。请提供缺少的凭。"
msgid "Synchronisation is already in progress."
msgstr "同步已在进行中。"
msgstr "已经在同步。"
#, javascript-format
msgid ""
@@ -435,7 +435,7 @@ msgid "Downloading resources..."
msgstr "下载资源中..."
msgid "Cancelling... Please wait."
msgstr "正在取消... 请稍。"
msgstr "正在取消... 请稍。"
msgid ""
"<tag-command> can be \"add\", \"remove\" or \"list\" to assign or remove "
@@ -501,10 +501,10 @@ msgstr "严重错误:"
msgid ""
"The application has been authorised - you may now close this browser tab."
msgstr "该程序已被授权 - 您可以关闭此浏览页面了。"
msgstr "授权成功 - 您可以关闭此页面了。"
msgid "The application has been successfully authorised."
msgstr "该程序已被成功授权。"
msgstr "已成功授予本应用程序权限。"
msgid ""
"Please open the following URL in your browser to authenticate the "
@@ -566,9 +566,8 @@ msgstr "从 \"%s\" 导入,导入格式为 \"%s\" 。请稍等…"
msgid "PDF File"
msgstr "PDF 文件"
#, fuzzy
msgid "&File"
msgstr "文件"
msgstr "文件 (&F)"
msgid "New note"
msgstr "新建笔记"
@@ -598,9 +597,8 @@ msgstr "隐藏 %s"
msgid "Quit"
msgstr "退出"
#, fuzzy
msgid "&Edit"
msgstr "编辑"
msgstr "编辑 (&E)"
msgid "Copy"
msgstr "复制"
@@ -615,13 +613,13 @@ msgid "Select all"
msgstr "全选"
msgid "Bold"
msgstr "粗"
msgstr "粗"
msgid "Italic"
msgstr "斜体"
msgid "Link"
msgstr ""
msgstr "链接"
msgid "Insert Date Time"
msgstr "插入时间"
@@ -635,9 +633,8 @@ msgstr "在所有笔记内搜索"
msgid "Search in current note"
msgstr "在当前笔记内搜索"
#, fuzzy
msgid "&View"
msgstr "视图"
msgstr "界面 (&V)"
msgid "Toggle sidebar"
msgstr "切换边栏"
@@ -648,9 +645,8 @@ msgstr "切换编辑器布局"
msgid "Focus"
msgstr "聚焦于"
#, fuzzy
msgid "&Tools"
msgstr "工具"
msgstr "工具 (&T)"
msgid "Synchronisation status"
msgstr "同步状态"
@@ -664,9 +660,8 @@ msgstr "加密选项"
msgid "General Options"
msgstr "通用选项"
#, fuzzy
msgid "&Help"
msgstr "帮助"
msgstr "帮助 (&H)"
msgid "Website and documentation"
msgstr "网站与文档"
@@ -708,12 +703,12 @@ msgid "An update is available, do you want to download it now?"
msgstr "有更新可用,是否现在进行下载?"
#, javascript-format
msgid "Your version: v%s"
msgstr "您的版本:v%s"
msgid "Your version: %s"
msgstr "您的版本:%s"
#, javascript-format
msgid "New version: v%s"
msgstr "最新版本:v%s"
msgid "New version: %s"
msgstr "最新版本:%s"
msgid "Yes"
msgstr "是"
@@ -722,10 +717,10 @@ msgid "No"
msgstr "否"
msgid "Token has been copied to the clipboard!"
msgstr "Token 令牌已复制到剪贴板!"
msgstr "Token 令牌已复制到剪贴板!"
msgid "The web clipper service is enabled and set to auto-start."
msgstr "网页剪辑服务已启用并设置为自动启动。"
msgstr "网页剪辑服务已启用且将自动启动。"
#, javascript-format
msgid "Status: Started on port %d"
@@ -830,7 +825,7 @@ msgid "Master Keys"
msgstr "主密码"
msgid "Active"
msgstr "活动状态"
msgstr "正在使用"
msgid "ID"
msgstr "ID"
@@ -855,11 +850,11 @@ msgid ""
"as \"active\"). Any of the keys might be used for decryption, depending on "
"how the notes or notebooks were originally encrypted."
msgstr ""
"注意:仅有一个主密码用于加密(被标记为 \"active\" 的主密码)。但列出的任何"
"码都可用于解密,这取决于笔记或笔记本最初是如何加密的。"
"注意:仅有一个主密码用于加密(被标记为“正在使用”的主密码)。但列出的所有密"
"码都可用于解密,这取决于笔记或笔记本最初是如何加密的。"
msgid "Missing Master Keys"
msgstr "缺主密码"
msgstr "缺主密码"
msgid ""
"The master keys with these IDs are used to encrypt some of your items, "
@@ -878,10 +873,10 @@ msgid "Status"
msgstr "状态"
msgid "Encryption is:"
msgstr "加密:"
msgstr "加密状态:"
msgid "Usage"
msgstr "使用量"
msgstr "用法提示"
msgid "Back"
msgstr "返回"
@@ -889,7 +884,7 @@ msgstr "返回"
#, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into it"
msgstr "将新建的笔记本 \"%s\" 和文件 \"%s\" 导入其中"
msgstr "将新建的笔记本“%s”,并将文件 \"%s\" 导入其中"
msgid "Please create a notebook first."
msgstr "请先创建笔记本。"
@@ -903,6 +898,9 @@ msgstr "笔记本标题:"
msgid "Add or remove tags:"
msgstr "添加或删除标签:"
msgid "Separate each tag by a comma."
msgstr "用半角逗号“,”分开每个标签。"
msgid "Rename notebook:"
msgstr "重命名笔记本:"
@@ -963,7 +961,7 @@ msgid "Copy Link Address"
msgstr "复制链接地址"
msgid "This attachment is not downloaded or not decrypted yet."
msgstr "该附件没有下载或者没有解密"
msgstr "该附件没有下载或者尚未解密"
#, javascript-format
msgid "Unsupported link or message: %s"
@@ -1064,19 +1062,22 @@ msgstr "加密选项"
msgid "Clipper Options"
msgstr "网页剪辑选项"
#, fuzzy, javascript-format
#, javascript-format
msgid ""
"Delete notebook \"%s\"?\n"
"\n"
"All notes and sub-notebooks within this notebook will also be deleted."
msgstr "是否删除笔记本?所有在该笔记本内的笔记也将同时被删除。"
msgstr ""
"是否删除笔记本“%s”?\n"
"\n"
"所有在该笔记本内的笔记和下级笔记本也将同时被删除。"
#, fuzzy, javascript-format
#, javascript-format
msgid "Remove tag \"%s\" from all notes?"
msgstr "从所有笔记中删除标签?"
msgstr "从所有笔记中删除标签“%s”?"
msgid "Remove this search from the sidebar?"
msgstr "从栏中删除该项搜索?"
msgstr "从栏中删除该项搜索?"
msgid "Delete"
msgstr "删除"
@@ -1089,23 +1090,23 @@ msgstr "笔记本"
#, javascript-format
msgid "Decrypting items: %d/%d"
msgstr "解密项目:%d/%d"
msgstr "正在解密项目:%d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "获取资源:%d"
msgstr "正在获取资源:%d"
msgid "Please select where the sync status should be exported to"
msgstr "请选择同步状态的导出位置"
msgid "Remove?"
msgstr ""
msgid "Table of contents"
msgstr "目录"
msgid "Add or remove tags"
msgstr "添加或删除标签"
msgid "Duplicate"
msgstr "重复的"
msgstr "创建副本"
#, javascript-format
msgid "%s - Copy"
@@ -1123,13 +1124,13 @@ msgstr "切换到待办事项"
msgid "Copy Markdown link"
msgstr "复制 Markdown 链接"
#, fuzzy, javascript-format
#, javascript-format
msgid "Delete note \"%s\"?"
msgstr "是否删除笔记?"
msgstr "是否删除笔记“%s”?"
#, fuzzy, javascript-format
#, javascript-format
msgid "Delete these %d notes?"
msgstr "是否删除这笔记?"
msgstr "是否删除这 %d 条笔记?"
#, javascript-format
msgid "Usage: %s"
@@ -1168,7 +1169,7 @@ msgstr "未知级别的 ID:%s"
msgid ""
"Cannot refresh token: authentication data is missing. Starting the "
"synchronisation again may fix the problem."
msgstr "无法刷新 Token 令牌:缺认证数据。重新开始同步可能会修此错误。"
msgstr "无法刷新 Token 令牌:缺认证数据。重新同步可能会修此错误。"
msgid "Untitled"
msgstr "无标题"
@@ -1231,20 +1232,26 @@ msgid "Last error: %s"
msgstr "最后错误:%s"
msgid "Idle"
msgstr "闲"
msgstr "闲"
msgid "In progress"
msgstr "正在进行"
#, javascript-format
msgid "Synchronisation is already in progress. State: %s"
msgstr "同步正在进行中。状态:%s"
msgstr "已经在同步。状态:%s"
msgid "Encrypted"
msgstr "已加密"
msgid "Encrypted items cannot be modified"
msgstr "无法修改已加密项目"
msgstr "无法修改已加密项目"
msgid "title"
msgstr "标题"
msgid "updated date"
msgstr "更新日期"
msgid "Conflicts"
msgstr "冲突"
@@ -1254,13 +1261,7 @@ msgstr "无法移动笔记本到该位置"
#, javascript-format
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "笔记本无法被命名为 \"%s\",该标题为保留标题。"
msgid "title"
msgstr "标题"
msgid "updated date"
msgstr "更新日期"
msgstr "笔记本无法被命名为 \"%s\",这个标题被留作他用。"
msgid "created date"
msgstr "创建日期"
@@ -1270,11 +1271,11 @@ msgstr "该笔记不包含地理定位信息。"
#, javascript-format
msgid "Cannot copy note to \"%s\" notebook"
msgstr "无法复制笔记到 \"%s\" 笔记本"
msgstr "无法复制笔记到笔记本“%s”"
#, javascript-format
msgid "Cannot move note to \"%s\" notebook"
msgstr "无法移动笔记到 \"%s\" 笔记本"
msgstr "无法移动笔记到笔记本“%s”"
msgid "Language"
msgstr "语言"
@@ -1289,10 +1290,10 @@ msgid "Theme"
msgstr "主题"
msgid "Light"
msgstr "浅色"
msgstr "明亮"
msgid "Dark"
msgstr "深"
msgstr "深"
msgid "Uncompleted to-dos on top"
msgstr "将未完成的待办事项置顶"
@@ -1304,7 +1305,10 @@ msgid "Sort notes by"
msgstr "排序笔记"
msgid "Reverse sort order"
msgstr "反转排序顺序"
msgstr "序"
msgid "Sort notebooks by"
msgstr "笔记本排序依据"
msgid "Save geo-location with notes"
msgstr "保存地理定位信息到笔记中"
@@ -1325,15 +1329,15 @@ msgid "Show tray icon"
msgstr "显示托盘图标"
msgid "Note: Does not work in all desktop environments."
msgstr "注意:在所有桌面环境下无法正常工作。"
msgstr "注意:某些桌面环境下无。"
msgid ""
"This will allow Joplin to run in the background. It is recommended to enable "
"this setting so that your notes are constantly being synchronised, thus "
"reducing the number of conflicts."
msgstr ""
"该选项允许 Joplin 在后台运行,如果你的笔记时常发生变化,推荐启用该设置来减少"
"可能的冲突"
"该选项允许 Joplin 在后台运行,如果你经常修改和同步笔记,推荐启用该设置来减少"
"可能的冲突"
msgid "Start application minimised in the tray icon"
msgstr "应用程序启动时最小化到托盘"
@@ -1358,7 +1362,7 @@ msgid "Automatically update the application"
msgstr "自动更新程序"
msgid "Get pre-releases when checking for updates"
msgstr "检查更新时获取预发布版本"
msgstr "检查更新时获取预发布版本"
#, javascript-format
msgid "See the pre-release page for more details: %s"
@@ -1528,34 +1532,34 @@ msgid ""
"target. In order to find these items, either search for the title or the ID "
"(which is displayed in brackets above)."
msgstr ""
"这些项目将保留于设备中,但不会上传到同步目标。若需查找这些项目,请搜索标题"
"ID(显示在上方括号中)。"
"这些项目将只保存在本设备上,不会上传到同步目标。若需查找这些项目,请搜索标题"
"ID(显示在上方括号中)。"
msgid "Sync status (synced items / total items)"
msgstr "同步状态(已同步项目/项目总数)"
#, javascript-format
msgid "%s: %d/%d"
msgstr "%s:%d/%d条"
msgstr "%s:%d/%d 条"
#, javascript-format
msgid "Total: %d/%d"
msgstr "总数:%d/%d条"
msgstr "总数:%d/%d 条"
#, javascript-format
msgid "Conflicted: %d"
msgstr "有冲突:%d条"
msgstr "有冲突:%d 条"
#, javascript-format
msgid "To delete: %d"
msgstr "将删除:%d条"
msgstr "将删除:%d 条"
msgid "Folders"
msgstr "文件夹"
#, javascript-format
msgid "%s: %d notes"
msgstr "%s: %d条笔记"
msgstr "%s%d 条笔记"
msgid "Coming alarms"
msgstr "临近提醒"
@@ -1568,7 +1572,7 @@ msgid "Permission to use camera"
msgstr "使用摄像头的权限"
msgid "Your permission to use your camera is required."
msgstr "使用摄像头的权限是必须的"
msgstr "您须要授予相机权限。"
msgid "There are currently no notes. Create one by clicking on the (+) button."
msgstr "当前没有任何笔记。点击 (+) 按钮创建。"
@@ -1593,10 +1597,10 @@ msgstr "移动到笔记本..."
#, javascript-format
msgid "Move %d notes to notebook \"%s\"?"
msgstr "是否移动%d条笔记到 \"%s\" 笔记本?"
msgstr "是否移动 %d 条笔记到笔记本“%s”?"
msgid "Press to set the decryption password."
msgstr "按键将设置解密密码。"
msgstr "按设置解密密码。"
msgid "Clear alarm"
msgstr "清除提醒"
@@ -1614,10 +1618,10 @@ msgid "Cancel synchronisation"
msgstr "取消同步"
msgid "Checking... Please wait."
msgstr "正在检查... 请稍。"
msgstr "正在检查... 请稍。"
msgid "Success! Synchronisation configuration appears to be correct."
msgstr "成功!同步配置似乎是正确的。"
msgstr "成功!同步配置看起来没问题。"
msgid ""
"Error. Please check that URL, username, password, etc. are correct and that "
@@ -1627,7 +1631,7 @@ msgstr ""
"如下:"
msgid "The application has been authorised!"
msgstr "此程序已被成功授权。"
msgstr "已成功授予本应用程序权限!"
#, javascript-format
msgid ""
@@ -1637,11 +1641,11 @@ msgid ""
"\n"
"Please try again."
msgstr ""
"无法授权应用:\n"
"无法授权本程序:\n"
"\n"
"%s\n"
"\n"
"请重新尝试"
"请重试"
#, javascript-format
msgid "Decrypted items: %s / %s"
@@ -1657,8 +1661,8 @@ msgid ""
"To work correctly, the app needs the following permissions. Please enable "
"them in your phone settings, in Apps > Joplin > Permissions"
msgstr ""
"为了正常的使用,应用需要以下权限。请在你的手机设置(应用 > Joplin > 权限)"
"启用它们"
"本应用程序需要下列权限才能正常运作。请在你的手机设置(应用 > Joplin > 权限)"
"启用它们"
msgid ""
"- Storage: to allow attaching files to notes and to enable filesystem "
@@ -1666,7 +1670,7 @@ msgid ""
msgstr "- 存储:允许将文件附加到笔记中并启用文件系统同步。"
msgid "- Camera: to allow taking a picture and attaching it to a note."
msgstr "- 相机:允许拍照并将添加到一条笔记中。"
msgstr "- 相机:允许拍照并将照片添加到一条笔记中。"
msgid "- Location: to allow attaching geo-location information to a note."
msgstr "- 定位:允许将地理位置信息附加到一条笔记中。"
@@ -1674,10 +1678,6 @@ msgstr "- 定位:允许将地理位置信息附加到一条笔记中。"
msgid "Joplin website"
msgstr "Joplin 官网"
#, javascript-format
msgid "Joplin v%s"
msgstr "Joplin v%s"
#, javascript-format
msgid "Database v%s"
msgstr "数据库 v%s"
@@ -1796,8 +1796,8 @@ msgstr "您目前未有笔记本。点击 (+) 按钮创建。"
msgid "Welcome"
msgstr "欢迎"
#~ msgid "Separate each tag by a comma."
#~ msgstr "用半角逗号 \",\" 分开每个标签。"
#~ msgid "Joplin v%s"
#~ msgstr "Joplin v%s"
#~ msgid "State: %s."
#~ msgstr "状态:%s。"

View File

@@ -122,9 +122,10 @@ msgstr "標記待辦事項為完成。"
msgid "Note is not a to-do: \"%s\""
msgstr "記事不等於待辨事項: \"%s\""
#, fuzzy
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
"`status`, `decrypt-file` and `target-status`."
msgstr ""
"管理 E2EE 設置。命令是 `enable`,`disable`,`decrypt`,`status` 和 `target-"
"status`。"
@@ -714,11 +715,11 @@ msgid "An update is available, do you want to download it now?"
msgstr "有可用的更新,您需要立即下載嗎?"
#, javascript-format
msgid "Your version: v%s"
msgid "Your version: %s"
msgstr ""
#, javascript-format
msgid "New version: v%s"
msgid "New version: %s"
msgstr ""
msgid "Yes"
@@ -911,6 +912,9 @@ msgstr "記事本標題:"
msgid "Add or remove tags:"
msgstr "新增或移除標籤:"
msgid "Separate each tag by a comma."
msgstr "您可用逗號分隔每個標籤。"
msgid "Rename notebook:"
msgstr "重新命名記事本:"
@@ -1106,7 +1110,7 @@ msgstr "資源: %d。"
msgid "Please select where the sync status should be exported to"
msgstr "請選擇將同步狀態導出到的位置"
msgid "Remove?"
msgid "Table of contents"
msgstr ""
msgid "Add or remove tags"
@@ -1256,6 +1260,12 @@ msgstr "已加密"
msgid "Encrypted items cannot be modified"
msgstr "無法修改已加密項目"
msgid "title"
msgstr "標題"
msgid "updated date"
msgstr "更新日期"
msgid "Conflicts"
msgstr "衝突"
@@ -1266,12 +1276,6 @@ msgstr "無法移動記事本到此位置"
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
msgstr "筆記本無法命名為 \"%s\",這標題已被保留。"
msgid "title"
msgstr "標題"
msgid "updated date"
msgstr "更新日期"
msgid "created date"
msgstr "建立日期"
@@ -1316,6 +1320,10 @@ msgstr "排序記事"
msgid "Reverse sort order"
msgstr "顛倒排序順序"
#, fuzzy
msgid "Sort notebooks by"
msgstr "排序記事"
msgid "Save geo-location with notes"
msgstr "在記事中保存地理位置資訊"
@@ -1684,10 +1692,6 @@ msgstr "- 位置: 允許將地理位置資訊附加到筆記。"
msgid "Joplin website"
msgstr "Joplin 官方網站"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin 官方網站"
#, javascript-format
msgid "Database v%s"
msgstr ""
@@ -1807,8 +1811,9 @@ msgstr "您當前沒有任何筆記本。通過按一下 (+) 鍵去建立一本
msgid "Welcome"
msgstr "歡迎"
#~ msgid "Separate each tag by a comma."
#~ msgstr "您可用逗號分隔每個標籤。"
#, fuzzy
#~ msgid "Joplin v%s"
#~ msgstr "Joplin 官方網站"
#~ msgid "State: %s."
#~ msgstr "狀態: %s。"

View File

@@ -52,4 +52,53 @@ describe('models_Folder', function() {
expect(all.length).toBe(0);
}));
it('should sort by last modified, based on content', asyncTest(async () => {
let folders;
let f1 = await Folder.save({ title: "folder1" }); await sleep(0.1);
let f2 = await Folder.save({ title: "folder2" }); await sleep(0.1);
let f3 = await Folder.save({ title: "folder3" }); await sleep(0.1);
let n1 = await Note.save({ title: 'note1', parent_id: f2.id });
folders = await Folder.orderByLastModified(await Folder.all(), 'desc');
expect(folders.length).toBe(3);
expect(folders[0].id).toBe(f2.id);
expect(folders[1].id).toBe(f3.id);
expect(folders[2].id).toBe(f1.id);
let n2 = await Note.save({ title: 'note1', parent_id: f1.id });
folders = await Folder.orderByLastModified(await Folder.all(), 'desc');
expect(folders[0].id).toBe(f1.id);
expect(folders[1].id).toBe(f2.id);
expect(folders[2].id).toBe(f3.id);
await Note.save({ id: n1.id, title: 'note1 mod' });
folders = await Folder.orderByLastModified(await Folder.all(), 'desc');
expect(folders[0].id).toBe(f2.id);
expect(folders[1].id).toBe(f1.id);
expect(folders[2].id).toBe(f3.id);
folders = await Folder.orderByLastModified(await Folder.all(), 'asc');
expect(folders[0].id).toBe(f3.id);
expect(folders[1].id).toBe(f1.id);
expect(folders[2].id).toBe(f2.id);
}));
it('should sort by last modified, based on content (sub-folders too)', asyncTest(async () => {
let folders;
let f1 = await Folder.save({ title: "folder1" }); await sleep(0.1);
let f2 = await Folder.save({ title: "folder2" }); await sleep(0.1);
let f3 = await Folder.save({ title: "folder3", parent_id: f1.id }); await sleep(0.1);
let n1 = await Note.save({ title: 'note1', parent_id: f3.id });
folders = await Folder.orderByLastModified(await Folder.all(), 'desc');
expect(folders.length).toBe(3);
expect(folders[0].id).toBe(f1.id);
expect(folders[1].id).toBe(f3.id);
expect(folders[2].id).toBe(f2.id);
}));
});

View File

@@ -80,7 +80,7 @@ class ElectronAppWrapper {
}))
// Uncomment this to view errors if the application does not start
if (this.env_ === 'dev') this.win_.webContents.openDevTools();
// if (this.env_ === 'dev') this.win_.webContents.openDevTools();
this.win_.on('close', (event) => {
// If it's on macOS, the app is completely closed only if the user chooses to close the app (willQuitApp_ will be true)

View File

@@ -245,22 +245,41 @@ class Application extends BaseApplication {
updateMenu(screen) {
if (this.lastMenuScreen_ === screen) return;
const sortNoteItems = [];
const sortNoteOptions = Setting.enumOptions('notes.sortOrder.field');
for (let field in sortNoteOptions) {
if (!sortNoteOptions.hasOwnProperty(field)) continue;
sortNoteItems.push({
label: sortNoteOptions[field],
screens: ['Main'],
const sortNoteFolderItems = (type) => {
const sortItems = [];
const sortOptions = Setting.enumOptions(type + '.sortOrder.field');
for (let field in sortOptions) {
if (!sortOptions.hasOwnProperty(field)) continue;
sortItems.push({
label: sortOptions[field],
screens: ['Main'],
type: 'checkbox',
checked: Setting.value(type + '.sortOrder.field') === field,
click: () => {
Setting.setValue(type + '.sortOrder.field', field);
this.refreshMenu();
}
});
}
sortItems.push({ type: 'separator' });
sortItems.push({
label: Setting.settingMetadata(type + '.sortOrder.reverse').label(),
type: 'checkbox',
checked: Setting.value('notes.sortOrder.field') === field,
checked: Setting.value(type + '.sortOrder.reverse'),
screens: ['Main'],
click: () => {
Setting.setValue('notes.sortOrder.field', field);
this.refreshMenu();
}
Setting.setValue(type + '.sortOrder.reverse', !Setting.value(type + '.sortOrder.reverse'));
},
});
return sortItems;
}
const sortNoteItems = sortNoteFolderItems('notes');
const sortFolderItems = sortNoteFolderItems('folders');
const focusItems = [];
focusItems.push({
@@ -580,13 +599,9 @@ class Application extends BaseApplication {
screens: ['Main'],
submenu: sortNoteItems,
}, {
label: Setting.settingMetadata('notes.sortOrder.reverse').label(),
type: 'checkbox',
checked: Setting.value('notes.sortOrder.reverse'),
label: Setting.settingMetadata('folders.sortOrder.field').label(),
screens: ['Main'],
click: () => {
Setting.setValue('notes.sortOrder.reverse', !Setting.value('notes.sortOrder.reverse'));
},
submenu: sortFolderItems,
}, {
label: Setting.settingMetadata('uncompletedTodosOnTop').label(),
type: 'checkbox',

View File

@@ -131,7 +131,7 @@ function checkForUpdates(inBackground, window, logFilePath, options) {
const buttonIndex = dialog.showMessageBox(parentWindow_, {
type: 'info',
message: _('An update is available, do you want to download it now?') + '\n\n' + _('Your version: v%s', packageInfo.version) + '\n' + _('New version: v%s', newVersionString) + releaseNotes,
message: _('An update is available, do you want to download it now?') + '\n\n' + _('Your version: %s', packageInfo.version) + '\n' + _('New version: %s', newVersionString) + releaseNotes,
buttons: [_('Yes'), _('No')]
});

View File

@@ -43,6 +43,7 @@ fs.readdirSync(guiPath).forEach((filename) => {
const libContent = [
fs.readFileSync(basePath + '/ReactNativeClient/lib/string-utils-common.js', 'utf8'),
fs.readFileSync(basePath + '/ReactNativeClient/lib/markJsUtils.js', 'utf8'),
fs.readFileSync(basePath + '/ReactNativeClient/lib/MdToHtml/webviewLib.js', 'utf8'),
];
fs.writeFileSync(__dirname + '/gui/note-viewer/lib.js', libContent.join('\n'), 'utf8');

View File

@@ -0,0 +1,50 @@
const execCommand = function(command) {
const exec = require('child_process').exec
console.info('Running: ' + command);
return new Promise((resolve, reject) => {
let childProcess = exec(command, (error, stdout, stderr) => {
if (error) {
if (error.signal == 'SIGTERM') {
resolve('Process was killed');
} else {
reject(error);
}
} else {
resolve(stdout.trim());
}
});
});
}
const isLinux = () => {
return process && process.platform === 'linux';
}
const isWindows = () => {
return process && process.platform === 'win32';
}
const isMac = () => {
return process && process.platform === 'darwin';
}
async function main() {
// electron-rebuild --arch ia32 && electron-rebuild --arch x64
let exePath = __dirname + '/node_modules/.bin/electron-rebuild';
if (isWindows()) exePath += '.cmd';
if (isWindows()) {
console.info(await execCommand(['"' + exePath + '"', '--arch ia32'].join(' ')));
console.info(await execCommand(['"' + exePath + '"', '--arch x64'].join(' ')));
} else {
console.info(await execCommand(['"' + exePath + '"'].join(' ')));
}
}
main().catch((error) => {
console.error(error);
process.exit(1);
});

View File

@@ -132,17 +132,15 @@ class MainScreenComponent extends React.Component {
} else if (command.name === 'setTags') {
const tags = await Tag.tagsByNoteId(command.noteId);
const tagTitles = tags.map((a) => { return a.title }).sort();
const allTags = await Tag.allWithNotes();
this.setState({
promptOptions: {
label: _('Add or remove tags:'),
inputType: 'tags',
value: tagTitles,
autocomplete: allTags,
description: _('Separate each tag by a comma.'),
value: tagTitles.join(', '),
onClose: async (answer) => {
if (answer !== null) {
const tagTitles = answer.map((a) => { return a.trim() });
const tagTitles = answer.split(',').map((a) => { return a.trim() });
await Tag.setNoteTagsByTitles(command.noteId, tagTitles);
}
this.setState({ promptOptions: null });

View File

@@ -17,7 +17,11 @@ class NavigatorComponent extends Component {
}
updateWindowTitle(title) {
if (bridge().window()) bridge().window().setTitle(title);
try {
if (bridge().window()) bridge().window().setTitle(title);
} catch (error) {
console.warn('updateWindowTitle', error);
}
}
render() {

View File

@@ -36,6 +36,7 @@ const ResourceFetcher = require('lib/services/ResourceFetcher');
const { toSystemSlashes, safeFilename } = require('lib/path-utils');
const { clipboard } = require('electron');
const SearchEngine = require('lib/services/SearchEngine');
const ModelCache = require('lib/services/ModelCache');
const NoteTextViewer = require('./NoteTextViewer.min');
require('brace/mode/markdown');
@@ -75,6 +76,7 @@ class NoteTextComponent extends React.Component {
// to automatically set the title.
newAndNoTitleChangeNoteId: null,
bodyHtml: '',
lastRenderCssFiles: [],
lastKeys: [],
showLocalSearch: false,
localSearch: Object.assign({}, this.localSearchDefaultState),
@@ -226,9 +228,10 @@ class NoteTextComponent extends React.Component {
if (!this.state.note || !this.state.note.body) return;
const resourceIds = await Note.linkedResourceIds(this.state.note.body);
if (resourceIds.indexOf(resource.id) >= 0) {
this.mdToHtml().clearCache();
// this.mdToHtml().clearCache();
this.lastSetHtml_ = '';
this.updateHtml(this.state.note.body);
this.scheduleHtmlUpdate();
//this.updateHtml(this.state.note.body);
}
}
@@ -563,6 +566,8 @@ class NoteTextComponent extends React.Component {
}
}
// if (newState.note) await shared.refreshAttachedResources(this, newState.note.body);
this.updateHtml(newState.note ? newState.note.body : '');
}
@@ -635,7 +640,7 @@ class NoteTextComponent extends React.Component {
const arg0 = args && args.length >= 1 ? args[0] : null;
const arg1 = args && args.length >= 2 ? args[1] : null;
reg.logger().debug('Got ipc-message: ' + msg, args);
console.info('Got ipc-message: ' + msg, args);
if (msg.indexOf('checkboxclick:') === 0) {
// Ugly hack because setting the body here will make the scrollbar
@@ -644,7 +649,7 @@ class NoteTextComponent extends React.Component {
// "afterRender" event has been called.
this.restoreScrollTop_ = this.editorScrollTop();
const newBody = this.mdToHtml_.handleCheckboxClick(msg, this.state.note.body);
const newBody = shared.toggleCheckbox(msg, this.state.note.body);
this.saveOneProperty('body', newBody);
} else if (msg === 'setMarkerCount') {
const ls = Object.assign({}, this.state.localSearch);
@@ -724,6 +729,7 @@ class NoteTextComponent extends React.Component {
// When using the file:// protocol, openExternal doesn't work (does nothing) with URL-encoded paths
require('electron').shell.openExternal(urlDecode(msg));
} else {
console.info('OPEN URL');
require('electron').shell.openExternal(msg);
}
} else if (msg.indexOf('#') === 0) {
@@ -794,7 +800,7 @@ class NoteTextComponent extends React.Component {
});
if (Setting.value('env') === 'dev') {
// this.webviewRef_.current.wrappedInstance.openDevTools();
this.webviewRef_.current.wrappedInstance.openDevTools();
}
}
@@ -891,31 +897,22 @@ class NoteTextComponent extends React.Component {
}
}
updateHtml(body = null, options = null) {
async updateHtml(body = null, options = null) {
if (!options) options = {};
if (!('useCustomCss' in options)) options.useCustomCss = true;
const mdOptions = {
onResourceLoaded: () => {
if (this.resourceLoadedTimeoutId_) {
clearTimeout(this.resourceLoadedTimeoutId_);
this.resourceLoadedTimeoutId_ = null;
}
this.resourceLoadedTimeoutId_ = setTimeout(() => {
this.resourceLoadedTimeoutId_ = null;
this.updateHtml();
this.forceUpdate();
}, 100);
},
postMessageSyntax: 'ipcProxySendToHost',
userCss: options.useCustomCss ? this.props.customCss : '',
};
let bodyToRender = body;
if (bodyToRender === null) bodyToRender = this.state.note && this.state.note.body ? this.state.note.body : '';
const theme = themeStyle(this.props.theme);
let bodyToRender = body;
if (bodyToRender === null) bodyToRender = this.state.note && this.state.note.body ? this.state.note.body : '';
const mdOptions = {
codeTheme: theme.codeThemeCss,
postMessageSyntax: 'ipcProxySendToHost',
userCss: options.useCustomCss ? this.props.customCss : '',
resources: await shared.attachedResources(bodyToRender),
};
let bodyHtml = '';
const visiblePanes = this.props.visiblePanes || ['editor', 'viewer'];
@@ -925,9 +922,12 @@ class NoteTextComponent extends React.Component {
bodyToRender = '*' + _('This note has no content. Click on "%s" to toggle the editor and edit the note.', _('Layout')) + '*';
}
bodyHtml = this.mdToHtml().render(bodyToRender, theme, mdOptions);
const result = this.mdToHtml().render(bodyToRender, theme, mdOptions);
this.setState({ bodyHtml: bodyHtml });
this.setState({
bodyHtml: result.html,
lastRenderCssFiles: result.cssFiles,
});
}
titleField_keyDown(event) {
@@ -1061,7 +1061,7 @@ class NoteTextComponent extends React.Component {
});
}
printTo_(target, options) {
async printTo_(target, options) {
if (this.props.selectedNoteIds.length !== 1 || !this.webviewRef_.current) {
throw new Error(_('Only one note can be printed or exported to PDF at a time.'));
}
@@ -1072,13 +1072,13 @@ class NoteTextComponent extends React.Component {
const previousTheme = Setting.value('theme');
Setting.setValue('theme', Setting.THEME_LIGHT);
this.lastSetHtml_ = '';
this.updateHtml(tempBody, { useCustomCss: false });
await this.updateHtml(tempBody, { useCustomCss: false });
this.forceUpdate();
const restoreSettings = () => {
const restoreSettings = async () => {
Setting.setValue('theme', previousTheme);
this.lastSetHtml_ = '';
this.updateHtml(previousBody);
await this.updateHtml(previousBody);
this.forceUpdate();
}
@@ -1100,7 +1100,7 @@ class NoteTextComponent extends React.Component {
}, 100);
}
commandSavePdf() {
async commandSavePdf() {
try {
if (!this.state.note) throw new Error(_('Only one note can be printed or exported to PDF at a time.'));
@@ -1111,15 +1111,15 @@ class NoteTextComponent extends React.Component {
if (!path) return;
this.printTo_('pdf', { path: path });
await this.printTo_('pdf', { path: path });
} catch (error) {
bridge().showErrorMessageBox(error.message);
}
}
commandPrint() {
async commandPrint() {
try {
this.printTo_('printer');
await this.printTo_('printer');
} catch (error) {
bridge().showErrorMessageBox(error.message);
}
@@ -1711,7 +1711,9 @@ class NoteTextComponent extends React.Component {
const htmlHasChanged = this.lastSetHtml_ !== html;
if (htmlHasChanged) {
let options = {codeTheme: theme.codeThemeCss};
let options = {
cssFiles: this.state.lastRenderCssFiles,
};
this.webviewRef_.current.wrappedInstance.send('setHtml', html, options);
this.lastSetHtml_ = html;
}

View File

@@ -40,6 +40,20 @@ class NoteTextViewerComponent extends React.Component {
const fn = this.webviewListeners_[n];
wv.addEventListener(n, fn);
}
let isAlreadyReady = false;
try {
isAlreadyReady = !this.webviewRef_.current.isLoading()
} catch (error) {
// Ignore - it means the view has not started loading, and the DOM ready event has not been emitted yet
// Error is "The WebView must be attached to the DOM and the dom-ready event emitted before this method can be called."
}
// Edge-case - the webview was already ready by the time initWebview was
// called - so manually call the domReady event to notify caller.
if (isAlreadyReady) {
this.webview_domReady({});
}
}
destroyWebview() {
@@ -73,11 +87,21 @@ class NoteTextViewerComponent extends React.Component {
}
printToPDF(options, callback) {
return this.webviewRef_.current.printToPDF(options, callback);
// In Electron 4x, printToPDF is broken so need to use this hack:
// https://github.com/electron/electron/issues/16171#issuecomment-451090245
// return this.webviewRef_.current.printToPDF(options, callback);
return this.webviewRef_.current.getWebContents().printToPDF(options, callback);
}
print(options = {}) {
return this.webviewRef_.current.print(options);
// In Electron 4x, print is broken so need to use this hack:
// https://github.com/electron/electron/issues/16219#issuecomment-451454948
// Note that this is not a perfect workaround since it means the options are ignored
// In particular it means that background images and colours won't be printed (printBackground property will be ignored)
// return this.webviewRef_.current.getWebContents().print({});
return this.webviewRef_.current.getWebContents().executeJavaScript("window.print()")
}
openDevTools() {

View File

@@ -5,21 +5,13 @@ const moment = require('moment');
const { themeStyle } = require('../theme.js');
const { time } = require('lib/time-utils.js');
const Datetime = require('react-datetime');
const TagList = require('./TagList.min.js');
const Tag = require('lib/models/Tag.js');
class PromptDialog extends React.Component {
componentWillMount() {
let answer = ''
if (this.props.inputType !== 'tags' && this.props.defaultValue) {
answer = this.props.defaultValue;
}
this.setState({
visible: false,
answer: answer,
tags: this.props.inputType === 'tags' ? this.props.defaultValue : null,
answer: this.props.defaultValue ? this.props.defaultValue : '',
});
this.focusInput_ = true;
}
@@ -31,11 +23,7 @@ class PromptDialog extends React.Component {
}
if ('defaultValue' in newProps && newProps.defaultValue !== this.props.defaultValue) {
if ('inputType' in newProps && newProps.inputType === 'tags') {
this.setState({ answer: '', tags: newProps.defaultValue });
} else {
this.setState({ answer: newProps.defaultValue });
}
this.setState({ answer: newProps.defaultValue });
}
}
@@ -74,7 +62,6 @@ class PromptDialog extends React.Component {
backgroundColor: theme.backgroundColor,
padding: 16,
display: 'inline-block',
maxWidth: width * 0.5,
boxShadow: '6px 6px 20px rgba(0,0,0,0.5)',
};
@@ -105,11 +92,6 @@ class PromptDialog extends React.Component {
borderColor: theme.dividerColor,
};
this.styles_.tagList = {
marginBottom: 10,
marginTop: 10,
};
this.styles_.desc = Object.assign({}, theme.textStyle, {
marginTop: 10,
});
@@ -131,9 +113,6 @@ class PromptDialog extends React.Component {
// outputAnswer = anythingToDate(outputAnswer);
outputAnswer = time.anythingToDateTime(outputAnswer);
}
else if (this.props.inputType === 'tags') {
outputAnswer = this.state.tags;
}
this.props.onClose(accept ? outputAnswer : null, buttonType);
}
this.setState({ visible: false, answer: '' });
@@ -158,35 +137,15 @@ class PromptDialog extends React.Component {
const onKeyDown = (event) => {
if (event.key === 'Enter') {
if (this.state.answer.trim() !== '') {
let newTags = this.state.tags;
if (newTags.indexOf(this.state.answer) === -1) {
newTags.push(this.state.answer);
}
this.setState({
tags: newTags,
answer: ''
});
}
onClose(true);
} else if (event.key === 'Escape') {
onClose(false);
}
}
const onDeleteTag = (tag) => {
let newTags = this.state.tags;
var index = newTags.indexOf(tag);
if (index !== -1) newTags.splice(index, 1);
this.setState({
tags: newTags,
});
}
const descComp = this.props.description ? <div style={styles.desc}>{this.props.description}</div> : null;
let inputComp = null;
let dataList = null;
let tagList = null;
if (this.props.inputType === 'datetime') {
inputComp = <Datetime
@@ -202,31 +161,11 @@ class PromptDialog extends React.Component {
ref={input => this.answerInput_ = input}
value={this.state.answer}
type="text"
list={this.props.inputType === "tags" ? "tags" : null}
onChange={(event) => onChange(event)}
onKeyDown={(event) => onKeyDown(event)}
/>
}
if (this.props.inputType === 'tags') {
tagList = <TagList
style={styles.tagList}
onDeleteItem={onDeleteTag}
items={this.state.tags.map((a) => {
return {title: a, id: a}
})}
/>;
dataList = <datalist id="tags">
{this.props.autocomplete.map((a) => {
if (this.state.tags.indexOf(a.title) === -1) {
return <option value={a.title} key={a.id} />
}
}
)}
</datalist>
}
const buttonComps = [];
if (buttonTypes.indexOf('ok') >= 0) buttonComps.push(<button key="ok" style={styles.button} onClick={() => onClose(true, 'ok')}>{_('OK')}</button>);
if (buttonTypes.indexOf('cancel') >= 0) buttonComps.push(<button key="cancel" style={styles.button} onClick={() => onClose(false, 'cancel')}>{_('Cancel')}</button>);
@@ -238,9 +177,7 @@ class PromptDialog extends React.Component {
<label style={styles.label}>{this.props.label ? this.props.label : ''}</label>
<div style={{display: 'inline-block', color: 'black', backgroundColor: theme.backgroundColor}}>
{inputComp}
{dataList}
{descComp}
{tagList}
</div>
<div style={{ textAlign: 'right', marginTop: 10 }}>
{buttonComps}

View File

@@ -1,68 +1,14 @@
const React = require('react');
const { connect } = require('react-redux');
const { themeStyle } = require('../theme.js');
const { _ } = require('lib/locale.js');
class TagItemComponent extends React.Component {
constructor(props) {
super(props);
this.clickAway = this.clickAway.bind(this);
}
componentWillMount() {
this.setState({
title: this.props.title,
toDelete: false,
});
}
clickAway(event) {
if (this.span_ && !this.span_.contains(event.target)) {
this.setState({
title: this.props.title,
toDelete: false,
});
}
}
componentDidMount() {
document.addEventListener('mousedown', this.clickAway);
}
componentWillUnmount() {
document.removeEventListener('mousedown', this.clickAway);
}
render() {
const theme = themeStyle(this.props.theme);
let style = Object.assign({textAlign: 'center'}, theme.tagStyle);
const style = Object.assign({}, theme.tagStyle);
const title = this.props.title;
if (this.state.toDelete) {
style = Object.assign({}, style, {backgroundColor: theme.removeColor});
}
const onClick = (event) => {
if (this.state.toDelete) {
this.props.onDelete(this.props.title);
}
else if (this.props.onDelete) {
this.setState({
title: _("Remove?"),
toDelete: true,
});
}
}
return (
<span
ref={span => this.span_ = span}
onClick={onClick}
style={style}
value={this.state.title}>
{this.state.title}
</span>
);
return <span style={style}>{title}</span>;
}
}

View File

@@ -10,7 +10,7 @@ class TagListComponent extends React.Component {
const tags = this.props.items;
style.display = 'flex';
style.flexWrap = 'wrap';
style.flexDirection = 'row';
style.borderBottom = '1px solid ' + theme.dividerColor;
style.boxSizing = 'border-box';
style.fontSize = theme.fontSize;
@@ -23,8 +23,7 @@ class TagListComponent extends React.Component {
for (let i = 0; i < tags.length; i++) {
const props = {
title: tags[i].title,
key: tags[i].id,
onDelete: this.props.onDeleteItem,
key: tags[i].id
};
tagItems.push(<TagItem {...props} />);
}

View File

@@ -1,4 +1,5 @@
const React = require("react");
const electron = require('electron');
class VerticalResizer extends React.PureComponent {
@@ -31,11 +32,13 @@ class VerticalResizer extends React.PureComponent {
document.addEventListener('dragover', this.document_onDragOver)
event.dataTransfer.dropEffect= 'none';
const cursor = electron.screen.getCursorScreenPoint();
this.setState({
drag: {
startX: event.nativeEvent.screenX,
lastX: event.nativeEvent.screenX,
startX: cursor.x,
lastX: cursor.x,
}
});
@@ -46,9 +49,12 @@ class VerticalResizer extends React.PureComponent {
// If we got a drag event with no buttons pressed, it's the last drag event
// that we should ignore, because it's sometimes use to put the dragged element
// back to its original position (if there was no valid drop target), which we don't want.
if (!event.nativeEvent.buttons) return;
// Also if clientX, screenX, etc. are 0, it's also the last event and we want to ignore these buggy values.
// const e = event.nativeEvent;
// if (!e.buttons || (!e.clientX && !e.clientY && !e.screenX && !e.screenY)) return;
const newX = event.nativeEvent.screenX;
const cursor = electron.screen.getCursorScreenPoint();
const newX = cursor.x;
const delta = newX - this.state.drag.lastX;
if (!delta) return;

View File

@@ -28,14 +28,11 @@
ul ul, ul ol, ol ul, ol ol {
margin-bottom: 0px;
}
.katex { font-size: 1.3em; } /* This controls the global Katex font size*/
</style>
</head>
<body id="body">
<div id="hlScriptContainer"></div>
<div id="mermaidScriptContainer"></div>
<div id="styleContainer"></div>
<div id="markScriptContainer"></div>
<div id="content" ondragstart="return false;" ondrop="return false;"></div>
<script src="./lib.js"></script>
@@ -59,62 +56,18 @@
}
});
// ----------------------------------------------------------------------
// Handle dynamically loading HLJS when a code element is present
// ----------------------------------------------------------------------
let hljsScriptAdded = false;
let hljsLoaded = false;
function loadHljs(options) {
hljsScriptAdded = true;
const script = document.createElement('script');
script.onload = function () {
hljsLoaded = true;
applyHljs();
};
script.src = 'highlight/highlight.pack.js';
document.getElementById('hlScriptContainer').appendChild(script);
const link = document.createElement('link');
link.rel = 'stylesheet';
// https://ace.c9.io/build/kitchen-sink.html
// https://highlightjs.org/static/demo/
link.href = 'highlight/styles/' + options.codeTheme;
document.getElementById('hlScriptContainer').appendChild(link);
}
function loadAndApplyHljs(options) {
var codeElements = document.getElementsByClassName('code');
if (!codeElements.length) return;
if (!hljsScriptAdded) {
this.loadHljs(options);
return;
}
// If HLJS is not loaded yet, no need to do anything. When it loads
// it will automatically apply the style to all the code elements.
if (hljsLoaded) applyHljs(codeElements);
}
function applyHljs(codeElements) {
if (typeof codeElements === 'undefined') codeElements = document.getElementsByClassName('code');
for (var i = 0; i < codeElements.length; i++) {
try {
hljs.highlightBlock(codeElements[i]);
} catch (error) {
console.warn('Cannot highlight code', error);
}
const loadedCssFiles_ = {};
function loadCssFiles(cssFiles) {
for (let i = 0; i < cssFiles.length; i++) {
const f = cssFiles[i];
if (loadedCssFiles_[f]) continue;
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = f;
document.getElementById('styleContainer').appendChild(link);
}
}
// ----------------------------------------------------------------------
// / Handle dynamically loading HLJS when a code element is present
// ----------------------------------------------------------------------
// Note: the scroll position source of truth is "percentScroll_". This is easier to manage than scrollTop because
// the scrollTop value depends on the images being loaded or not. For example, if the scrollTop is saved while
// images are being displayed then restored while images are being reloaded, the new scrollTop might be changed
@@ -142,23 +95,6 @@
setPercentScroll(percentScroll_);
}
const loadedScripts_ = {};
function lazyLoadScript(url, containerId, onReady) {
if (loadedScripts_[url]) {
onReady();
return;
}
console.info('Loading script: ' + url);
const script = document.createElement('script');
script.onload = onReady;
script.src = url;
document.getElementById(containerId).appendChild(script);
loadedScripts_[url] = url;
}
ipc.setHtml = (event) => {
const html = event.html;
@@ -168,21 +104,6 @@
contentElement.innerHTML = html;
loadAndApplyHljs(event.options);
// Remove the bullet from "ul" for checkbox lists and extra padding
// const checkboxes = document.getElementsByClassName('checkbox');
// for (let i = 0; i < checkboxes.length; i++) {
// const cb = checkboxes[i];
// const ul = cb.parentElement.parentElement;
// if (!ul) {
// console.warn('Unexpected layout for checkbox');
// continue;
// }
// ul.style.listStyleType = 'none';
// ul.style.paddingLeft = 0;
// }
let previousContentHeight = contentElement.scrollHeight;
let startTime = Date.now();
ignoreNextScrollEvent = true;
@@ -203,11 +124,7 @@
}, 1);
}
if (document.getElementsByClassName('mermaid').length) {
lazyLoadScript('../../node_modules/mermaid/dist/mermaid.min.js', 'mermaidScriptContainer', () => {
mermaid.init();
});
}
loadCssFiles(event.options.cssFiles);
}
let ignoreNextScrollEvent = false;
@@ -371,49 +288,8 @@
}
});
function handleInternalLink(event, anchorNode) {
const href = anchorNode.getAttribute('href');
if (href.indexOf('#') === 0) {
event.preventDefault();
location.hash = href;
return true;
}
return false;
}
function getParentAnchorElement(element) {
let counter = 0;
while (true) {
if (counter++ >= 10000) {
console.warn('been looping for too long - exiting')
return null;
}
if (!element) return null;
if (element.nodeName === 'A') return element;
element = element.parentElement;
}
}
document.addEventListener('click', function(event) {
const anchor = getParentAnchorElement(event.target);
if (!anchor) return;
// Prevent URLs added via <a> tags from being opened within the application itself
// otherwise it would open the whole website within the WebView.
if (!anchor.hasAttribute('data-from-md')) {
if (handleInternalLink(event, anchor)) return;
event.preventDefault();
ipcProxySendToHost(anchor.getAttribute('href'));
return;
}
// If this is an internal link, jump to the anchor directly
if (anchor.hasAttribute('data-from-md')) {
if (handleInternalLink(event, anchor)) return;
}
webviewLib.initialize({
postMessage: ipcProxySendToHost,
});
// Disable drag and drop otherwise it's possible to drop a URL

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,6 @@
var locales = {};
locales['en_GB'] = require('./en_GB.json');
locales['ar'] = require('./ar.json');
locales['ca'] = require('./ca.json');
locales['cs_CZ'] = require('./cs_CZ.json');
locales['da_DK'] = require('./da_DK.json');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "Joplin",
"version": "1.0.128",
"version": "1.0.140",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -29,9 +29,9 @@
"optional": true
},
"@types/node": {
"version": "10.12.26",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.26.tgz",
"integrity": "sha512-nMRqS+mL1TOnIJrL6LKJcNZPB8V3eTfRo9FQA2b5gDvrHurC8XbSA86KNe0dShlEL7ReWJv/OU9NL7Z0dnqWTg==",
"version": "10.12.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.27.tgz",
"integrity": "sha512-e9wgeY6gaY21on3ve0xAjgBVjGDWq/xUteK0ujsE53bUoxycMkqfnkUgMt6ffZtykZ5X12Mg3T7Pw4TRCObDKg==",
"dev": true
},
"abab": {
@@ -1418,7 +1418,8 @@
"commander": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
"integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ=="
"integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
"dev": true
},
"compare-version": {
"version": "0.1.2",
@@ -1561,288 +1562,6 @@
"resolved": "https://registry.npmjs.org/currify/-/currify-2.0.6.tgz",
"integrity": "sha512-F0lbcoBkA2FMcejFeHJkDEhQ1AvVkTpkn9PMzJch+7mHy5WdteZ9t+nhT6cOdga4uRay3rjvprgp8tUkixFy8w=="
},
"d3": {
"version": "5.9.1",
"resolved": "https://registry.npmjs.org/d3/-/d3-5.9.1.tgz",
"integrity": "sha512-JceuBn5VVWySPQc9EA0gfq0xQVgEQXGokHhe+359bmgGeUITLK2r2b9idMzquQne9DKxb7JDCE1gDRXe9OIF2Q==",
"requires": {
"d3-array": "1",
"d3-axis": "1",
"d3-brush": "1",
"d3-chord": "1",
"d3-collection": "1",
"d3-color": "1",
"d3-contour": "1",
"d3-dispatch": "1",
"d3-drag": "1",
"d3-dsv": "1",
"d3-ease": "1",
"d3-fetch": "1",
"d3-force": "1",
"d3-format": "1",
"d3-geo": "1",
"d3-hierarchy": "1",
"d3-interpolate": "1",
"d3-path": "1",
"d3-polygon": "1",
"d3-quadtree": "1",
"d3-random": "1",
"d3-scale": "2",
"d3-scale-chromatic": "1",
"d3-selection": "1",
"d3-shape": "1",
"d3-time": "1",
"d3-time-format": "2",
"d3-timer": "1",
"d3-transition": "1",
"d3-voronoi": "1",
"d3-zoom": "1"
}
},
"d3-array": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.4.tgz",
"integrity": "sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw=="
},
"d3-axis": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-1.0.12.tgz",
"integrity": "sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ=="
},
"d3-brush": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-1.0.6.tgz",
"integrity": "sha512-lGSiF5SoSqO5/mYGD5FAeGKKS62JdA1EV7HPrU2b5rTX4qEJJtpjaGLJngjnkewQy7UnGstnFd3168wpf5z76w==",
"requires": {
"d3-dispatch": "1",
"d3-drag": "1",
"d3-interpolate": "1",
"d3-selection": "1",
"d3-transition": "1"
}
},
"d3-chord": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-1.0.6.tgz",
"integrity": "sha512-JXA2Dro1Fxw9rJe33Uv+Ckr5IrAa74TlfDEhE/jfLOaXegMQFQTAgAw9WnZL8+HxVBRXaRGCkrNU7pJeylRIuA==",
"requires": {
"d3-array": "1",
"d3-path": "1"
}
},
"d3-collection": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.7.tgz",
"integrity": "sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A=="
},
"d3-color": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.2.3.tgz",
"integrity": "sha512-x37qq3ChOTLd26hnps36lexMRhNXEtVxZ4B25rL0DVdDsGQIJGB18S7y9XDwlDD6MD/ZBzITCf4JjGMM10TZkw=="
},
"d3-contour": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-1.3.2.tgz",
"integrity": "sha512-hoPp4K/rJCu0ladiH6zmJUEz6+u3lgR+GSm/QdM2BBvDraU39Vr7YdDCicJcxP1z8i9B/2dJLgDC1NcvlF8WCg==",
"requires": {
"d3-array": "^1.1.1"
}
},
"d3-dispatch": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.5.tgz",
"integrity": "sha512-vwKx+lAqB1UuCeklr6Jh1bvC4SZgbSqbkGBLClItFBIYH4vqDJCA7qfoy14lXmJdnBOdxndAMxjCbImJYW7e6g=="
},
"d3-drag": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-1.2.3.tgz",
"integrity": "sha512-8S3HWCAg+ilzjJsNtWW1Mutl74Nmzhb9yU6igspilaJzeZVFktmY6oO9xOh5TDk+BM2KrNFjttZNoJJmDnkjkg==",
"requires": {
"d3-dispatch": "1",
"d3-selection": "1"
}
},
"d3-dsv": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-1.1.1.tgz",
"integrity": "sha512-1EH1oRGSkeDUlDRbhsFytAXU6cAmXFzc52YUe6MRlPClmWb85MP1J5x+YJRzya4ynZWnbELdSAvATFW/MbxaXw==",
"requires": {
"commander": "2",
"iconv-lite": "0.4",
"rw": "1"
}
},
"d3-ease": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.5.tgz",
"integrity": "sha512-Ct1O//ly5y5lFM9YTdu+ygq7LleSgSE4oj7vUt9tPLHUi8VCV7QoizGpdWRWAwCO9LdYzIrQDg97+hGVdsSGPQ=="
},
"d3-fetch": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-1.1.2.tgz",
"integrity": "sha512-S2loaQCV/ZeyTyIF2oP8D1K9Z4QizUzW7cWeAOAS4U88qOt3Ucf6GsmgthuYSdyB2HyEm4CeGvkQxWsmInsIVA==",
"requires": {
"d3-dsv": "1"
}
},
"d3-force": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.2.0.tgz",
"integrity": "sha512-PFLcDnRVANHMudbQlIB87gcfQorEsDIAvRpZ2bNddfM/WxdsEkyrEaOIPoydhH1I1V4HPjNLGOMLXCA0AuGQ9w==",
"requires": {
"d3-collection": "1",
"d3-dispatch": "1",
"d3-quadtree": "1",
"d3-timer": "1"
}
},
"d3-format": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.3.2.tgz",
"integrity": "sha512-Z18Dprj96ExragQ0DeGi+SYPQ7pPfRMtUXtsg/ChVIKNBCzjO8XYJvRTC1usblx52lqge56V5ect+frYTQc8WQ=="
},
"d3-geo": {
"version": "1.11.3",
"resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-1.11.3.tgz",
"integrity": "sha512-n30yN9qSKREvV2fxcrhmHUdXP9TNH7ZZj3C/qnaoU0cVf/Ea85+yT7HY7i8ySPwkwjCNYtmKqQFTvLFngfkItQ==",
"requires": {
"d3-array": "1"
}
},
"d3-hierarchy": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-1.1.8.tgz",
"integrity": "sha512-L+GHMSZNwTpiq4rt9GEsNcpLa4M96lXMR8M/nMG9p5hBE0jy6C+3hWtyZMenPQdwla249iJy7Nx0uKt3n+u9+w=="
},
"d3-interpolate": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.3.2.tgz",
"integrity": "sha512-NlNKGopqaz9qM1PXh9gBF1KSCVh+jSFErrSlD/4hybwoNX/gt1d8CDbDW+3i+5UOHhjC6s6nMvRxcuoMVNgL2w==",
"requires": {
"d3-color": "1"
}
},
"d3-path": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.7.tgz",
"integrity": "sha512-q0cW1RpvA5c5ma2rch62mX8AYaiLX0+bdaSM2wxSU9tXjU4DNvkx9qiUvjkuWCj3p22UO/hlPivujqMiR9PDzA=="
},
"d3-polygon": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-1.0.5.tgz",
"integrity": "sha512-RHhh1ZUJZfhgoqzWWuRhzQJvO7LavchhitSTHGu9oj6uuLFzYZVeBzaWTQ2qSO6bz2w55RMoOCf0MsLCDB6e0w=="
},
"d3-quadtree": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.6.tgz",
"integrity": "sha512-NUgeo9G+ENQCQ1LsRr2qJg3MQ4DJvxcDNCiohdJGHt5gRhBW6orIB5m5FJ9kK3HNL8g9F4ERVoBzcEwQBfXWVA=="
},
"d3-random": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/d3-random/-/d3-random-1.1.2.tgz",
"integrity": "sha512-6AK5BNpIFqP+cx/sreKzNjWbwZQCSUatxq+pPRmFIQaWuoD+NrbVWw7YWpHiXpCQ/NanKdtGDuB+VQcZDaEmYQ=="
},
"d3-scale": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-2.2.2.tgz",
"integrity": "sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw==",
"requires": {
"d3-array": "^1.2.0",
"d3-collection": "1",
"d3-format": "1",
"d3-interpolate": "1",
"d3-time": "1",
"d3-time-format": "2"
}
},
"d3-scale-chromatic": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-1.3.3.tgz",
"integrity": "sha512-BWTipif1CimXcYfT02LKjAyItX5gKiwxuPRgr4xM58JwlLocWbjPLI7aMEjkcoOQXMkYsmNsvv3d2yl/OKuHHw==",
"requires": {
"d3-color": "1",
"d3-interpolate": "1"
}
},
"d3-selection": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.4.0.tgz",
"integrity": "sha512-EYVwBxQGEjLCKF2pJ4+yrErskDnz5v403qvAid96cNdCMr8rmCYfY5RGzWz24mdIbxmDf6/4EAH+K9xperD5jg=="
},
"d3-shape": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.4.tgz",
"integrity": "sha512-izaz4fOpOnY3CD17hkZWNxbaN70sIGagLR/5jb6RS96Y+6VqX+q1BQf1av6QSBRdfULi3Gb8Js4CzG4+KAPjMg==",
"requires": {
"d3-path": "1"
}
},
"d3-time": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/d3-time/-/d3-time-1.0.11.tgz",
"integrity": "sha512-Z3wpvhPLW4vEScGeIMUckDW7+3hWKOQfAWg/U7PlWBnQmeKQ00gCUsTtWSYulrKNA7ta8hJ+xXc6MHrMuITwEw=="
},
"d3-time-format": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.1.3.tgz",
"integrity": "sha512-6k0a2rZryzGm5Ihx+aFMuO1GgelgIz+7HhB4PH4OEndD5q2zGn1mDfRdNrulspOfR6JXkb2sThhDK41CSK85QA==",
"requires": {
"d3-time": "1"
}
},
"d3-timer": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.9.tgz",
"integrity": "sha512-rT34J5HnQUHhcLvhSB9GjCkN0Ddd5Y8nCwDBG2u6wQEeYxT/Lf51fTFFkldeib/sE/J0clIe0pnCfs6g/lRbyg=="
},
"d3-transition": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.2.0.tgz",
"integrity": "sha512-VJ7cmX/FPIPJYuaL2r1o1EMHLttvoIuZhhuAlRoOxDzogV8iQS6jYulDm3xEU3TqL80IZIhI551/ebmCMrkvhw==",
"requires": {
"d3-color": "1",
"d3-dispatch": "1",
"d3-ease": "1",
"d3-interpolate": "1",
"d3-selection": "^1.1.0",
"d3-timer": "1"
}
},
"d3-voronoi": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.4.tgz",
"integrity": "sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg=="
},
"d3-zoom": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-1.7.3.tgz",
"integrity": "sha512-xEBSwFx5Z9T3/VrwDkMt+mr0HCzv7XjpGURJ8lWmIC8wxe32L39eWHIasEe/e7Ox8MPU4p1hvH8PKN2olLzIBg==",
"requires": {
"d3-dispatch": "1",
"d3-drag": "1",
"d3-interpolate": "1",
"d3-selection": "1",
"d3-transition": "1"
}
},
"dagre-d3-renderer": {
"version": "0.5.8",
"resolved": "https://registry.npmjs.org/dagre-d3-renderer/-/dagre-d3-renderer-0.5.8.tgz",
"integrity": "sha512-XH2a86isUHRxzIYbjQVEuZtJnWEufb64H5DuXIUmn8esuB40jgLEbUUclulWOW62/ZoXlj2ZDyL8SJ+YRxs+jQ==",
"requires": {
"dagre-layout": "^0.8.8",
"lodash": "^4.17.5"
}
},
"dagre-layout": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/dagre-layout/-/dagre-layout-0.8.8.tgz",
"integrity": "sha512-ZNV15T9za7X+fV8Z07IZquUKugCxm5owoiPPxfEx6OJRD331nkiIaF3vSt0JEY5FkrY0KfRQxcpQ3SpXB7pLPQ==",
"requires": {
"graphlibrary": "^2.2.0",
"lodash": "^4.17.5"
}
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
@@ -2070,9 +1789,9 @@
"dev": true
},
"electron": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/electron/-/electron-4.0.4.tgz",
"integrity": "sha512-zG5VtLrmPfmw1fXY/3BEtRZk7OZ7djQhweZ6rW+R5NeF6s8RTz/AwTGtLoBo4z8wmJ5QTy0Y941FZw4pe5YlpA==",
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/electron/-/electron-4.0.5.tgz",
"integrity": "sha512-UWFH6SrzNtzfvusGUFYxXDrgsUEbtBXkH/66hpDWxjA2Ckt7ozcYIujZpshbr7LPy8kV3ZRxIvoyCMdaS5DkVQ==",
"dev": true,
"requires": {
"@types/node": "^10.12.18",
@@ -2391,9 +2110,9 @@
"dev": true
},
"error-ex": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
"integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
"dev": true,
"requires": {
"is-arrayish": "^0.2.1"
@@ -2415,11 +2134,6 @@
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"escaper": {
"version": "2.5.3",
"resolved": "https://registry.npmjs.org/escaper/-/escaper-2.5.3.tgz",
"integrity": "sha512-QGb9sFxBVpbzMggrKTX0ry1oiI4CSDAl9vIL702hzl1jGW8VZs7qfqTRX7WDOjoNDoEVGcEtu1ZOQgReSfT2kQ=="
},
"escodegen": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz",
@@ -3553,14 +3267,6 @@
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
},
"graphlibrary": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/graphlibrary/-/graphlibrary-2.2.0.tgz",
"integrity": "sha512-XTcvT55L8u4MBZrM37zXoUxsgxs/7sow7YSygd9CIwfWTVO8RVu7AYXhhCiTuFEf+APKgx6Jk4SuQbYR0vYKmQ==",
"requires": {
"lodash": "^4.17.5"
}
},
"growly": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz",
@@ -3647,15 +3353,10 @@
}
}
},
"he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
},
"highlight.js": {
"version": "9.12.0",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz",
"integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4="
"version": "9.15.6",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.6.tgz",
"integrity": "sha512-zozTAWM1D6sozHo8kqhfYgsac+B+q0PmsjXeyDrYIHHcBN0zTVT66+s2GW1GZv7DbyaROdLXKdabwS/WqPyIdQ=="
},
"hoist-non-react-statics": {
"version": "2.5.0",
@@ -4027,11 +3728,6 @@
"integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=",
"dev": true
},
"is-regexp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
"integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk="
},
"is-retry-allowed": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz",
@@ -4563,33 +4259,6 @@
}
}
},
"mermaid": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-8.0.0.tgz",
"integrity": "sha512-vUQRykev0A6RtxIVqQT3a9TDxcSbdZbQF5JDyKgidnYuJy8BE8jp6LM+HKDSQuroKm6buu4NlpMO+qhxIP/cTg==",
"requires": {
"d3": "^5.7.0",
"dagre-d3-renderer": "^0.5.8",
"dagre-layout": "^0.8.8",
"graphlibrary": "^2.2.0",
"he": "^1.2.0",
"lodash": "^4.17.11",
"moment": "^2.23.0",
"scope-css": "^1.2.1"
},
"dependencies": {
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
"moment": {
"version": "2.24.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
}
}
},
"micromatch": {
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
@@ -5993,11 +5662,6 @@
}
}
},
"rw": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",
"integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q="
},
"rxjs": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz",
@@ -6039,16 +5703,6 @@
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"scope-css": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/scope-css/-/scope-css-1.2.1.tgz",
"integrity": "sha512-UjLRmyEYaDNiOS673xlVkZFlVCtckJR/dKgr434VMm7Lb+AOOqXKdAcY7PpGlJYErjXXJzKN7HWo4uRPiZZG0Q==",
"requires": {
"escaper": "^2.5.3",
"slugify": "^1.3.1",
"strip-css-comments": "^3.0.0"
}
},
"semver": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
@@ -6149,11 +5803,6 @@
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
"dev": true
},
"slugify": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.4.tgz",
"integrity": "sha512-KP0ZYk5hJNBS8/eIjGkFDCzGQIoZ1mnfQRYS5WM3273z+fxGWXeN0fkwf2ebEweydv9tioZIHGZKoF21U07/nw=="
},
"smalltalk": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/smalltalk/-/smalltalk-2.5.1.tgz",
@@ -6485,14 +6134,6 @@
"is-utf8": "^0.2.0"
}
},
"strip-css-comments": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-css-comments/-/strip-css-comments-3.0.0.tgz",
"integrity": "sha1-elYl7/iisibPiUehElTaluE9rok=",
"requires": {
"is-regexp": "^1.0.0"
}
},
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",

View File

@@ -1,14 +1,14 @@
{
"name": "Joplin",
"version": "1.0.128",
"version": "1.0.140",
"description": "Joplin for Desktop",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"pack": "node_modules/.bin/electron-builder --dir",
"dist": "node_modules/.bin/electron-rebuild && node_modules/.bin/electron-builder",
"dist": "node_modules/.bin/electron-builder",
"publish": "build -p always",
"postinstall": "node compile.js && node compile-package-info.js && node ../../Tools/copycss.js --copy-fonts && install-app-deps",
"postinstall": "node compile.js && node compile-package-info.js && node ../../Tools/copycss.js --copy-fonts && node electronRebuild.js",
"compile": "node compile.js && node compile-package-info.js && node ../../Tools/copycss.js --copy-fonts"
},
"repository": {
@@ -22,10 +22,12 @@
},
"build": {
"appId": "net.cozic.joplin-desktop",
"npmRebuild": false,
"extraResources": [
"build/icons/*"
],
"win": {
"rfc3161TimeStampServer": "http://sha256timestamp.ws.symantec.com/sha256/timestamp",
"icon": "../../Assets/Joplin.ico",
"target": [
{
@@ -70,7 +72,7 @@
"app-builder-bin": "^1.9.11",
"babel-cli": "^6.26.0",
"babel-preset-react": "^6.24.1",
"electron": "^4.0.4",
"electron": "4.0.5",
"electron-builder": "20.38.5",
"electron-rebuild": "^1.8.4"
},
@@ -94,7 +96,7 @@
"form-data": "^2.3.2",
"formatcoords": "^1.1.3",
"fs-extra": "^5.0.0",
"highlight.js": "^9.12.0",
"highlight.js": "^9.15.6",
"html-entities": "^1.2.1",
"image-type": "^3.0.0",
"joplin-turndown": "^4.0.11",
@@ -107,7 +109,6 @@
"markdown-it": "^8.4.1",
"markdown-it-katex": "^2.0.3",
"md5": "^2.2.1",
"mermaid": "^8.0.0",
"mime": "^2.3.1",
"moment": "^2.22.2",
"multiparty": "^4.2.1",

View File

@@ -59,14 +59,6 @@ table td, table th {
background-color: rgba(0,160,255,0.1) !important;
}
input::-webkit-calendar-picker-indicator {
background-color: rgba(0, 0, 0, 0);
}
input::-webkit-calendar-picker-indicator:hover {
background-color: rgba(100, 100, 100, 0.2);
}
/*.side-bar .list-item:hover,
.side-bar .synchronize-button:hover {
background-color: #01427B;

View File

@@ -70,7 +70,6 @@ const lightStyle = {
dividerColor: "#dddddd",
selectedColor: '#e5e5e5',
urlColor: '#155BDA',
removeColor: '#B01C2E',
backgroundColor2: "#162B3D",
color2: "#ffffff",
@@ -107,7 +106,6 @@ const darkStyle = {
dividerColor: '#555555',
selectedColor: '#333333',
urlColor: '#4E87EE',
removeColor: '#B01C2E',
backgroundColor2: "#181A1D",
color2: "#ffffff",
@@ -144,7 +142,6 @@ function addExtraStyles(style) {
paddingRight: style.tagItemPadding * 2,
paddingLeft: style.tagItemPadding * 2,
backgroundColor: style.raisedBackgroundColor,
borderRadius: '10%',
color: style.raisedColor,
};

View File

@@ -1,11 +0,0 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"diacritics": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/diacritics/-/diacritics-1.3.0.tgz",
"integrity": "sha1-PvqHMj67hj5mls67AILUj/PW96E="
}
}
}

View File

@@ -1,17 +0,0 @@
#!/bin/bash
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APP_DIR="$ROOT_DIR/app"
cd "$APP_DIR"
VERSION="$(npm version patch)"
git add -A
git commit -m "Electron release $VERSION"
git tag $VERSION
git push && git push --tags
echo ""
echo "Create a draft release at: https://github.com/laurent22/joplin/releases/tag/$VERSION"
echo ""
echo "Then run:"
echo ""
echo "git pull && node $APP_DIR/update-readme-download.js && git add -A && git commit -m 'Update website' && git push && git push --tags"

View File

@@ -8,7 +8,7 @@ echo "| |_| | (_) | |_) | | | | | |"
echo " \___/ \___/| .__/|_|_|_| |_|"
echo " |_|"
echo ""
echo "Linux installer and Updater"
echo "Linux Installer and Updater"
#-----------------------------------------------------
# Variables
@@ -33,9 +33,9 @@ fi
version=$(curl --silent "https://api.github.com/repos/laurent22/joplin/releases/latest" | grep -Po '"tag_name": "v\K.*?(?=")')
# Check if it's in the latest version
if [[ $(< ~/.joplin/VERSION) != "$version" ]]; then
if [[ ! -e ~/.joplin/VERSION ]] || [[ $(< ~/.joplin/VERSION) != "$version" ]]; then
echo 'Download Joplin.'
echo 'Downloading Joplin...'
# Delete previous version
rm -f ~/.joplin/*.AppImage ~/.local/share/applications/joplin.desktop ~/.joplin/VERSION
@@ -43,7 +43,7 @@ if [[ $(< ~/.joplin/VERSION) != "$version" ]]; then
mkdir -p ~/.joplin/
# Download the latest version
wget -nv -O ~/.joplin/Joplin.AppImage https://github.com/laurent22/joplin/releases/download/v$version/Joplin-$version-x86_64.AppImage
wget -nv --show-progress -O ~/.joplin/Joplin.AppImage https://github.com/laurent22/joplin/releases/download/v$version/Joplin-$version-x86_64.AppImage
# Gives execution privileges
chmod +x ~/.joplin/Joplin.AppImage
@@ -55,7 +55,7 @@ if [[ $(< ~/.joplin/VERSION) != "$version" ]]; then
#-----------------------------------------------------
# Download icon
echo 'Download icon.'
echo 'Downloading icon...'
wget -nv -O ~/.joplin/Icon512.png https://joplin.cozic.net/images/Icon512.png
echo "${COLOR_GREEN}OK${COLOR_RESET}"
@@ -70,22 +70,24 @@ if [[ $(< ~/.joplin/VERSION) != "$version" ]]; then
# Create icon for Gnome
echo 'Create Desktop icon.'
if [[ $desktop =~ .*gnome.* ]] || [[ $desktop =~ .*kde.* ]]
if [[ $desktop =~ .*gnome.*|.*kde.*|.*xfce.*|.*mate.* ]]
then
echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Joplin\nExec=/home/$USER/.joplin/Joplin.AppImage\nIcon=/home/$USER/.joplin/Icon512.png\nType=Application\nCategories=Application;" >> ~/.local/share/applications/joplin.desktop
echo "${COLOR_GREEN}OK${COLOR_RESET}"
else
echo "${COLOR_RED}NOT DONE${COLOR_RESET}"
fi
echo "${COLOR_GREEN}OK${COLOR_RESET}"
#-----------------------------------------------------
# Finish
#-----------------------------------------------------
# Informs the user that it has been installed and cleans variables
echo "${COLOR_GREEN}Joplin installed in the version${COLOR_RESET}" $version
echo "${COLOR_GREEN}Joplin version${COLOR_RESET}" $version "${COLOR_GREEN}installed.${COLOR_RESET}"
# Add version
echo $version > ~/.joplin/VERSION
else
echo "${COLOR_GREEN}You are now in the latest version.${COLOR_RESET}"
echo "${COLOR_GREEN}You already have the latest version${COLOR_RESET}" $version "${COLOR_GREEN}installed.${COLOR_RESET}"
fi
echo 'Bye!'
unset version

View File

@@ -20,9 +20,9 @@ Three types of applications are available: for the **desktop** (Windows, macOS a
Operating System | Download | Alternative
-----------------|--------|-------------------
Windows (32 and 64-bit) | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.127/Joplin-Setup-1.0.127.exe'><img alt='Get it on Windows' height="40px" src='https://joplin.cozic.net/images/BadgeWindows.png'/></a> | or Get the <a href='https://github.com/laurent22/joplin/releases/download/v1.0.127/JoplinPortable.exe'>Portable version</a><br>(to run from a USB key, etc.)
macOS | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.127/Joplin-1.0.127.dmg'><img alt='Get it on macOS' height="40px" src='https://joplin.cozic.net/images/BadgeMacOS.png'/></a> |
Linux | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.127/Joplin-1.0.127-x86_64.AppImage'><img alt='Get it on Linux' height="40px" src='https://joplin.cozic.net/images/BadgeLinux.png'/></a> | An Arch Linux package<br>[is also available](#terminal-application).
Windows (32 and 64-bit) | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.135/Joplin-Setup-1.0.135.exe'><img alt='Get it on Windows' height="40px" src='https://joplin.cozic.net/images/BadgeWindows.png'/></a> | or Get the <a href='https://github.com/laurent22/joplin/releases/download/v1.0.135/JoplinPortable.exe'>Portable version</a><br>(to run from a USB key, etc.)
macOS | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.135/Joplin-1.0.135.dmg'><img alt='Get it on macOS' height="40px" src='https://joplin.cozic.net/images/BadgeMacOS.png'/></a> |
Linux | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.135/Joplin-1.0.135-x86_64.AppImage'><img alt='Get it on Linux' height="40px" src='https://joplin.cozic.net/images/BadgeLinux.png'/></a> | An Arch Linux package<br>[is also available](#terminal-application).
The [portable application](https://en.wikipedia.org/wiki/Portable_application) allows installing the software on a portable device such as a USB key. Simply copy the file JoplinPortable.exe in any directory on that USB key ; the application will then create a directory called "JoplinProfile" next to the executable file.
@@ -36,7 +36,7 @@ wget -O - https://raw.githubusercontent.com/laurent22/joplin/master/Joplin_insta
Operating System | Download | Alt. Download
-----------------|----------|----------------
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://joplin.cozic.net/images/BadgeAndroid.png'/></a> | or [Download APK File](https://github.com/laurent22/joplin-android/releases/download/android-v1.0.237/joplin-v1.0.237.apk)
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://joplin.cozic.net/images/BadgeAndroid.png'/></a> | or [Download APK File](https://github.com/laurent22/joplin-android/releases/download/android-v1.0.241/joplin-v1.0.241.apk)
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://joplin.cozic.net/images/BadgeIOS.png'/></a> | -
## Terminal application
@@ -251,6 +251,24 @@ You can create a link to a note by specifying its ID in the URL. For example:
Since getting the ID of a note is not straightforward, each app provides a way to create such link. In the **desktop app**, right click on a note an select "Copy Markdown link". In the **mobile app**, open a note and, in the top right menu, select "Copy Markdown link". You can then paste this link anywhere in another note.
## Charts
You can create charts in Joplin using the [Mermaid syntax](https://mermaidjs.github.io/). To add such a graph, wrap the Mermaid script inside a "\`\`\`mermaid" code block like this:
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
This is how it would look with the Markdown on the left, and rendered graph on the right:
<img src="https://joplin.cozic.net/images/Mermaid.png" height="232px">
Note that Mermaid graphs are always rendered on a white background regardless of the current theme. This is because they can contain various colours that may not be compatible with the current theme.
## Math notation
Math expressions can be added using the [KaTeX notation](https://khan.github.io/KaTeX/). To add an inline equation, wrap the expression in `$EXPRESSION$`, eg. `$\sqrt{3x-1}+(1+x)^2$`. To create an expression block, wrap it as follow:
@@ -269,7 +287,7 @@ For example:
Here is an example with the Markdown and rendered result side by side:
<img src="https://joplin.cozic.net/images/Katex.png" style="max-width: 100%; max-height: 35em;">
<img src="https://joplin.cozic.net/images/Katex.png" height="400px">
## Checkboxes
@@ -340,30 +358,31 @@ Current translations:
<!-- LOCALE-TABLE-AUTO-GENERATED -->
&nbsp; | Language | Po File | Last translator | Percent done
---|---|---|---|---
![](https://joplin.cozic.net/images/flags/country-4x3/.png) | Arabic | [ar](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ar.po) | عبد الناصر سعيد (as@althobaity.com) | 73%
![](https://joplin.cozic.net/images/flags/es/basque_country.png) | Basque | [eu](https://github.com/laurent22/joplin/blob/master/CliClient/locales/eu.po) | juan.abasolo@ehu.eus | 56%
![](https://joplin.cozic.net/images/flags/es/catalonia.png) | Catalan | [ca](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ca.po) | jmontane, 2018 | 80%
![](https://joplin.cozic.net/images/flags/country-4x3/hr.png) | Croatian | [hr_HR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/hr_HR.po) | Hrvoje Mandić (trbuhom@net.hr) | 45%
![](https://joplin.cozic.net/images/flags/country-4x3/cz.png) | Czech | [cs_CZ](https://github.com/laurent22/joplin/blob/master/CliClient/locales/cs_CZ.po) | Lukas Helebrandt (lukas@aiya.cz) | 71%
![](https://joplin.cozic.net/images/flags/country-4x3/dk.png) | Dansk | [da_DK](https://github.com/laurent22/joplin/blob/master/CliClient/locales/da_DK.po) | Morten Juhl-Johansen Zölde-Fejér (mjjzf@syntaktisk. | 72%
![](https://joplin.cozic.net/images/flags/country-4x3/de.png) | Deutsch | [de_DE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/de_DE.po) | Michael Sonntag (ms@editorei.de) | 98%
![](https://joplin.cozic.net/images/flags/country-4x3/de.png) | Deutsch | [de_DE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/de_DE.po) | Michael Sonntag (ms@editorei.de) | 100%
![](https://joplin.cozic.net/images/flags/country-4x3/gb.png) | English | [en_GB](https://github.com/laurent22/joplin/blob/master/CliClient/locales/en_GB.po) | | 100%
![](https://joplin.cozic.net/images/flags/country-4x3/es.png) | Español | [es_ES](https://github.com/laurent22/joplin/blob/master/CliClient/locales/es_ES.po) | Fernando Martín (f@mrtn.es) | 88%
![](https://joplin.cozic.net/images/flags/country-4x3/es.png) | Español | [es_ES](https://github.com/laurent22/joplin/blob/master/CliClient/locales/es_ES.po) | Andros Fenollosa (andros@fenollosa.email) | 99%
![](https://joplin.cozic.net/images/flags/country-4x3/fr.png) | Français | [fr_FR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/fr_FR.po) | Laurent Cozic | 100%
![](https://joplin.cozic.net/images/flags/es/galicia.png) | Galician | [gl_ES](https://github.com/laurent22/joplin/blob/master/CliClient/locales/gl_ES.po) | Marcos Lans (marcoslansgarza@gmail.com) | 71%
![](https://joplin.cozic.net/images/flags/country-4x3/it.png) | Italiano | [it_IT](https://github.com/laurent22/joplin/blob/master/CliClient/locales/it_IT.po) | | 89%
![](https://joplin.cozic.net/images/flags/country-4x3/it.png) | Italiano | [it_IT](https://github.com/laurent22/joplin/blob/master/CliClient/locales/it_IT.po) | | 88%
![](https://joplin.cozic.net/images/flags/country-4x3/be.png) | Nederlands | [nl_BE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nl_BE.po) | | 56%
![](https://joplin.cozic.net/images/flags/country-4x3/nl.png) | Nederlands | [nl_NL](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nl_NL.po) | Heimen Stoffels (vistausss@outlook.com) | 86%
![](https://joplin.cozic.net/images/flags/country-4x3/no.png) | Norwegian | [nb_NO](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nb_NO.po) | Mats Estensen (code@mxe.no) | 94%
![](https://joplin.cozic.net/images/flags/country-4x3/no.png) | Norwegian | [nb_NO](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nb_NO.po) | Mats Estensen (code@mxe.no) | 93%
![](https://joplin.cozic.net/images/flags/country-4x3/br.png) | Português (Brasil) | [pt_BR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/pt_BR.po) | Renato Nunes Bastos (rnbastos@gmail.com) | 93%
![](https://joplin.cozic.net/images/flags/country-4x3/ro.png) | Română | [ro](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ro.po) | | 56%
![](https://joplin.cozic.net/images/flags/country-4x3/si.png) | Slovenian | [sl_SI](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sl_SI.po) | | 70%
![](https://joplin.cozic.net/images/flags/country-4x3/se.png) | Svenska | [sv](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sv.po) | Jonatan Nyberg (jonatan@autistici.org) | 96%
![](https://joplin.cozic.net/images/flags/country-4x3/tr.png) | Türkçe | [tr_TR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/tr_TR.po) | Zorbey Doğangüneş (zorbeyd@gmail.com) | 93%
![](https://joplin.cozic.net/images/flags/country-4x3/ru.png) | Русский | [ru_RU](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ru_RU.po) | Artyom Karlov (artyom.karlov@gmail.com) | 98%
![](https://joplin.cozic.net/images/flags/country-4x3/cn.png) | 中文 (简体) | [zh_CN](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_CN.po) | | 97%
![](https://joplin.cozic.net/images/flags/country-4x3/ru.png) | Русский | [ru_RU](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ru_RU.po) | Artyom Karlov (artyom.karlov@gmail.com) | 97%
![](https://joplin.cozic.net/images/flags/country-4x3/cn.png) | 中文 (简体) | [zh_CN](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_CN.po) | | 100%
![](https://joplin.cozic.net/images/flags/country-4x3/tw.png) | 中文 (繁體) | [zh_TW](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_TW.po) | penguinsam (samliu@gmail.com) | 86%
![](https://joplin.cozic.net/images/flags/country-4x3/jp.png) | 日本語 | [ja_JP](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ja_JP.po) | AWASHIRO Ikuya (ikunya@gmail.com) | 93%
![](https://joplin.cozic.net/images/flags/country-4x3/kr.png) | 한국말 | [ko](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ko.po) | | 95%
![](https://joplin.cozic.net/images/flags/country-4x3/kr.png) | 한국말 | [ko](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ko.po) | | 94%
<!-- LOCALE-TABLE-AUTO-GENERATED -->
# Known bugs

View File

@@ -90,8 +90,8 @@ android {
applicationId "net.cozic.joplin"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2097473
versionName "1.0.237"
versionCode 2097477
versionName "1.0.241"
ndk {
abiFilters "armeabi-v7a", "x86"
}

View File

@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>10.0.29</string>
<string>10.0.30</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>29</string>
<string>30</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>

View File

@@ -299,16 +299,21 @@ class BaseApplication {
const result = next(action);
const newState = store.getState();
let refreshNotes = false;
let refreshTags = false;
let refreshFolders = false;
// let refreshTags = false;
let refreshNotesUseSelectedNoteId = false;
reduxSharedMiddleware(store, next, action);
await reduxSharedMiddleware(store, next, action);
if (this.hasGui() && ["NOTE_UPDATE_ONE", "NOTE_DELETE", "FOLDER_UPDATE_ONE", "FOLDER_DELETE"].indexOf(action.type) >= 0) {
if (!await reg.syncTarget().syncStarted()) reg.scheduleSync(30 * 1000, { syncSteps: ["update_remote", "delete_remote"] });
SearchEngine.instance().scheduleSyncTables();
}
if (this.hasGui() && ["FOLDER_UPDATE_ONE", "FOLDER_UPDATE_ALL"].indexOf(action.type) >= 0) {
refreshFolders = true;
}
if (action.type == 'FOLDER_SELECT' || action.type === 'FOLDER_DELETE' || action.type === 'FOLDER_AND_NOTE_SELECT' || (action.type === 'SEARCH_UPDATE' && newState.notesParentType === 'Folder')) {
Setting.setValue('activeFolderId', newState.selectedFolderId);
this.currentFolder_ = newState.selectedFolderId ? await Folder.load(newState.selectedFolderId) : null;
@@ -337,20 +342,20 @@ class BaseApplication {
refreshNotes = true;
}
if (action.type == 'NOTE_DELETE') {
refreshTags = true;
}
// if (action.type == 'NOTE_DELETE') {
// refreshTags = true;
// }
if (refreshNotes) {
await this.refreshNotes(newState, refreshNotesUseSelectedNoteId);
}
if (refreshTags) {
this.dispatch({
type: 'TAG_UPDATE_ALL',
items: await Tag.allWithNotes(),
});
}
// if (refreshTags) {
// this.dispatch({
// type: 'TAG_UPDATE_ALL',
// items: await Tag.allWithNotes(),
// });
// }
if ((action.type == 'SETTING_UPDATE_ONE' && (action.key == 'dateFormat' || action.key == 'timeFormat')) || (action.type == 'SETTING_UPDATE_ALL')) {
time.setDateFormat(Setting.value('dateFormat'));
@@ -389,10 +394,11 @@ class BaseApplication {
}
if (action.type === 'NOTE_UPDATE_ONE') {
// If there is a conflict, we refresh the folders so as to display "Conflicts" folder
if (action.note && action.note.is_conflict) {
await FoldersScreenUtils.refreshFolders();
}
refreshFolders = true;
}
if (this.hasGui() && ((action.type == 'SETTING_UPDATE_ONE' && action.key.indexOf('folders.sortOrder') === 0) || action.type == 'SETTING_UPDATE_ALL')) {
refreshFolders = 'now';
}
if (this.hasGui() && action.type == 'SETTING_UPDATE_ONE' && action.key == 'sync.interval' || action.type == 'SETTING_UPDATE_ALL') {
@@ -407,6 +413,14 @@ class BaseApplication {
ResourceFetcher.instance().queueDownload(action.id);
}
if (refreshFolders) {
if (refreshFolders === 'now') {
await FoldersScreenUtils.refreshFolders();
} else {
await FoldersScreenUtils.scheduleRefreshFolders();
}
}
return result;
}

View File

@@ -195,6 +195,17 @@ class BaseModel {
return this.modelSelectAll(q.sql);
}
static async byIds(ids, options = null) {
if (!ids.length) return [];
if (!options) options = {};
if (!options.fields) options.fields = '*';
let sql = 'SELECT ' + this.db().escapeFields(options.fields) + ' FROM `' + this.tableName() + '`';
sql += ' WHERE id IN ("' + ids.join('","') + '")';
let q = this.applySqlOptions(options, sql);
return this.modelSelectAll(q.sql);
}
static async search(options = null) {
if (!options) options = {};
if (!options.fields) options.fields = '*';

View File

@@ -2,401 +2,32 @@ const MarkdownIt = require('markdown-it');
const Entities = require('html-entities').AllHtmlEntities;
const htmlentities = (new Entities()).encode;
const Resource = require('lib/models/Resource.js');
const ObjectUtils = require('lib/ObjectUtils');
const { shim } = require('lib/shim.js');
const { _ } = require('lib/locale');
const md5 = require('md5');
const MdToHtml_Katex = require('lib/MdToHtml_Katex');
const MdToHtml_Mermaid = require('lib/MdToHtml_Mermaid');
const StringUtils = require('lib/string-utils.js');
const noteStyle = require('./MdToHtml/noteStyle');
const rules = {
image: require('./MdToHtml/rules/image'),
checkbox: require('./MdToHtml/rules/checkbox'),
katex: require('./MdToHtml/rules/katex'),
link_open: require('./MdToHtml/rules/link_open'),
html_block: require('./MdToHtml/rules/html_block'),
html_inline: require('./MdToHtml/rules/html_inline'),
highlight_keywords: require('./MdToHtml/rules/highlight_keywords'),
};
const setupLinkify = require('./MdToHtml/setupLinkify');
const hljs = require('highlight.js');
class MdToHtml {
constructor(options = null) {
if (!options) options = {};
this.loadedResources_ = {};
this.cachedContent_ = null;
this.cachedContentKey_ = null;
this.extraCssBlocks_ = [];
// Must include last "/"
this.resourceBaseUrl_ = ('resourceBaseUrl' in options) ? options.resourceBaseUrl : null;
}
makeContentKey(resources, body, style, options) {
let k = [];
for (let n in resources) {
if (!resources.hasOwnProperty(n)) continue;
const r = resources[n];
k.push(r.id);
}
k.push(md5(escape(body))); // https://github.com/pvorb/node-md5/issues/41
k.push(md5(JSON.stringify(style)));
k.push(md5(JSON.stringify(options)));
return k.join('_');
}
clearCache() {
this.cachedContent_ = null;
this.cachedContentKey_ = null;
}
renderAttrs_(attrs) {
if (!attrs) return '';
let output = [];
for (let i = 0; i < attrs.length; i++) {
const n = attrs[i][0];
const v = attrs[i].length >= 2 ? attrs[i][1] : null;
if (n === 'alt' && !v) {
continue;
} else if (n === 'src') {
output.push('src="' + htmlentities(v) + '"');
} else {
output.push(n + '="' + (v ? htmlentities(v) : '') + '"');
}
}
return output.join(' ');
}
getAttr_(attrs, name, defaultValue = null) {
for (let i = 0; i < attrs.length; i++) {
if (attrs[i][0] === name) return attrs[i].length > 1 ? attrs[i][1] : null;
}
return defaultValue;
}
setAttr_(attrs, name, value) {
for (let i = 0; i < attrs.length; i++) {
if (attrs[i][0] === name) {
attrs[i][1] = value;
return attrs;
}
}
attrs.push([name, value]);
return attrs;
}
async loadResource(id, options) {
// Initially set to to an empty object to make
// it clear that it is being loaded. Otherwise
// it sometimes results in multiple calls to
// loadResource() for the same resource.
this.loadedResources_[id] = {};
const resource = await Resource.load(id);
if (!resource) {
// Can happen for example if an image is attached to a note, but the resource hasn't
// been downloaded from the sync target yet.
console.info('Cannot load resource: ' + id);
delete this.loadedResources_[id];
return;
}
const localState = await Resource.localState(resource);
if (localState.fetch_status !== Resource.FETCH_STATUS_DONE) {
delete this.loadedResources_[id];
console.info('Resource not yet fetched: ' + id);
return;
}
this.loadedResources_[id] = resource;
if (options.onResourceLoaded) options.onResourceLoaded();
}
renderImage_(attrs, options) {
const title = this.getAttr_(attrs, 'title');
const href = this.getAttr_(attrs, 'src');
if (!Resource.isResourceUrl(href)) {
return '<img data-from-md title="' + htmlentities(title) + '" src="' + href + '"/>';
}
const resourceId = Resource.urlToId(href);
const resource = this.loadedResources_[resourceId];
if (!resource) {
this.loadResource(resourceId, options);
return '';
}
if (!resource.id) return ''; // Resource is being loaded
const mime = resource.mime ? resource.mime.toLowerCase() : '';
if (Resource.isSupportedImageMimeType(mime)) {
let src = './' + Resource.filename(resource);
if (this.resourceBaseUrl_ !== null) src = this.resourceBaseUrl_ + src;
let output = '<img data-from-md data-resource-id="' + resource.id + '" title="' + htmlentities(title) + '" src="' + src + '"/>';
return output;
}
return '[Image: ' + htmlentities(resource.title) + ' (' + htmlentities(mime) + ')]';
}
renderImageHtml_(before, src, after, options) {
const resourceId = Resource.urlToId(src);
const resource = this.loadedResources_[resourceId];
if (!resource) {
this.loadResource(resourceId, options);
return '';
}
if (!resource.id) return ''; // Resource is being loaded
const mime = resource.mime ? resource.mime.toLowerCase() : '';
if (Resource.isSupportedImageMimeType(mime)) {
let newSrc = './' + Resource.filename(resource);
if (this.resourceBaseUrl_ !== null) newSrc = this.resourceBaseUrl_ + newSrc;
let output = '<img ' + before + ' data-resource-id="' + resource.id + '" src="' + newSrc + '" ' + after + '/>';
return output;
}
return '[Image: ' + htmlentities(resource.title) + ' (' + htmlentities(mime) + ')]';
}
renderOpenLink_(attrs, options) {
let href = this.getAttr_(attrs, 'href');
const text = this.getAttr_(attrs, 'text');
const isResourceUrl = Resource.isResourceUrl(href);
const title = isResourceUrl ? this.getAttr_(attrs, 'title') : href;
let resourceIdAttr = "";
let icon = "";
let hrefAttr = '#';
if (isResourceUrl) {
const resourceId = Resource.pathToId(href);
href = "joplin://" + resourceId;
resourceIdAttr = "data-resource-id='" + resourceId + "'";
icon = '<span class="resource-icon"></span>';
} else {
// If the link is a plain URL (as opposed to a resource link), set the href to the actual
// link. This allows the link to be exported too when exporting to PDF.
hrefAttr = href;
}
const js = options.postMessageSyntax + "(" + JSON.stringify(href) + "); return false;";
let output = "<a data-from-md " + resourceIdAttr + " title='" + htmlentities(title) + "' href='" + hrefAttr + "' onclick='" + js + "'>" + icon;
return output;
}
renderCloseLink_(attrs, options) {
return '</a>';
}
rendererPlugin_(language) {
if (!language) return null;
if (!this.rendererPlugins_) {
this.rendererPlugins_ = {};
this.rendererPlugins_['katex'] = new MdToHtml_Katex();
this.rendererPlugins_['mermaid'] = new MdToHtml_Mermaid();
}
return language in this.rendererPlugins_ ? this.rendererPlugins_[language] : null;
}
parseInlineCodeLanguage_(content) {
const m = content.match(/^\{\.([a-zA-Z0-9]+)\}/);
if (m && m.length >= 2) {
const language = m[1];
return {
language: language,
newContent: content.substr(language.length + 3),
};
}
return null;
}
urldecode_(str) {
try {
return decodeURIComponent((str+'').replace(/\+/g, '%20'));
} catch (error) {
// decodeURIComponent can throw if the string contains non-encoded data (for example "100%")
// so in this case just return the non encoded string.
return str;
}
}
renderTokens_(markdownIt, tokens, options) {
let output = [];
let previousToken = null;
let anchorAttrs = [];
let extraCssBlocks = {};
let anchorHrefs = [];
for (let i = 0; i < tokens.length; i++) {
let t = tokens[i];
const nextToken = i < tokens.length ? tokens[i+1] : null;
let tag = t.tag;
let openTag = null;
let closeTag = null;
let attrs = t.attrs ? t.attrs : [];
let tokenContent = t.content ? t.content : '';
const isCodeBlock = tag === 'code' && t.block;
const isInlineCode = t.type === 'code_inline';
const codeBlockLanguage = t && t.info ? t.info : null;
let rendererPlugin = null;
let rendererPluginOptions = { tagType: 'inline' };
let linkHref = null;
if (isCodeBlock) rendererPlugin = this.rendererPlugin_(codeBlockLanguage);
if (isInlineCode) {
openTag = null;
} else if (tag && (t.type.indexOf('html_inline') >= 0 || t.type.indexOf('html_block') >= 0)) {
openTag = null;
} else if (tag && t.type.indexOf('_open') >= 0) {
openTag = tag;
} else if (tag && t.type.indexOf('_close') >= 0) {
closeTag = tag;
} else if (tag && t.type.indexOf('inline') >= 0) {
openTag = tag;
} else if (t.type === 'link_open') {
openTag = 'a';
} else if (isCodeBlock) {
if (rendererPlugin) {
openTag = null;
} else {
openTag = 'pre';
}
}
if (openTag) {
if (openTag === 'a') {
anchorAttrs.push(attrs);
anchorHrefs.push(this.getAttr_(attrs, 'href'));
output.push(this.renderOpenLink_(attrs, options));
} else {
const attrsHtml = this.renderAttrs_(attrs);
output.push('<' + openTag + (attrsHtml ? ' ' + attrsHtml : '') + '>');
}
}
if (isCodeBlock) {
const codeAttrs = ['code'];
if (!rendererPlugin) {
if (codeBlockLanguage) codeAttrs.push(t.info); // t.info contains the language when the token is a codeblock
output.push('<code class="' + codeAttrs.join(' ') + '">');
}
} else if (isInlineCode) {
const result = this.parseInlineCodeLanguage_(tokenContent);
if (result) {
rendererPlugin = this.rendererPlugin_(result.language);
tokenContent = result.newContent;
}
if (!rendererPlugin) {
output.push('<code class="inline-code">');
}
}
if (t.type === 'math_inline' || t.type === 'math_block') {
rendererPlugin = this.rendererPlugin_('katex');
rendererPluginOptions = { tagType: t.type === 'math_block' ? 'block' : 'inline' };
}
if (rendererPlugin) {
rendererPlugin.loadAssets().catch((error) => {
console.warn('MdToHtml: Error loading assets for ' + rendererPlugin.name() + ': ', error.message);
});
}
if (t.type === 'image') {
if (tokenContent) attrs.push(['title', tokenContent]);
output.push(this.renderImage_(attrs, options));
} else if (t.type === 'html_inline' || t.type === 'html_block') {
output.push(t.content);
} else if (t.type === 'softbreak') {
output.push('<br/>');
} else if (t.type === 'hardbreak') {
output.push('<br/>');
} else if (t.type === 'hr') {
output.push('<hr/>');
} else {
if (t.children) {
const parsedChildren = this.renderTokens_(markdownIt, t.children, options);
output = output.concat(parsedChildren);
} else {
if (tokenContent) {
if ((isCodeBlock || isInlineCode) && rendererPlugin) {
output = rendererPlugin.processContent(output, tokenContent, isCodeBlock ? 'block' : 'inline');
} else if (rendererPlugin) {
output = rendererPlugin.processContent(output, tokenContent, rendererPluginOptions.tagType);
} else {
output.push(htmlentities(tokenContent));
}
}
}
}
if (nextToken && nextToken.tag === 'li' && t.tag === 'p') {
closeTag = null;
} else if (t.type === 'link_close') {
closeTag = 'a';
} else if (tag && t.type.indexOf('inline') >= 0) {
closeTag = openTag;
} else if (isCodeBlock) {
if (!rendererPlugin) closeTag = openTag;
}
if (isCodeBlock) {
if (!rendererPlugin) {
output.push('</code>');
}
} else if (isInlineCode) {
if (!rendererPlugin) {
output.push('</code>');
}
}
if (closeTag) {
if (closeTag === 'a') {
const currentAnchorAttrs = anchorAttrs.pop();
output.push(this.renderCloseLink_(currentAnchorAttrs, options));
} else {
output.push('</' + closeTag + '>');
}
}
if (rendererPlugin) {
const extraCss = rendererPlugin.extraCss();
const name = rendererPlugin.name();
if (extraCss && !(name in extraCssBlocks)) {
extraCssBlocks[name] = extraCss;
}
}
previousToken = t;
}
// Insert the extra CSS at the top of the HTML
if (!ObjectUtils.isEmpty(extraCssBlocks)) {
const temp = [];//['<style>'];
for (let n in extraCssBlocks) {
if (!extraCssBlocks.hasOwnProperty(n)) continue;
temp.push(extraCssBlocks[n]);
}
// temp.push('</style>');
if (temp.length) this.extraCssBlocks_.push(temp.join('\n'));
//output = temp.concat(output);
}
return output.join('');
}
applyHighlightedKeywords_(body, keywords) {
if (!keywords.length) return body;
return StringUtils.surroundKeywords(keywords, body, '<span class="highlighted-keyword">', '</span>');
this.cachedOutputs_ = {};
}
render(body, style, options = null) {
@@ -405,348 +36,90 @@ class MdToHtml {
if (!options.paddingBottom) options.paddingBottom = '0';
if (!options.highlightedKeywords) options.highlightedKeywords = [];
const cacheKey = this.makeContentKey(this.loadedResources_, body, style, options);
if (this.cachedContentKey_ === cacheKey) return this.cachedContent_;
const cacheKey = md5(escape(body + JSON.stringify(options) + JSON.stringify(style)));
const cachedOutput = this.cachedOutputs_[cacheKey];
if (cachedOutput) return cachedOutput;
const md = new MarkdownIt({
const context = {
css: {},
cssFiles: {},
assetLoaders: {},
};
const markdownIt = new MarkdownIt({
breaks: true,
linkify: true,
html: true,
});
highlight: function(str, lang) {
try {
let hlCode = '';
if (lang && hljs.getLanguage(lang)) {
hlCode = hljs.highlight(lang, str, true).value;
} else {
hlCode = hljs.highlightAuto(str).value;
}
body = this.applyHighlightedKeywords_(body, options.highlightedKeywords);
if (shim.isReactNative()) {
context.css['hljs'] = shim.loadCssFromJs(options.codeTheme);
} else {
context.cssFiles['hljs'] = 'highlight/styles/' + options.codeTheme;
}
// Add `file:` protocol in linkify to allow text in the format of "file://..." to translate into
// file-URL links in html view
md.linkify.add('file:', {
validate: function (text, pos, self) {
var tail = text.slice(pos);
if (!self.re.file) {
// matches all local file URI on Win/Unix/MacOS systems including reserved characters in some OS (i.e. no OS specific sanity check)
self.re.file = new RegExp('^[\\/]{2,3}[\\S]+');
}
if (self.re.file.test(tail)) {
return tail.match(self.re.file)[0].length;
}
return 0;
}
});
// enable file link URLs in MarkdownIt. Keeps other URL restrictions of MarkdownIt untouched.
// Format [link name](file://...)
md.validateLink = function (url) {
var BAD_PROTO_RE = /^(vbscript|javascript|data):/;
var GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;
// url should be normalized at this point, and existing entities are decoded
var str = url.trim().toLowerCase();
return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;
}
// This is currently used only so that the $expression$ and $$\nexpression\n$$ blocks are translated
// to math_inline and math_block blocks. These blocks are then processed directly with the Katex
// library. It is better this way as then it is possible to conditionally load the CSS required by
// Katex and use an up-to-date version of Katex (as of 2018, the plugin is still using 0.6, which is
// buggy instead of 0.9).
md.use(require('markdown-it-katex'));
// Hack to make checkboxes clickable. Ideally, checkboxes should be parsed properly in
// renderTokens_(), but for now this hack works. Marking it with HORRIBLE_HACK so
// that it can be removed and replaced later on.
const HORRIBLE_HACK = true;
if (HORRIBLE_HACK) {
let counter = -1;
while (body.indexOf('- [ ]') >= 0 || body.indexOf('- [X]') >= 0 || body.indexOf('- [x]') >= 0) {
body = body.replace(/- \[(X| |x)\]/, function(v, p1) {
let s = p1 == ' ' ? 'NOTICK' : 'TICK';
counter++;
return '- mJOPmCHECKBOXm' + s + 'm' + counter + 'm';
});
}
}
const env = {};
const tokens = md.parse(body, env);
this.extraCssBlocks_ = [];
let renderedBody = this.renderTokens_(md, tokens, options);
// console.info(body);
// console.info(tokens);
// console.info(renderedBody);
if (HORRIBLE_HACK) {
let loopCount = 0;
while (renderedBody.indexOf('mJOPm') >= 0) {
renderedBody = renderedBody.replace(/mJOPmCHECKBOXm([A-Z]+)m(\d+)m/, function(v, type, index) {
const js = options.postMessageSyntax + "('checkboxclick:" + type + ':' + index + "'); this.classList.contains('tick') ? this.classList.remove('tick') : this.classList.add('tick'); return false;";
return '<a data-from-md href="#" onclick="' + js + '" class="checkbox ' + (type == 'NOTICK' ? '' : 'tick') + '"><span>' + '' + '</span></a>';
});
if (loopCount++ >= 9999) break;
}
}
renderedBody = renderedBody.replace(/<img(.*?)src=["'](.*?)["'](.*?)\/>/g, (v, before, src, after) => {
if (!Resource.isResourceUrl(src)) return '<img ' + before + ' src="' + src + '" ' + after + '/>';
return this.renderImageHtml_(before, src, after, options);
});
// To disable meta tags that would refresh the page - eg "<meta http-equiv="refresh" content="5; url=/">"
// Also disable a few other tags that are likely not meant to be rendered.
// https://github.com/laurent22/joplin/issues/769
renderedBody = renderedBody.replace(/<(meta|title|body|html|script)/, '&lt;$1');
// https://necolas.github.io/normalize.css/
const normalizeCss = `
html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}
article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}
pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}
b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}
`;
const fontFamily = "'Avenir', 'Arial', sans-serif";
const css = `
body {
font-size: ` + style.htmlFontSize + `;
color: ` + style.htmlColor + `;
line-height: ` + style.htmlLineHeight + `;
background-color: ` + style.htmlBackgroundColor + `;
font-family: ` + fontFamily + `;
padding-bottom: ` + options.paddingBottom + `;
}
::-webkit-scrollbar {
width: 7px;
height: 7px;
}
::-webkit-scrollbar-corner {
background: none;
}
::-webkit-scrollbar-track {
border: none;
}
::-webkit-scrollbar-thumb {
background: rgba(100, 100, 100, 0.3);
border-radius: 5px;
}
::-webkit-scrollbar-track:hover {
background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb:hover {
background: rgba(100, 100, 100, 0.7);
}
/* Remove top padding and margin from first child so that top of rendered text is aligned to top of text editor text */
#rendered-md h1:first-child,
#rendered-md h2:first-child,
#rendered-md h3:first-child,
#rendered-md h4:first-child,
#rendered-md ul:first-child,
#rendered-md ol:first-child,
#rendered-md table:first-child,
#rendered-md blockquote:first-child,
#rendered-md img:first-child,
#rendered-md p:first-child {
margin-top: 0;
padding-top: 0;
}
p, h1, h2, h3, h4, h5, h6, ul, table {
margin-top: .6em;
margin-bottom: .65em;
}
h1, h2, h3, h4, h5, h6 {
line-height: 1.5em;
}
h1 {
font-size: 1.5em;
font-weight: bold;
border-bottom: 1px solid ` + style.htmlDividerColor + `;
padding-bottom: .3em;
}
h2 {
font-size: 1.3em;
font-weight: bold;
padding-bottom: .1em; */
}
h3 {
font-size: 1.1em;
}
h4, h5, h6 {
font-size: 1em;
font-weight: bold;
}
a {
color: ` + style.htmlLinkColor + `;
}
ul, ol {
padding-left: 0;
margin-left: 1.7em;
}
li {
margin-bottom: .4em;
}
li p {
margin-top: 0.2em;
margin-bottom: 0;
}
.resource-icon {
display: inline-block;
position: relative;
top: .5em;
text-decoration: none;
width: 1.15em;
height: 1.45em;
margin-right: 0.4em;
background-color: ` + style.htmlColor + `;
/* Awesome Font file */
-webkit-mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1536 1892' xmlns='http://www.w3.org/2000/svg'><path d='M288 128C129 128 0 257 0 416v960c0 159 129 288 288 288h960c159 0 288-129 288-288V416c0-159-129-288-288-288H288zm449.168 236.572l263.434.565 263.431.562.584 73.412.584 73.412-42.732 1.504c-23.708.835-47.002 2.774-52.322 4.36-14.497 4.318-23.722 12.902-29.563 27.51l-5.12 12.802-1.403 291.717c-1.425 295.661-1.626 302.586-9.936 343.043-15.2 74-69.604 150.014-142.197 198.685-58.287 39.08-121.487 60.47-208.155 70.45-22.999 2.648-122.228 2.636-141.976-.024l-.002.006c-69.785-9.377-108.469-20.202-154.848-43.332-85.682-42.73-151.778-116.991-177.537-199.469-10.247-32.81-11.407-40.853-11.375-78.754.026-31.257.76-39.15 5.024-54.043 8.94-31.228 20.912-51.733 43.56-74.62 27.312-27.6 55.812-40.022 95.524-41.633 37.997-1.542 63.274 5.024 87.23 22.66 15.263 11.235 30.828 33.238 39.537 55.884 5.52 14.355 5.949 18.31 7.549 69.569 1.675 53.648 3.05 63.99 11.674 87.785 11.777 32.499 31.771 55.017 61.46 69.22 26.835 12.838 47.272 16.785 80.56 15.56 21.646-.798 30.212-2.135 43.208-6.741 38.682-13.708 70.96-44.553 86.471-82.635 16.027-39.348 15.995-38.647 15.947-361.595-.042-283.26-.09-286.272-4.568-296.153-10.958-24.171-22.488-28.492-81.074-30.377l-42.969-1.38v-147.95z'/></svg>");
}
blockquote {
border-left: 4px solid ` + style.htmlCodeBorderColor + `;
padding-left: 1.2em;
margin-left: 0;
opacity: .7;
}
table {
text-align: left-align;
border-collapse: collapse;
border: 1px solid ` + style.htmlCodeBorderColor + `;
background-color: ` + style.htmlBackgroundColor + `;
}
td, th {
padding: .5em 1em .5em 1em;
font-size: ` + style.htmlFontSize + `;
color: ` + style.htmlColor + `;
font-family: ` + fontFamily + `;
}
td {
border: 1px solid ` + style.htmlCodeBorderColor + `;
}
th {
border: 1px solid ` + style.htmlCodeBorderColor + `;
border-bottom: 2px solid ` + style.htmlCodeBorderColor + `;
background-color: ` + style.htmlTableBackgroundColor + `;
}
tr:nth-child(even) {
background-color: ` + style.htmlTableBackgroundColor + `;
}
tr:hover {
background-color: ` + style.raisedBackgroundColor + `;
}
hr {
border: none;
border-bottom: 2px solid ` + style.htmlDividerColor + `;
}
img {
max-width: 100%;
height: auto;
}
.inline-code {
border: 1px solid ` + style.htmlCodeBorderColor + `;
background-color: ` + style.htmlCodeBackgroundColor + `;
padding-right: .2em;
padding-left: .2em;
border-radius: .25em;
color: ` + style.htmlCodeColor + `;
font-size: ` + style.htmlCodeFontSize + `;
}
.highlighted-keyword {
background-color: #F3B717;
color: black;
}
/*
This is to fix https://github.com/laurent22/joplin/issues/764
Without this, the tag attached to an equation float at an absolute position of the page,
instead of a position relative to the container.
*/
.katex-display>.katex>.katex-html {
position: relative;
}
a.checkbox {
border: 1pt solid ` + style.htmlColor + `;
border-radius: 2pt;
width: 1.1em;
height: 1.1em;
background-color: rgba(0,0,0,0);
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
top: -0.3em;
margin-right: 0.3em;
}
a.checkbox.tick:after {
content: "✓";
}
a.checkbox.tick {
color: ` + style.htmlColor + `;
}
@media print {
body {
height: auto !important;
}
pre {
white-space: pre-wrap;
}
.code, .inline-code {
border: 1px solid #CBCBCB;
return '<pre class="hljs"><code>' + hlCode + '</code></pre>';
} catch (error) {
return '<pre class="hljs"><code>' + markdownIt.utils.escapeHtml(str) + '</code></pre>';
}
}
`;
});
const ruleOptions = Object.assign({}, options, { resourceBaseUrl: this.resourceBaseUrl_ });
markdownIt.use(rules.image(context, ruleOptions));
markdownIt.use(rules.checkbox(context, ruleOptions));
markdownIt.use(rules.link_open(context, ruleOptions));
markdownIt.use(rules.html_block(context, ruleOptions));
markdownIt.use(rules.katex(context, ruleOptions));
markdownIt.use(rules.highlight_keywords(context, ruleOptions));
setupLinkify(markdownIt);
const renderedBody = markdownIt.render(body);
const cssStrings = noteStyle(style, options);
for (let k in context.css) {
if (!context.css.hasOwnProperty(k)) continue;
cssStrings.push(context.css[k]);
}
for (let k in context.assetLoaders) {
if (!context.assetLoaders.hasOwnProperty(k)) continue;
context.assetLoaders[k]().catch(error => {
console.warn('MdToHtml: Error loading assets for ' + k + ': ', error.message);
});
}
let cssStrings = [normalizeCss, css];
if (this.extraCssBlocks_) cssStrings = cssStrings.concat(this.extraCssBlocks_);
if (options.userCss) cssStrings.push(options.userCss);
const styleHtml = '<style>' + cssStrings.join('\n') + '</style>';
const output = styleHtml + '<div id="rendered-md">' + renderedBody + '</div>';
const html = styleHtml + '<div id="rendered-md">' + renderedBody + '</div>';
// console.info('<!DOCTYPE html><html><head><meta charset="UTF-8">' + output + '</body></html>');
const output = {
html: html,
cssFiles: Object.keys(context.cssFiles).map(k => context.cssFiles[k]),
};
this.cachedContent_ = output;
this.cachedContentKey_ = cacheKey;
return this.cachedContent_;
// Fow now, we keep only the last entry in the cache
this.cachedOutputs_ = {};
this.cachedOutputs_[cacheKey] = output;
return output;
}
toggleTickAt(body, index) {
let counter = -1;
while (body.indexOf('- [ ]') >= 0 || body.indexOf('- [X]') >= 0 || body.indexOf('- [x]') >= 0) {
counter++;
body = body.replace(/- \[(X| |x)\]/, function(v, p1) {
let s = p1 == ' ' ? 'NOTICK' : 'TICK';
if (index == counter) {
s = s == 'NOTICK' ? 'TICK' : 'NOTICK';
}
return '°°JOP°CHECKBOX°' + s + '°°';
});
}
body = body.replace(/°°JOP°CHECKBOX°NOTICK°°/g, '- [ ]');
body = body.replace(/°°JOP°CHECKBOX°TICK°°/g, '- [x]');
return body;
}
handleCheckboxClick(msg, noteBody) {
msg = msg.split(':');
let index = Number(msg[msg.length - 1]);
let currentState = msg[msg.length - 2]; // Not really needed but keep it anyway
return this.toggleTickAt(noteBody, index);
injectedJavaScript() {
return '';
}
}

View File

@@ -0,0 +1,221 @@
module.exports = function(style, options) {
// https://necolas.github.io/normalize.css/
const normalizeCss = `
html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}
article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}
pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}
b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}
`;
const fontFamily = "'Avenir', 'Arial', sans-serif";
const listMarginLeft = '1.7em';
const css = `
body {
font-size: ` + style.htmlFontSize + `;
color: ` + style.htmlColor + `;
line-height: ` + style.htmlLineHeight + `;
background-color: ` + style.htmlBackgroundColor + `;
font-family: ` + fontFamily + `;
padding-bottom: ` + options.paddingBottom + `;
}
::-webkit-scrollbar {
width: 7px;
height: 7px;
}
::-webkit-scrollbar-corner {
background: none;
}
::-webkit-scrollbar-track {
border: none;
}
::-webkit-scrollbar-thumb {
background: rgba(100, 100, 100, 0.3);
border-radius: 5px;
}
::-webkit-scrollbar-track:hover {
background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb:hover {
background: rgba(100, 100, 100, 0.7);
}
/* Remove top padding and margin from first child so that top of rendered text is aligned to top of text editor text */
#rendered-md h1:first-child,
#rendered-md h2:first-child,
#rendered-md h3:first-child,
#rendered-md h4:first-child,
#rendered-md ul:first-child,
#rendered-md ol:first-child,
#rendered-md table:first-child,
#rendered-md blockquote:first-child,
#rendered-md img:first-child,
#rendered-md p:first-child {
margin-top: 0;
padding-top: 0;
}
p, h1, h2, h3, h4, h5, h6, ul, table {
margin-top: .6em;
margin-bottom: .65em;
}
h1, h2, h3, h4, h5, h6 {
line-height: 1.5em;
}
h1 {
font-size: 1.5em;
font-weight: bold;
border-bottom: 1px solid ` + style.htmlDividerColor + `;
padding-bottom: .3em;
}
h2 {
font-size: 1.3em;
font-weight: bold;
padding-bottom: .1em; */
}
h3 {
font-size: 1.1em;
}
h4, h5, h6 {
font-size: 1em;
font-weight: bold;
}
a {
color: ` + style.htmlLinkColor + `;
}
ul, ol {
padding-left: 0;
margin-left: ` + listMarginLeft + `;
}
li {
margin-bottom: .4em;
}
li p {
margin-top: 0.2em;
margin-bottom: 0;
}
.resource-icon {
display: inline-block;
position: relative;
top: .5em;
text-decoration: none;
width: 1.15em;
height: 1.45em;
margin-right: 0.4em;
background-color: ` + style.htmlColor + `;
/* Awesome Font file */
-webkit-mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1536 1892' xmlns='http://www.w3.org/2000/svg'><path d='M288 128C129 128 0 257 0 416v960c0 159 129 288 288 288h960c159 0 288-129 288-288V416c0-159-129-288-288-288H288zm449.168 236.572l263.434.565 263.431.562.584 73.412.584 73.412-42.732 1.504c-23.708.835-47.002 2.774-52.322 4.36-14.497 4.318-23.722 12.902-29.563 27.51l-5.12 12.802-1.403 291.717c-1.425 295.661-1.626 302.586-9.936 343.043-15.2 74-69.604 150.014-142.197 198.685-58.287 39.08-121.487 60.47-208.155 70.45-22.999 2.648-122.228 2.636-141.976-.024l-.002.006c-69.785-9.377-108.469-20.202-154.848-43.332-85.682-42.73-151.778-116.991-177.537-199.469-10.247-32.81-11.407-40.853-11.375-78.754.026-31.257.76-39.15 5.024-54.043 8.94-31.228 20.912-51.733 43.56-74.62 27.312-27.6 55.812-40.022 95.524-41.633 37.997-1.542 63.274 5.024 87.23 22.66 15.263 11.235 30.828 33.238 39.537 55.884 5.52 14.355 5.949 18.31 7.549 69.569 1.675 53.648 3.05 63.99 11.674 87.785 11.777 32.499 31.771 55.017 61.46 69.22 26.835 12.838 47.272 16.785 80.56 15.56 21.646-.798 30.212-2.135 43.208-6.741 38.682-13.708 70.96-44.553 86.471-82.635 16.027-39.348 15.995-38.647 15.947-361.595-.042-283.26-.09-286.272-4.568-296.153-10.958-24.171-22.488-28.492-81.074-30.377l-42.969-1.38v-147.95z'/></svg>");
}
blockquote {
border-left: 4px solid ` + style.htmlCodeBorderColor + `;
padding-left: 1.2em;
margin-left: 0;
opacity: .7;
}
table {
text-align: left-align;
border-collapse: collapse;
border: 1px solid ` + style.htmlCodeBorderColor + `;
background-color: ` + style.htmlBackgroundColor + `;
}
td, th {
padding: .5em 1em .5em 1em;
font-size: ` + style.htmlFontSize + `;
color: ` + style.htmlColor + `;
font-family: ` + fontFamily + `;
}
td {
border: 1px solid ` + style.htmlCodeBorderColor + `;
}
th {
border: 1px solid ` + style.htmlCodeBorderColor + `;
border-bottom: 2px solid ` + style.htmlCodeBorderColor + `;
background-color: ` + style.htmlTableBackgroundColor + `;
}
tr:nth-child(even) {
background-color: ` + style.htmlTableBackgroundColor + `;
}
tr:hover {
background-color: ` + style.raisedBackgroundColor + `;
}
hr {
border: none;
border-bottom: 2px solid ` + style.htmlDividerColor + `;
}
img {
max-width: 100%;
height: auto;
}
.inline-code {
border: 1px solid ` + style.htmlCodeBorderColor + `;
background-color: ` + style.htmlCodeBackgroundColor + `;
padding-right: .2em;
padding-left: .2em;
border-radius: .25em;
color: ` + style.htmlCodeColor + `;
font-size: ` + style.htmlCodeFontSize + `;
}
.highlighted-keyword {
background-color: #F3B717;
color: black;
}
/*
This is to fix https://github.com/laurent22/joplin/issues/764
Without this, the tag attached to an equation float at an absolute position of the page,
instead of a position relative to the container.
*/
.katex-display>.katex>.katex-html {
position: relative;
}
li.md-checkbox {
list-style-type: none;
margin-left: -` + listMarginLeft + `;
}
li.md-checkbox input[type=checkbox] {
margin-right: 1em;
}
a.checkbox {
border: 1pt solid ` + style.htmlColor + `;
border-radius: 2pt;
width: 1.1em;
height: 1.1em;
background-color: rgba(0,0,0,0);
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
top: -0.3em;
margin-right: 0.3em;
}
a.checkbox.tick:after {
content: "✓";
}
a.checkbox.tick {
color: ` + style.htmlColor + `;
}
@media print {
body {
height: auto !important;
}
pre {
white-space: pre-wrap;
}
.code, .inline-code {
border: 1px solid #CBCBCB;
}
}
`;
return [normalizeCss, css];
}

View File

@@ -0,0 +1,105 @@
const Entities = require('html-entities').AllHtmlEntities;
const htmlentities = (new Entities()).encode;
const Resource = require('lib/models/Resource.js');
const utils = require('../utils');
let checkboxIndex_ = -1;
function createPrefixTokens(Token, id, checked, label, postMessageSyntax, sourceToken) {
let token = null;
const tokens = [];
// A bit hard to handle errors here and it's unlikely that the token won't have a valid
// map parameter, but if it does set it to a very high value, which will be more easy to notice
// in calling code.
const lineIndex = sourceToken.map && sourceToken.map.length ? sourceToken.map[0] : 99999999;
const checkedString = checked ? 'checked' : 'unchecked';
const js = postMessageSyntax + "('checkboxclick:" + checkedString + ':' + lineIndex + "'); return true;";
token = new Token('checkbox_input', 'input', 0);
token.attrs = [
['type', 'checkbox'],
['id', id],
['onclick', js],
];
if (checked) token.attrs.push(['checked', 'true']);
tokens.push(token);
token = new Token('label_open', 'label', 1);
token.attrs = [['for', id]];
tokens.push(token);
if (label) {
token = new Token('text', '', 0);
token.content = label;
tokens.push(token);
}
return tokens;
}
function createSuffixTokens(Token) {
return [new Token('label_close', 'label', -1)];
}
function installRule(markdownIt, mdOptions, ruleOptions) {
markdownIt.core.ruler.push('checkbox', state => {
const tokens = state.tokens;
const Token = state.Token;
const checkboxPattern = /^\[([x|X| ])\] (.*)$/
let currentListItem = null;
let processedFirstInline = false;
for (let i = 0; i < tokens.length; i++) {
const token = tokens[i];
if (token.type === 'list_item_open') {
currentListItem = token;
processedFirstInline = false;
continue;
}
if (token.type === 'list_item_close') {
currentListItem = null;
processedFirstInline = false;
continue;
}
if (currentListItem && !processedFirstInline && token.type === 'inline') {
processedFirstInline = true;
const firstChild = token.children && token.children.length ? token.children[0] : null;
if (!firstChild) continue;
const matches = checkboxPattern.exec(firstChild.content);
if (!matches || matches.length < 2) continue;
checkboxIndex_++;
const checked = matches[1] !== ' ';
const id = 'md-checkbox-' + checkboxIndex_;
const label = matches.length >= 3 ? matches[2] : '';
// Prepend the text content with the checkbox markup and the opening <label> tag
// then append the </label> tag at the end of the text content.
const prefix = createPrefixTokens(Token, id, checked, label, ruleOptions.postMessageSyntax, token);
const suffix = createSuffixTokens(Token);
token.children = markdownIt.utils.arrayReplaceAt(token.children, 0, prefix);
token.children = token.children.concat(suffix);
// Add a class to the <li> container so that it can be targetted with CSS.
let itemClass = currentListItem.attrGet('class');
if (!itemClass) itemClass = '';
itemClass += ' md-checkbox';
currentListItem.attrSet('class', itemClass.trim());
}
}
});
}
module.exports = function(context, ruleOptions) {
return function(md, mdOptions) {
installRule(md, mdOptions, ruleOptions);
};
};

View File

@@ -0,0 +1,71 @@
const Entities = require('html-entities').AllHtmlEntities;
const htmlentities = (new Entities()).encode;
const Resource = require('lib/models/Resource.js');
const utils = require('../utils');
const StringUtils = require('lib/string-utils.js');
const md5 = require('md5');
function createHighlightedTokens(Token, splitted) {
let token;
const output = [];
for (let i = 0; i < splitted.length; i++) {
const text = splitted[i];
if (!text) continue;
if (i % 2 === 0) {
token = new Token('text', '', 0);
token.content = text;
output.push(token);
} else {
token = new Token('highlighted_keyword_open', 'span', 1);
token.attrs = [['class', 'highlighted-keyword']];
output.push(token);
token = new Token('text', '', 0);
token.content = text;
output.push(token);
token = new Token('highlighted_keyword_close', 'span', -1);
output.push(token);
}
}
return output;
}
function installRule(markdownIt, mdOptions, ruleOptions) {
const divider = md5(Date.now().toString() + Math.random().toString());
markdownIt.core.ruler.push('highlight_keywords', state => {
const keywords = ruleOptions.highlightedKeywords;
if (!keywords || !keywords.length) return;
const tokens = state.tokens;
const Token = state.Token;
for (let i = 0; i < tokens.length; i++) {
const token = tokens[i];
if (token.type !== 'inline') continue;
for (let j = 0; j < token.children.length; j++) {
const child = token.children[j];
if (child.type !== 'text') continue;
const splitted = StringUtils.surroundKeywords(keywords, child.content, divider, divider).split(divider);
const splittedTokens = createHighlightedTokens(Token, splitted);
if (splittedTokens.length <= 1) continue;
token.children = markdownIt.utils.arrayReplaceAt(token.children, j, splittedTokens);
j += splittedTokens.length - 1;
}
}
});
}
module.exports = function(context, ruleOptions) {
return function(md, mdOptions) {
installRule(md, mdOptions, ruleOptions);
};
};

View File

@@ -0,0 +1,45 @@
const Entities = require('html-entities').AllHtmlEntities;
const htmlentities = (new Entities()).encode;
const Resource = require('lib/models/Resource.js');
const utils = require('../utils');
function renderImageHtml(before, src, after, ruleOptions) {
const resourceId = Resource.urlToId(src);
const resource = ruleOptions.resources[resourceId];
if (!resource) return '<div>' + utils.loaderImage() + '</div>';
const mime = resource.mime ? resource.mime.toLowerCase() : '';
if (Resource.isSupportedImageMimeType(mime)) {
let newSrc = './' + Resource.filename(resource);
if (ruleOptions.resourceBaseUrl) newSrc = ruleOptions.resourceBaseUrl + newSrc;
return '<img ' + before + ' data-resource-id="' + resource.id + '" src="' + newSrc + '" ' + after + '/>';
}
return '[Image: ' + htmlentities(resource.title) + ' (' + htmlentities(mime) + ')]';
}
function installRule(markdownIt, mdOptions, ruleOptions) {
const defaultRender = markdownIt.renderer.rules.html_block || function(tokens, idx, options, env, self) {
return self.renderToken(tokens, idx, options);
};
const imageRegex = /<img(.*?)src=["'](.*?)["'](.*?)\/>/
markdownIt.renderer.rules.html_block = function(tokens, idx, options, env, self) {
const token = tokens[idx];
const content = token.content;
if (!content.match(imageRegex)) return defaultRender(tokens, idx, options, env, self);
return content.replace(imageRegex, (v, before, src, after) => {
if (!Resource.isResourceUrl(src)) return defaultRender(tokens, idx, options, env, self);
return renderImageHtml(before, src, after, ruleOptions);
});
};
}
module.exports = function(context, ruleOptions) {
return function(md, mdOptions) {
installRule(md, mdOptions, ruleOptions);
};
};

View File

@@ -0,0 +1,39 @@
// This rule is no longer needed because HTML anchors (as opposed to those generated from Markdown)
// are handled in webviewLib. Keeping it here for reference.
const Entities = require('html-entities').AllHtmlEntities;
const htmlentities = (new Entities()).encode;
const Resource = require('lib/models/Resource.js');
const utils = require('../utils');
function installRule(markdownIt, mdOptions, ruleOptions) {
const defaultRender = markdownIt.renderer.rules.html_block || function(tokens, idx, options, env, self) {
return self.renderToken(tokens, idx, options);
};
const anchorRegex = /<a (.*)>/
markdownIt.renderer.rules.html_inline = function(tokens, idx, options, env, self) {
const token = tokens[idx];
const content = token.content;
if (!content.match(anchorRegex)) return defaultRender(tokens, idx, options, env, self);
return content.replace(anchorRegex, (v, content) => {
let js = `
var href = this.getAttribute('href');
if (!href || href.indexOf('http') < 0) return true;
` + ruleOptions.postMessageSyntax + `(href);
return false;
`;
js = js.split('\n').join(' ').replace(/\t/g, '');
return '<a onclick="' + js + '" ' + content + '>';
});
};
}
module.exports = function(context, ruleOptions) {
return function(md, mdOptions) {
installRule(md, mdOptions, ruleOptions);
};
};

View File

@@ -0,0 +1,36 @@
const Entities = require('html-entities').AllHtmlEntities;
const htmlentities = (new Entities()).encode;
const Resource = require('lib/models/Resource.js');
const utils = require('../utils');
function installRule(markdownIt, mdOptions, ruleOptions) {
const defaultRender = markdownIt.renderer.rules.image;
markdownIt.renderer.rules.image = (tokens, idx, options, env, self) => {
const token = tokens[idx];
const src = utils.getAttr(token.attrs, 'src');
const title = utils.getAttr(token.attrs, 'title');
if (!Resource.isResourceUrl(src)) return defaultRender(tokens, idx, options, env, self);
const resourceId = Resource.urlToId(src);
const resource = ruleOptions.resources[resourceId];
if (!resource) return '<div>' + utils.loaderImage() + '</div>';
const mime = resource.mime ? resource.mime.toLowerCase() : '';
if (Resource.isSupportedImageMimeType(mime)) {
let realSrc = './' + Resource.filename(resource);
if (ruleOptions.resourceBaseUrl) realSrc = ruleOptions.resourceBaseUrl + realSrc;
let output = '<img data-from-md data-resource-id="' + resource.id + '" title="' + htmlentities(title) + '" src="' + realSrc + '"/>';
return output;
}
return defaultRender(tokens, idx, options, env, self);
};
}
module.exports = function(context, ruleOptions) {
return function(md, mdOptions) {
installRule(md, mdOptions, ruleOptions);
};
};

View File

@@ -0,0 +1,244 @@
// Based on https://github.com/waylonflinn/markdown-it-katex
'use strict';
const { shim } = require('lib/shim');
const Setting = require('lib/models/Setting');
var katex = require('katex');
const katexCss = require('lib/csstojs/katex.css.js');
const md5 = require('md5');
// Test if potential opening or closing delimieter
// Assumes that there is a "$" at state.src[pos]
function isValidDelim(state, pos) {
var prevChar, nextChar,
max = state.posMax,
can_open = true,
can_close = true;
prevChar = pos > 0 ? state.src.charCodeAt(pos - 1) : -1;
nextChar = pos + 1 <= max ? state.src.charCodeAt(pos + 1) : -1;
// Check non-whitespace conditions for opening and closing, and
// check that closing delimeter isn't followed by a number
if (prevChar === 0x20/* " " */ || prevChar === 0x09/* \t */ ||
(nextChar >= 0x30/* "0" */ && nextChar <= 0x39/* "9" */)) {
can_close = false;
}
if (nextChar === 0x20/* " " */ || nextChar === 0x09/* \t */) {
can_open = false;
}
return {
can_open: can_open,
can_close: can_close
};
}
function math_inline(state, silent) {
var start, match, token, res, pos, esc_count;
if (state.src[state.pos] !== "$") { return false; }
res = isValidDelim(state, state.pos);
if (!res.can_open) {
if (!silent) { state.pending += "$"; }
state.pos += 1;
return true;
}
// First check for and bypass all properly escaped delimieters
// This loop will assume that the first leading backtick can not
// be the first character in state.src, which is known since
// we have found an opening delimieter already.
start = state.pos + 1;
match = start;
while ( (match = state.src.indexOf("$", match)) !== -1) {
// Found potential $, look for escapes, pos will point to
// first non escape when complete
pos = match - 1;
while (state.src[pos] === "\\") { pos -= 1; }
// Even number of escapes, potential closing delimiter found
if ( ((match - pos) % 2) == 1 ) { break; }
match += 1;
}
// No closing delimter found. Consume $ and continue.
if (match === -1) {
if (!silent) { state.pending += "$"; }
state.pos = start;
return true;
}
// Check if we have empty content, ie: $$. Do not parse.
if (match - start === 0) {
if (!silent) { state.pending += "$$"; }
state.pos = start + 1;
return true;
}
// Check for valid closing delimiter
res = isValidDelim(state, match);
if (!res.can_close) {
if (!silent) { state.pending += "$"; }
state.pos = start;
return true;
}
if (!silent) {
token = state.push('math_inline', 'math', 0);
token.markup = "$";
token.content = state.src.slice(start, match);
}
state.pos = match + 1;
return true;
}
function math_block(state, start, end, silent){
var firstLine, lastLine, next, lastPos, found = false, token,
pos = state.bMarks[start] + state.tShift[start],
max = state.eMarks[start]
if(pos + 2 > max){ return false; }
if(state.src.slice(pos,pos+2)!=='$$'){ return false; }
pos += 2;
firstLine = state.src.slice(pos,max);
if(silent){ return true; }
if(firstLine.trim().slice(-2)==='$$'){
// Single line expression
firstLine = firstLine.trim().slice(0, -2);
found = true;
}
for(next = start; !found; ){
next++;
if(next >= end){ break; }
pos = state.bMarks[next]+state.tShift[next];
max = state.eMarks[next];
if(pos < max && state.tShift[next] < state.blkIndent){
// non-empty line with negative indent should stop the list:
break;
}
if(state.src.slice(pos,max).trim().slice(-2)==='$$'){
lastPos = state.src.slice(0,max).lastIndexOf('$$');
lastLine = state.src.slice(pos,lastPos);
found = true;
}
}
state.line = next + 1;
token = state.push('math_block', 'math', 0);
token.block = true;
token.content = (firstLine && firstLine.trim() ? firstLine + '\n' : '')
+ state.getLines(start + 1, next, state.tShift[start], true)
+ (lastLine && lastLine.trim() ? lastLine : '');
token.map = [ start, state.line ];
token.markup = '$$';
return true;
}
let assetsLoaded_ = false;
let cache_ = {};
module.exports = function(context, ruleOptions) {
// Keep macros that persist across Katex blocks to allow defining a macro
// in one block and re-using it later in other blocks.
// https://github.com/laurent22/joplin/issues/1105
context.__katex = { macros: {} };
const addContextAssets = () => {
context.css['katex'] = katexCss;
context.assetLoaders['katex'] = async () => {
if (assetsLoaded_) return;
// In node, the fonts are simply copied using copycss to where Katex expects to find them, which is under app/gui/note-viewer/fonts
// In React Native, it's more complicated and we need to download and copy them to the right directory. Ideally, we should embed
// them as an asset and copy them from there (or load them from there by modifying Katex CSS), but for now that will do.
if (shim.isReactNative()) {
// Fonts must go under the resourceDir directory because this is the baseUrl of NoteBodyViewer
const baseDir = Setting.value('resourceDir');
await shim.fsDriver().mkdir(baseDir + '/fonts');
await shim.fetchBlob('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0-beta1/fonts/KaTeX_Main-Regular.woff2', { overwrite: false, path: baseDir + '/fonts/KaTeX_Main-Regular.woff2' });
await shim.fetchBlob('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0-beta1/fonts/KaTeX_Math-Italic.woff2', { overwrite: false, path: baseDir + '/fonts/KaTeX_Math-Italic.woff2' });
await shim.fetchBlob('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0-beta1/fonts/KaTeX_Size1-Regular.woff2', { overwrite: false, path: baseDir + '/fonts/KaTeX_Size1-Regular.woff2' });
}
assetsLoaded_ = true;
};
}
function renderToStringWithCache(latex, options) {
const cacheKey = md5(escape(latex) + escape(JSON.stringify(options)));
if (cacheKey in cache_) {
return cache_[cacheKey];
} else {
const beforeMacros = JSON.stringify(options.macros);
const output = katex.renderToString(latex, options);
const afterMacros = JSON.stringify(options.macros);
// Don't cache the formulas that add macros, otherwise
// they won't be added on second run.
if (beforeMacros === afterMacros) cache_[cacheKey] = output;
return output;
}
}
return function(md, options) {
// Default options
options = options || {};
options.macros = context.__katex.macros;
// set KaTeX as the renderer for markdown-it-simplemath
var katexInline = function(latex){
options.displayMode = false;
try{
return renderToStringWithCache(latex, options);
} catch(error){
if(options.throwOnError){ console.log(error); }
return latex;
}
};
var inlineRenderer = function(tokens, idx){
addContextAssets();
return katexInline(tokens[idx].content);
};
var katexBlock = function(latex){
options.displayMode = true;
try{
return "<p>" + renderToStringWithCache(latex, options) + "</p>";
} catch(error){
if(options.throwOnError){ console.log(error); }
return latex;
}
}
var blockRenderer = function(tokens, idx){
addContextAssets();
return katexBlock(tokens[idx].content) + '\n';
}
md.inline.ruler.after('escape', 'math_inline', math_inline);
md.block.ruler.after('blockquote', 'math_block', math_block, {
alt: [ 'paragraph', 'reference', 'blockquote', 'list' ]
});
md.renderer.rules.math_inline = inlineRenderer;
md.renderer.rules.math_block = blockRenderer;
};
};

View File

@@ -0,0 +1,43 @@
const Entities = require('html-entities').AllHtmlEntities;
const htmlentities = (new Entities()).encode;
const Resource = require('lib/models/Resource.js');
const utils = require('../utils');
const loaderImage = '<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="16px" height="16px" viewBox="0 0 128 128" xml:space="preserve"><g><circle cx="16" cy="64" r="16" fill="#000000" fill-opacity="1"/><circle cx="16" cy="64" r="16" fill="#555555" fill-opacity="0.67" transform="rotate(45,64,64)"/><circle cx="16" cy="64" r="16" fill="#949494" fill-opacity="0.42" transform="rotate(90,64,64)"/><circle cx="16" cy="64" r="16" fill="#cccccc" fill-opacity="0.2" transform="rotate(135,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" fill-opacity="0.12" transform="rotate(180,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" fill-opacity="0.12" transform="rotate(225,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" fill-opacity="0.12" transform="rotate(270,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" fill-opacity="0.12" transform="rotate(315,64,64)"/><animateTransform attributeName="transform" type="rotate" values="0 64 64;315 64 64;270 64 64;225 64 64;180 64 64;135 64 64;90 64 64;45 64 64" calcMode="discrete" dur="720ms" repeatCount="indefinite"></animateTransform></g></svg>';
function installRule(markdownIt, mdOptions, ruleOptions) {
markdownIt.renderer.rules.link_open = function (tokens, idx, options, env, self) {
const token = tokens[idx];
let href = utils.getAttr(token.attrs, 'href');
const text = utils.getAttr(token.attrs, 'text');
const isResourceUrl = Resource.isResourceUrl(href);
const title = isResourceUrl ? utils.getAttr(token.attrs, 'title') : href;
console.info(href, isResourceUrl);
let resourceIdAttr = "";
let icon = "";
let hrefAttr = '#';
if (isResourceUrl) {
const resourceId = Resource.pathToId(href);
href = "joplin://" + resourceId;
resourceIdAttr = "data-resource-id='" + resourceId + "'";
icon = '<span class="resource-icon"></span>';
} else {
// If the link is a plain URL (as opposed to a resource link), set the href to the actual
// link. This allows the link to be exported too when exporting to PDF.
hrefAttr = href;
}
let js = ruleOptions.postMessageSyntax + "(" + JSON.stringify(href) + "); return false;";
if (hrefAttr.indexOf('#') === 0 && href.indexOf('#') === 0) js = ''; // If it's an internal anchor, don't add any JS since the webview is going to handle navigating to the right place
if (js) hrefAttr = '#';
return "<a data-from-md " + resourceIdAttr + " title='" + htmlentities(title) + "' href='" + hrefAttr + "' onclick='" + js + "'>" + icon;
};
}
module.exports = function(context, ruleOptions) {
return function(md, mdOptions) {
installRule(md, mdOptions, ruleOptions);
};
};

View File

@@ -0,0 +1,29 @@
module.exports = function(markdownIt) {
// Add `file:` protocol in linkify to allow text in the format of "file://..." to translate into
// file-URL links in html view
markdownIt.linkify.add('file:', {
validate: function (text, pos, self) {
var tail = text.slice(pos);
if (!self.re.file) {
// matches all local file URI on Win/Unix/MacOS systems including reserved characters in some OS (i.e. no OS specific sanity check)
self.re.file = new RegExp('^[\\/]{2,3}[\\S]+');
}
if (self.re.file.test(tail)) {
return tail.match(self.re.file)[0].length;
}
return 0;
}
});
// enable file link URLs in MarkdownIt. Keeps other URL restrictions of MarkdownIt untouched.
// Format [link name](file://...)
markdownIt.validateLink = function (url) {
var BAD_PROTO_RE = /^(vbscript|javascript|data):/;
var GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;
// url should be normalized at this point, and existing entities are decoded
var str = url.trim().toLowerCase();
return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;
}
}

View File

@@ -0,0 +1,14 @@
module.exports = {
getAttr: function(attrs, name, defaultValue = null) {
for (let i = 0; i < attrs.length; i++) {
if (attrs[i][0] === name) return attrs[i].length > 1 ? attrs[i][1] : null;
}
return defaultValue;
},
loaderImage: function() {
return '<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="16px" height="16px" viewBox="0 0 128 128" xml:space="preserve"><g><circle cx="16" cy="64" r="16" fill="#000000" fill-opacity="1"/><circle cx="16" cy="64" r="16" fill="#555555" fill-opacity="0.67" transform="rotate(45,64,64)"/><circle cx="16" cy="64" r="16" fill="#949494" fill-opacity="0.42" transform="rotate(90,64,64)"/><circle cx="16" cy="64" r="16" fill="#cccccc" fill-opacity="0.2" transform="rotate(135,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" fill-opacity="0.12" transform="rotate(180,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" fill-opacity="0.12" transform="rotate(225,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" fill-opacity="0.12" transform="rotate(270,64,64)"/><circle cx="16" cy="64" r="16" fill="#e1e1e1" fill-opacity="0.12" transform="rotate(315,64,64)"/><animateTransform attributeName="transform" type="rotate" values="0 64 64;315 64 64;270 64 64;225 64 64;180 64 64;135 64 64;90 64 64;45 64 64" calcMode="discrete" dur="720ms" repeatCount="indefinite"></animateTransform></g></svg>';
},
};

View File

@@ -0,0 +1,54 @@
const webviewLib = {};
webviewLib.handleInternalLink = function(event, anchorNode) {
const href = anchorNode.getAttribute('href');
if (href.indexOf('#') === 0) {
event.preventDefault();
location.hash = href;
return true;
}
return false;
}
webviewLib.getParentAnchorElement = function(element) {
let counter = 0;
while (true) {
if (counter++ >= 10000) {
console.warn('been looping for too long - exiting')
return null;
}
if (!element) return null;
if (element.nodeName === 'A') return element;
element = element.parentElement;
}
}
webviewLib.initialize = function(options) {
webviewLib.options_ = options;
}
document.addEventListener('click', function(event) {
const anchor = webviewLib.getParentAnchorElement(event.target);
if (!anchor) return;
// Prevent URLs added via <a> tags from being opened within the application itself
// otherwise it would open the whole website within the WebView.
// Note that we already handle some links in html_inline.js, however not all of them
// go through this plugin, in particular links coming from third-party packages such
// as Katex.
if (!anchor.hasAttribute('data-from-md')) {
if (webviewLib.handleInternalLink(event, anchor)) return;
event.preventDefault();
webviewLib.options_.postMessage(anchor.getAttribute('href'));
return;
}
// If this is an internal link, jump to the anchor directly
if (anchor.hasAttribute('data-from-md')) {
if (webviewLib.handleInternalLink(event, anchor)) return;
}
});

View File

@@ -1,67 +0,0 @@
const { shim } = require('lib/shim');
const katex = require('katex');
const katexCss = require('lib/csstojs/katex.css.js');
const Setting = require('lib/models/Setting');
class MdToHtml_Katex {
constructor() {
this.cache_ = {};
this.assetsLoaded_ = false;
}
name() {
return 'katex';
}
processContent(renderedTokens, content, tagType) {
try {
const cacheKey = tagType + '_' + content;
let renderered = null;
if (this.cache_[cacheKey]) {
renderered = this.cache_[cacheKey];
} else {
renderered = katex.renderToString(content, {
displayMode: tagType === 'block',
});
this.cache_[cacheKey] = renderered;
}
if (tagType === 'block') renderered = '<p>' + renderered + '</p>';
renderedTokens.push(renderered);
} catch (error) {
renderedTokens.push('Cannot render Katex content: ' + error.message);
}
return renderedTokens;
}
extraCss() {
return katexCss;
}
async loadAssets() {
if (this.assetsLoaded_) return;
// In node, the fonts are simply copied using copycss to where Katex expects to find them, which is under app/gui/note-viewer/fonts
// In React Native, it's more complicated and we need to download and copy them to the right directory. Ideally, we should embed
// them as an asset and copy them from there (or load them from there by modifying Katex CSS), but for now that will do.
if (shim.isReactNative()) {
// Fonts must go under the resourceDir directory because this is the baseUrl of NoteBodyViewer
const baseDir = Setting.value('resourceDir');
await shim.fsDriver().mkdir(baseDir + '/fonts');
await shim.fetchBlob('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0-beta1/fonts/KaTeX_Main-Regular.woff2', { overwrite: false, path: baseDir + '/fonts/KaTeX_Main-Regular.woff2' });
await shim.fetchBlob('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0-beta1/fonts/KaTeX_Math-Italic.woff2', { overwrite: false, path: baseDir + '/fonts/KaTeX_Math-Italic.woff2' });
await shim.fetchBlob('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0-beta1/fonts/KaTeX_Size1-Regular.woff2', { overwrite: false, path: baseDir + '/fonts/KaTeX_Size1-Regular.woff2' });
}
this.assetsLoaded_ = true;
}
}
module.exports = MdToHtml_Katex;

View File

@@ -1,23 +0,0 @@
const { shim } = require('lib/shim');
const mermaid = require('mermaid');
class MdToHtml_Mermaid {
name() {
return 'mermaid';
}
processContent(renderedTokens, content, tagType) {
renderedTokens.push('<div class="mermaid">' + content + '</div>');
return renderedTokens;
}
extraCss() {
return '';
}
async loadAssets() {}
}
module.exports = MdToHtml_Mermaid;

View File

@@ -36,6 +36,8 @@ const globalStyle = {
htmlCodeBackgroundColor: 'rgb(243, 243, 243)',
htmlCodeBorderColor: 'rgb(220, 220, 220)',
htmlCodeColor: 'rgb(0,0,0)',
codeThemeCss: 'hljs-atom-one-light.css',
};
globalStyle.marginRight = globalStyle.margin;
@@ -118,6 +120,8 @@ function themeStyle(theme) {
output.htmlCodeBackgroundColor = 'rgb(47, 48, 49)';
output.htmlCodeBorderColor = 'rgb(70, 70, 70)';
output.codeThemeCss = 'hljs-atom-one-dark-reasonable.css';
output.colorUrl = '#7B81FF';
themeCache_[theme] = output;

View File

@@ -1,10 +1,12 @@
const React = require('react'); const Component = React.Component;
const { Platform, WebView, View } = require('react-native');
const { globalStyle } = require('lib/components/global-style.js');
const { themeStyle } = require('lib/components/global-style.js');
const Resource = require('lib/models/Resource.js');
const Setting = require('lib/models/Setting.js');
const { reg } = require('lib/registry.js');
const { shim } = require('lib/shim');
const MdToHtml = require('lib/MdToHtml.js');
const shared = require('lib/components/shared/note-screen-shared.js');
class NoteBodyViewer extends Component {
@@ -69,7 +71,7 @@ class NoteBodyViewer extends Component {
}
rebuildMd() {
this.mdToHtml_.clearCache();
// this.mdToHtml_.clearCache();
this.forceUpdate();
}
@@ -77,6 +79,9 @@ class NoteBodyViewer extends Component {
const note = this.props.note;
const style = this.props.style;
const onCheckboxChange = this.props.onCheckboxChange;
const theme = themeStyle(this.props.theme);
const bodyToRender = note ? note.body : '';
const mdOptions = {
onResourceLoaded: () => {
@@ -92,9 +97,18 @@ class NoteBodyViewer extends Component {
},
paddingBottom: '3.8em', // Extra bottom padding to make it possible to scroll past the action button (so that it doesn't overlap the text)
highlightedKeywords: this.props.highlightedKeywords,
resources: this.props.noteResources,//await shared.attachedResources(bodyToRender),
codeTheme: theme.codeThemeCss,
};
let html = this.mdToHtml_.render(note ? note.body : '', this.props.webViewStyle, mdOptions);
let result = this.mdToHtml_.render(bodyToRender, this.props.webViewStyle, mdOptions);
let html = result.html;
const injectedJs = [this.mdToHtml_.injectedJavaScript()];
injectedJs.push(shim.injectedJs('webviewLib'));
injectedJs.push('webviewLib.initialize({ postMessage: postMessage });');
console.info(injectedJs);
html = `
<!DOCTYPE html>
@@ -146,6 +160,7 @@ class NoteBodyViewer extends Component {
scalesPageToFit={Platform.OS !== 'ios'}
style={webViewStyle}
source={source}
injectedJavaScript={injectedJs.join('\n')}
originWhitelist={['file://*', './*', 'http://*', 'https://*']}
mixedContentMode="always"
allowFileAccess={true}
@@ -155,8 +170,8 @@ class NoteBodyViewer extends Component {
let msg = event.nativeEvent.data;
if (msg.indexOf('checkboxclick:') === 0) {
const newBody = this.mdToHtml_.handleCheckboxClick(msg, this.props.note.body);
if (onCheckboxChange) onCheckboxChange(newBody);
const newBody = shared.toggleCheckbox(msg, this.props.note.body);
if (this.props.onCheckboxChange) this.props.onCheckboxChange(newBody);
} else if (msg.indexOf('bodyscroll:') === 0) {
//msg = msg.split(':');
//this.bodyScrollTop_ = Number(msg[1]);

View File

@@ -250,7 +250,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
settingComps.push(
<View key="version_info_app" style={this.styles().settingContainer}>
<Text style={this.styles().settingText}>{_('Joplin v%s', VersionInfo.appVersion)}</Text>
<Text style={this.styles().settingText}>{"Joplin " + VersionInfo.appVersion}</Text>
</View>
);

View File

@@ -63,6 +63,7 @@ class NoteScreenComponent extends BaseScreenComponent {
noteTagDialogShown: false,
fromShare: false,
showCamera: false,
noteResources: {},
// HACK: For reasons I can't explain, when the WebView is present, the TextInput initially does not display (It's just a white rectangle with
// no visible text). It will only appear when tapping it or doing certain action like selecting text on the webview. The bug started to
@@ -167,7 +168,10 @@ class NoteScreenComponent extends BaseScreenComponent {
if (!this.state.note || !this.state.note.body) return;
const resourceIds = await Note.linkedResourceIds(this.state.note.body);
if (resourceIds.indexOf(resource.id) >= 0 && this.refs.noteBodyViewer) {
this.refs.noteBodyViewer.rebuildMd();
const attachedResources = await shared.attachedResources(this.state.note.body);
this.setState({ noteResources: attachedResources }, () => {
this.refs.noteBodyViewer.rebuildMd();
});
}
}
@@ -612,7 +616,9 @@ class NoteScreenComponent extends BaseScreenComponent {
style={this.styles().noteBodyViewer}
webViewStyle={theme}
note={note}
noteResources={this.state.noteResources}
highlightedKeywords={keywords}
theme={this.props.theme}
onCheckboxChange={(newBody) => { onCheckboxChange(newBody) }}
onLoadEnd={() => {
setTimeout(() => {

Some files were not shown because too many files have changed in this diff Show More