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

Compare commits

..

65 Commits

Author SHA1 Message Date
Laurent Cozic
6d7511efbb Electron release v1.0.158 2019-05-27 19:54:04 +01:00
Caleb John
a0fb99d78f Desktop, Mobile: Improved: Enable more options on multimd-table plugin (#1586)
* Update multimd-table and enable options

* Add `options` option to markdown plugins
2019-05-27 19:53:02 +01:00
Laurent Cozic
685a52c2c5 Desktop, Mobile: Fixes #1587: Fix internal note links 2019-05-27 19:49:18 +01:00
Laurent Cozic
fc77419ca1 Desktop: Fixed empty separators in menu 2019-05-27 19:48:09 +01:00
Laurent Cozic
bab3a12e92 Doc: Updated build instructions for Windows 2019-05-27 18:04:24 +01:00
Laurent Cozic
21f0b90f48 Android release v1.0.255 2019-05-26 19:41:20 +01:00
Laurent Cozic
83682ab513 Desktop, Mobile: Improved config screen with dark theme 2019-05-26 19:39:07 +01:00
Laurent Cozic
7b987b5a8f Desktop: Resolves #1575: Make bold text more visible 2019-05-24 23:51:56 +01:00
Laurent Cozic
cb5aa425c8 Updated translations 2019-05-24 23:09:31 +01:00
Laurent Cozic
dd222381dd Translatiobs 2019-05-24 23:08:31 +01:00
Laurent Cozic
d7210811f6 Android release v1.0.254 2019-05-24 17:38:10 +01:00
Laurent Cozic
3a43cfeebf Electron release v1.0.157 2019-05-24 17:35:53 +01:00
Laurent Cozic
31e33c6628 Updated translations 2019-05-24 17:35:44 +01:00
Laurent Cozic
875f8d6997 Electron release v1.0.156 2019-05-24 17:35:04 +01:00
Laurent Cozic
aaaf27af6e Android: Fixed resource loading issue, and improved logging on desktop 2019-05-24 17:34:18 +01:00
Laurent Cozic
43624ffa75 Desktop: Improved: Add number of characters removed and added in revision list 2019-05-24 17:31:18 +01:00
Laurent Cozic
996b6623f1 Android release v1.0.253 2019-05-24 14:50:18 +01:00
Laurent Cozic
613041b806 Electron release v1.0.155 2019-05-24 14:47:35 +01:00
Laurent Cozic
ff1d01a864 Merge branch 'master' of github.com:laurent22/joplin 2019-05-24 14:47:30 +01:00
Laurent Cozic
bcbbe10bf8 Electron release v1.0.154 2019-05-24 14:47:12 +01:00
Laurent Cozic
3de0abfc84 Update FUNDING.yml 2019-05-24 09:57:53 +01:00
Laurent Cozic
133fd03469 Update FUNDING.yml 2019-05-24 09:55:29 +01:00
Laurent Cozic
4f97c5c017 Update FUNDING.yml 2019-05-24 09:55:07 +01:00
Laurent Cozic
2d8fbac58c Create FUNDING.yml 2019-05-24 09:53:31 +01:00
Laurent Cozic
95f7ac4a4a Merge branch 'master' of github.com:laurent22/joplin 2019-05-24 09:07:11 +01:00
Laurent Cozic
6a56a6ccf0 Doc: Added more technical info for revision history 2019-05-24 09:05:16 +01:00
Luis Orozco
1eb8df9fa6 Desktop: Fixes #1186, #1354: Clears search when clicking on a notebook. (#1504)
* Fixes #1186, #1354. Clears search when clicking on a notebook.

* use new resetSearch method where possible, replaced tabs with spaces

* replaced a couple more spaces with tabs
2019-05-24 08:13:01 +01:00
Helmut K. C. Tessarek
485b4baebb Update de_DE.po 2019-05-23 23:40:42 -04:00
Laurent Cozic
5590d887c9 Doc: Added note history info 2019-05-24 00:21:15 +01:00
Laurent Cozic
d00bfa997e Doc: Fixed more links 2019-05-22 16:57:45 +01:00
Laurent Cozic
1a8590e9b9 Update website 2019-05-22 16:49:57 +01:00
Laurent Cozic
5a978977df Fix Iran flag 2019-05-22 16:49:32 +01:00
Laurent Cozic
5d763c7e6c All: Remove tags from Welcome item due to issue with cleaning them up afterwards 2019-05-22 16:38:53 +01:00
Laurent Cozic
050b089e72 Update translations 2019-05-22 16:34:59 +01:00
Helmut K. C. Tessarek
733ea4027c Doc: use new forum link (#1545) 2019-05-22 16:20:10 +01:00
Helmut K. C. Tessarek
10500c78b1 All: Fix: Default sort order for notebooks should be title and ascending (#1541) 2019-05-22 16:18:16 +01:00
Caleb John
0040cc02a2 Only delete the .desktop file if it will be replaced by the script (#1537) 2019-05-22 16:16:41 +01:00
Luis Orozco
74afd20f0c Desktop: Fixes #1426: added backticks to auto-wrapping quotes. (#1534) 2019-05-22 16:16:03 +01:00
Luis Orozco
dc9bde2184 Github: updated Contributing.md (#1533)
* updated Contributing.md

- Added several guidelines
- Moved some rules to bulleted lists (for quicker reading).

* Replace links to old forum domain to new domain. Removed a word.
2019-05-22 16:14:59 +01:00
Mehrad Mahmoudian
5243ea7eb2 All: New: Added Persian translation (#1539)
* [init] the first version of the fa.po file

Providing translation for Persian language

* [fix] moved the fa.po file into correct path
2019-05-22 16:05:25 +01:00
水货
7d93492658 Update zh_CN.po (#1524) 2019-05-22 15:57:20 +01:00
Helmut K. C. Tessarek
c6b56345f5 add /%d to Fetching resources: %d (#1532) 2019-05-22 15:56:25 +01:00
Laurent Cozic
8a6fe20a69 All: Resolves #1481: New: Allow downloading attachments on demand or automatically (#1527)
* Allow downloading resources automatically, on demand, or when loading note

* Make needToBeFetched calls to return the right number of resources

* All: Improved handling of resource downloading and decryption

* Desktop: Click on resource to download it (and, optionally, to decrypt it)

* Desktop: Better handling of resource state (not downloaded, downloading, encrypted) in front end

* Renamed setting to sync.resourceDownloadMode

* Download resources when changing setting

* tweaks

* removed duplicate cs

* Better report resource download progress

* Make sure resource cache is properly cleared when needed

* Also handle manual download for non-image resources

* More improvements to logic when downloading and decrypting resources
2019-05-22 15:56:07 +01:00
Laurent Cozic
6bcbedd6a4 CLI v1.0.137 2019-05-19 12:05:02 +01:00
Laurent Cozic
4c935b78f9 Removed log statement 2019-05-19 12:04:09 +01:00
Laurent Cozic
94cddda6d0 Removed temp files 2019-05-19 11:22:00 +01:00
Laurent Cozic
1924ea062c CLI v1.0.136 2019-05-19 11:20:17 +01:00
Laurent Cozic
07e88b2eeb All: Handle missing resource blob when setting resource size 2019-05-19 11:18:44 +01:00
Laurent Cozic
e4a08c29d7 Desktop, Mobile: Improved: Gray out checkboxes that have been ticked inside notes 2019-05-17 22:41:30 +01:00
Laurent Cozic
d60afcaabe Fixed merge 2019-05-16 17:36:02 +00:00
Laurent Cozic
1a091460ca All: Fixed: Prevent app from trying to upload resource it has not downloaded yet 2019-05-16 17:34:16 +00:00
Laurent Cozic
8ebaa7f6eb All: Put back "Fetched items" message during sync 2019-05-15 08:14:36 +01:00
Laurent Cozic
e2a64e21a2 Electron release v1.0.153 2019-05-14 22:23:47 +01:00
Laurent Cozic
78ddd22f09 Log more revision information to allow debugging issues 2019-05-14 22:23:34 +01:00
Laurent Cozic
c546b7076a Fixed doc 2019-05-14 22:02:47 +01:00
Laurent Cozic
0e2bb5d784 Desktop: Improved: When opening a note using Goto Anything, open all its parent notebooks too 2019-05-14 00:11:27 +01:00
Laurent Cozic
5c069c38f5 CLI v1.0.135 2019-05-13 23:59:27 +01:00
Laurent Cozic
451b9c0ae9 CLI v1.0.133 2019-05-13 23:55:53 +01:00
Laurent Cozic
047897621a Fix CLI build script 2019-05-13 23:52:12 +01:00
Laurent Cozic
52e5cec585 Update website 2019-05-13 23:41:31 +01:00
Laurent Cozic
bc98b65efa Update website 2019-05-13 23:23:57 +01:00
Laurent Cozic
9250e77862 Added link to CLI changelog 2019-05-13 23:23:42 +01:00
Laurent Cozic
cd69e71945 Forgot to publish in publish script 2019-05-13 23:20:25 +01:00
Laurent Cozic
e705e6e990 CLI v1.0.129 2019-05-13 23:18:57 +01:00
Laurent Cozic
4638f11c5e Created CLI release script with changelog auto-generation 2019-05-13 23:18:44 +01:00
164 changed files with 6588 additions and 1177 deletions

5
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
# These are supported funding model platforms
github: laurent22
patreon: joplin
custom: https://joplinapp.org/donate/

View File

@@ -59,6 +59,8 @@ If node-gyp does not works (MSBUILD: error MSB3428: Could not load the Visual C+
If `yarn dist` fails, it may need administrative rights.
If you get an `error MSB8020: The build tools for v140 cannot be found.` try to run with a different toolset version, eg `npm install --toolset=v141` (See [here](https://github.com/mapbox/node-sqlite3/issues/1124) for more info).
The [building\_win32\_tips on this page](./readme/building_win32_tips.md) might be helpful.
# Building the Mobile application

View File

@@ -1,26 +1,42 @@
# User support
For general discussion about Joplin, user support, software development questions, and to discuss new features, please go to the [Joplin Forum](https://discourse.joplin.cozic.net/). It is possible to login with your GitHub account.
The [Joplin Forum](https://discourse.joplinapp.org/) is the community driven place for user support, general discussion about Joplin, problems with installation, new features and software development questions. It is possible to login with your GitHub account.
# Reporting a bug
Please check first that it [has not already been reported](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). Also consider [enabling debug mode](https://github.com/laurent22/joplin/blob/master/readme/debugging.md) before reporting the issue so that you can provide as much details as possible to help fix it.
File bugs in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). Please follow these guidelines:
If possible, **please provide a screenshot**. A screenshot showing the problem is often more useful than a paragraph describing it as it can make it immediately clear what the issue is.
- Search existing issues first, make sure yours hasn't already been reported.
- Don't use the issue tracker for support questions.
- Consider [enabling debug mode](https://github.com/laurent22/joplin/blob/master/readme/debugging.md) so that you can provide as much details as possible when reporting the issue.
- Stay on topic, but describe the issue in detail so that others can reproduce it.
- **Provide a screenshot** if possible. A screenshot showing the problem is often more useful than a paragraph describing it.
# Feature requests
Again, please check that it has not already been requested. If it has, simply **up-vote the issue** - the ones with the most up-votes are likely to be implemented. "+1" comments are not tracked.
Please check that your request has not already been posted in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). If it has, **up-voting the issue** increases the chances it'll be noticed and implemented in the future. "+1" comments are not tracked.
# Creating a pull request
As a general rule, suggestions to _improve Joplin_ should be posted first in the [Joplin Forum](https://discourse.joplinapp.org/) for discussion.
- 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. 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 spend too much time implementing something that might not be accepted.
Avoid listing multiple requests in one report in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). One issue per request makes it easier to track and discuss it.
- Bug fixes are always welcome.
# Contribute to the project
## Contributing to Joplin's translation
Joplin is available in multiple languages thanks to the help of its users. You can help translate Joplin to your language or keep it up to date. Please read the documentation about [Localisation](https://github.com/laurent22/joplin#localisation).
## Contributing to Joplin's code
If you want to start contributing to the project's code, please follow these guidelines before creating a pull request:
- Bug fixes are always welcome. Start by reviewing the list of [essential issues](https://github.com/laurent22/joplin/issues?q=is%3Aissue+is%3Aopen+label%3Aessential)
- Before adding a new feature, ask about it in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue) or the [Joplin Forum](https://discourse.joplinapp.org/), or check if existing discussions exist to make sure the new functionality is desired.
- **Changes that will consist in more than 50 lines of code should be discussed the [Joplin Forum](https://discourse.joplinapp.org/)**, so that you don't spend too much time implementing something that might not be accepted.
Building the apps is relatively easy - please [see the build instructions](https://github.com/laurent22/joplin/blob/master/BUILD.md) for more details.
# Coding style
## Coding style
There are only two rules, but not following them means the pull request will not be accepted (it can be accepted once the issues are fixed):

View File

@@ -1154,8 +1154,8 @@ msgid "Decrypting items: %d/%d"
msgstr "فك تشفير العناصر: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "جلب الموارد: %d"
msgid "Fetching resources: %d/%d"
msgstr "جلب الموارد: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "فضلاً اختر أين سيتم تصدير حالة المزامنة"
@@ -1526,6 +1526,24 @@ msgstr ""
"الوجهة المستهدفة المزامنة إليها. كل وجهة مزامنة مستهدفة قد يكون لها معلمات "
"إضافية تكون مسماة بـ `sync.NUM.NAME` (جميعها موثقة أدناه)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "الدليل الذي تتم المزامنة معه (المسار المطلق)"

View File

@@ -1191,11 +1191,11 @@ msgstr "Blocs de notes"
#, fuzzy, javascript-format
msgid "Decrypting items: %d/%d"
msgstr "Elements obtinguts: %d/%d."
msgstr "Elements obtinguts: %d/%d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "Recursos: %d."
msgid "Fetching resources: %d/%d"
msgstr "Recursos: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "Seleccioneu on s'hauria d'exportar l'estat de la sincronització"
@@ -1569,6 +1569,24 @@ msgstr ""
"L'objectiu on se sincronitzarà. Cada objectiu pot tenir paràmetres "
"addicionals que s'anomenen com a «sync.NUM.NAME» (es documenten a sota)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Directori on es farà la sincronització (camí absolut)"

View File

@@ -1167,8 +1167,8 @@ msgid "Decrypting items: %d/%d"
msgstr "Rozšifrované položky: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "Stahování zdrojů: %d"
msgid "Fetching resources: %d/%d"
msgstr "Stahování zdrojů: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "Prosím vyberte, kam má být stav synchronizace exportován"
@@ -1544,6 +1544,24 @@ msgstr ""
"Cíl synchronizace. Každý cíl může mít další parametry ve formátu `sync.NUM."
"NAME` (dokumentace níže)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Složka k synchronizaci (absolutní cesta)"

View File

@@ -1167,11 +1167,11 @@ msgstr "Notesbøger"
#, fuzzy, javascript-format
msgid "Decrypting items: %d/%d"
msgstr "Hentede emner: %d/%d."
msgstr "Hentede emner: %d/%d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "Ressourcer: %d."
msgid "Fetching resources: %d/%d"
msgstr "Ressourcer: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "Vælg hvor sync status skal eksporteres til"
@@ -1551,6 +1551,24 @@ msgstr ""
"Synkroniserings mål. Hver synk. mål kan have ekstra parametre som navngives "
"som `sync.NUM.NAME` (se dokumentation herunder)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Mappe der skal synkroniseres med (absolut sti)"

View File

@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.1\n"
"X-Generator: Poedit 2.2.3\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "To delete a tag, untag the associated notes."
@@ -675,7 +675,7 @@ msgid "Quit"
msgstr "Verlassen"
msgid "Close Window"
msgstr ""
msgstr "Fenster schließen"
msgid "&Edit"
msgstr "&Bearbeiten"
@@ -1021,12 +1021,11 @@ msgstr "Standort"
msgid "URL"
msgstr "URL"
#, fuzzy
msgid "Note History"
msgstr "Notizen-Liste"
msgstr "Notizen-Verlauf"
msgid "Previous versions of this note"
msgstr ""
msgstr "Vorherige Version von dieser Notiz"
msgid "Note properties"
msgstr "Notiz-Eigenschaften"
@@ -1034,19 +1033,22 @@ msgstr "Notiz-Eigenschaften"
#, javascript-format
msgid "The note \"%s\" has been successfully restored to the notebook \"%s\"."
msgstr ""
"Die Notiz \"%s\" wurde erfolgreich wiederhergestellt und ist im Notizbuch "
"\"%s\" verfügbar."
#, fuzzy
msgid "This note has no history"
msgstr "Diese Notiz wurde verändert:"
msgstr "Diese Notiz hat keinen Verlauf"
msgid "Restore"
msgstr ""
msgstr "Wiederherstellen"
#, javascript-format
msgid ""
"Click \"%s\" to restore the note. It will be copied in the notebook named "
"\"%s\". The current version of the note will not be replaced or modified."
msgstr ""
"Klicke \"%s\" um die Notiz wiederherzustellen. Sie wird in das Notizbuch \"%s"
"\" kopiert. Die aktuelle Version der Notiz wird nicht ersetzt oder verändert."
msgid "Open..."
msgstr "Öffne..."
@@ -1200,8 +1202,8 @@ msgid "Decrypting items: %d/%d"
msgstr "Entschlüsselte Objekte: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "Ressourcen abrufen: %d"
msgid "Fetching resources: %d/%d"
msgstr "Ressourcen abrufen: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr ""
@@ -1361,7 +1363,7 @@ msgstr "Synchronisation ist bereits im Gange. Status: %s"
msgid ""
"Unknown item type downloaded - please upgrade Joplin to the latest version"
msgstr ""
msgstr "Unbekannter Eintrags-Typ heruntergeladen - bitte aktualisiere Joplin"
msgid "Encrypted"
msgstr "Verschlüsselt"
@@ -1578,6 +1580,28 @@ msgstr ""
"kann zusätzliche Parameter haben, die als `sync.NUM.NAME` (alle unten "
"dokumentiert) bezeichnet werden."
msgid "Attachment download behaviour"
msgstr "Verhalten für das Herunterladen von Anhängen"
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
"Im \"Manuell\" Modus werden die Anhänge nur heruntergeladen wenn Du auf sie "
"klickst. Bei \"Automatisch\" werden sie heruntergeladen sobald die Notiz "
"geöffnet wird. Bei \"Immer\" werden die Anhänge heruntergeladen egal ob die "
"Notiz geöffnet wird oder nicht."
msgid "Always"
msgstr "Immer"
msgid "Manual"
msgstr "Manuell"
msgid "Auto"
msgstr "Automatisch"
msgid "Directory to synchronise with (absolute path)"
msgstr "Verzeichnis mit dem synchronisiert werden soll (absoluter Pfad)"
@@ -1617,19 +1641,18 @@ msgstr ""
msgid "Ignore TLS certificate errors"
msgstr "Ignoriere TLS-Zertifikatfehler"
#, fuzzy
msgid "Enable note history"
msgstr "Aktiviere Fußnoten"
msgstr "Aktiviere Notizen-Verlauf"
msgid "days"
msgstr ""
msgstr "Tage"
#, javascript-format
msgid "%d days"
msgstr ""
msgstr "%d Tage"
msgid "Keep note history for"
msgstr ""
msgstr "Speicher Notizen-Verlauf für"
#, javascript-format
msgid "Invalid option value: \"%s\". Possible values are: %s."
@@ -1704,18 +1727,18 @@ msgstr ""
"Bitte wähle aus, wohin der Synchronisations-Status exportiert werden soll."
msgid "Restored Notes"
msgstr ""
msgstr "Wiederhergestellte Notizen"
msgid "Items that cannot be synchronised"
msgstr "Objekte können nicht synchronisiert werden"
#, fuzzy, javascript-format
#, javascript-format
msgid "%s (%s) could not be uploaded: %s"
msgstr "Dieses Notizbuch konnte nicht geöffnet werden: %s"
msgstr "%s (%s) konnte nicht hochgeladen werden: %s"
#, fuzzy, javascript-format
#, javascript-format
msgid "Item \"%s\" could not be downloaded: %s"
msgstr "Dieses Notizbuch konnte nicht geöffnet werden: %s"
msgstr "Eintrag \"%s\" konnte nicht heruntergeladen werden: %s"
msgid ""
"These items will remain on the device but will not be uploaded to the sync "

View File

@@ -1068,7 +1068,7 @@ msgid "Decrypting items: %d/%d"
msgstr ""
#, javascript-format
msgid "Fetching resources: %d"
msgid "Fetching resources: %d/%d"
msgstr ""
msgid "Please select where the sync status should be exported to"
@@ -1420,6 +1420,24 @@ msgid ""
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr ""

View File

@@ -1086,7 +1086,7 @@ msgid "Decrypting items: %d/%d"
msgstr ""
#, javascript-format
msgid "Fetching resources: %d"
msgid "Fetching resources: %d/%d"
msgstr ""
msgid "Please select where the sync status should be exported to"
@@ -1445,6 +1445,24 @@ msgstr ""
"The target to synchonize to. Each sync target may have additional parameters "
"which are named as `sync.NUM.NAME` (all documented below)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Directory to synchronize with (absolute path)"

View File

@@ -1176,8 +1176,8 @@ msgid "Decrypting items: %d/%d"
msgstr "Descifrando elementos: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "Obteniendo refuersos: %d"
msgid "Fetching resources: %d/%d"
msgstr "Obteniendo refuersos: %d/%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"
@@ -1554,6 +1554,24 @@ msgstr ""
"tener parámetros adicionales los cuales son llamados como `sync.NUM.NAME` "
"(todos abajo documentados)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Directorio con el que sincronizarse (ruta completa)"

View File

@@ -1179,11 +1179,11 @@ msgstr "Koadernoak"
#, fuzzy, javascript-format
msgid "Decrypting items: %d/%d"
msgstr "Itemak eskuratuta: %d%d."
msgstr "Itemak eskuratuta: %d/%d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "Baliabideak: %d."
msgid "Fetching resources: %d/%d"
msgstr "Baliabideak: %d/%d"
#, fuzzy
msgid "Please select where the sync status should be exported to"
@@ -1568,6 +1568,24 @@ msgstr ""
"parametro gehigarriak, horrela izendatuta `sync.NUM.NAME` (dena beherago "
"dokumentatuta)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Sinkronizatzeko direktorioa (bide-izena osorik)"

1837
CliClient/locales/fa.po Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -660,7 +660,7 @@ msgid "Quit"
msgstr "Quitter"
msgid "Close Window"
msgstr ""
msgstr "Fermer la fenêtre"
msgid "&Edit"
msgstr "&Édition"
@@ -1005,32 +1005,33 @@ msgstr "Lieu"
msgid "URL"
msgstr "URL"
#, fuzzy
msgid "Note History"
msgstr "Liste de notes"
msgstr "Historique des notes"
msgid "Previous versions of this note"
msgstr ""
msgstr "Versions précédentes de cette note"
msgid "Note properties"
msgstr "Propriétés de la note"
#, javascript-format
msgid "The note \"%s\" has been successfully restored to the notebook \"%s\"."
msgstr ""
msgstr "La note \"%s\" a été restaurée dans le carnet \"%s\"."
#, fuzzy
msgid "This note has no history"
msgstr "Cette note a été modifiée :"
msgstr "Cette note n'a pas d'historique"
msgid "Restore"
msgstr ""
msgstr "Restaurer"
#, javascript-format
msgid ""
"Click \"%s\" to restore the note. It will be copied in the notebook named "
"\"%s\". The current version of the note will not be replaced or modified."
msgstr ""
"Cliquez sur \"%s\" pour restaurer cette note. Elle sera copiée dans le "
"carnet \"%s\". La version actuelle de la note ne sera pas replacée ou "
"modifiée."
msgid "Open..."
msgstr "Ouvrir..."
@@ -1185,8 +1186,8 @@ msgid "Decrypting items: %d/%d"
msgstr "Déchiffrement des objets : %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "Tél. ressources : %d"
msgid "Fetching resources: %d/%d"
msgstr "Tél. ressources : %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr ""
@@ -1346,7 +1347,7 @@ msgstr "La synchronisation est déjà en cours. État : %s"
msgid ""
"Unknown item type downloaded - please upgrade Joplin to the latest version"
msgstr ""
msgstr "Objet inconnu téléchargé - veuillez mettre Joplin à jour"
msgid "Encrypted"
msgstr "Chiffré"
@@ -1562,6 +1563,28 @@ msgstr ""
"avoir des paramètres supplémentaires sous le nom `sync.NUM.NOM` (documentés "
"ci-dessous)."
msgid "Attachment download behaviour"
msgstr "Téléchargement des ressources"
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
"En mode \"manuel\", les ressources sont téléchargées uniquement lorsque vous "
"cliquez dessus. En mode \"auto\", elle sont téléchargée lorsque vous ouvrez "
"la note. En mode \"toujours\", toutes les ressources sont téléchargées, que "
"vous ayez ouvert la note ou pas."
msgid "Always"
msgstr "Toujours"
msgid "Manual"
msgstr "Manuel"
msgid "Auto"
msgstr "Auto"
msgid "Directory to synchronise with (absolute path)"
msgstr "Répertoire avec lequel synchroniser (chemin absolu)"
@@ -1601,19 +1624,18 @@ msgstr ""
msgid "Ignore TLS certificate errors"
msgstr "Ignorer les erreurs de certificats TLS"
#, fuzzy
msgid "Enable note history"
msgstr "Activer les notes de bas de page"
msgstr "Activer l'historique des notes"
msgid "days"
msgstr ""
msgstr "jours"
#, javascript-format
msgid "%d days"
msgstr ""
msgstr "%d jours"
msgid "Keep note history for"
msgstr ""
msgstr "Garder l'historique des notes pour"
#, javascript-format
msgid "Invalid option value: \"%s\". Possible values are: %s."
@@ -1685,18 +1707,18 @@ msgid "Please specify the notebook where the notes should be imported to."
msgstr "Veuillez sélectionner le carnet où les notes doivent être importées."
msgid "Restored Notes"
msgstr ""
msgstr "Notes restaurées"
msgid "Items that cannot be synchronised"
msgstr "Objets qui ne peuvent pas être synchronisés"
#, fuzzy, javascript-format
#, javascript-format
msgid "%s (%s) could not be uploaded: %s"
msgstr "Ce fichier n'a pas pu être ouvert : %s"
msgstr "%s (%s) n'a pas pu être envoyé : %s"
#, fuzzy, javascript-format
#, javascript-format
msgid "Item \"%s\" could not be downloaded: %s"
msgstr "Ce fichier n'a pas pu être ouvert : %s"
msgstr "L'objet \"%s\" n'a pas pu être téléchargé : %s"
msgid ""
"These items will remain on the device but will not be uploaded to the sync "

View File

@@ -1167,11 +1167,11 @@ msgstr "Cadernos"
#, fuzzy, javascript-format
msgid "Decrypting items: %d/%d"
msgstr "Elementos obtidos: %d/%d."
msgstr "Elementos obtidos: %d/%d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "Recursos: %d."
msgid "Fetching resources: %d/%d"
msgstr "Recursos: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "Seleccione onde exportar o estado da sincronización"
@@ -1551,6 +1551,24 @@ msgstr ""
"Destino co que sincronizar. Cada destino da sincronización pode ter "
"parámetros adicionais que se chaman «sync.NUM.NAME» (documentados arriba)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Cartafol a sincronizar con (ruta absoluta)"

View File

@@ -1166,11 +1166,11 @@ msgstr "Bilježnice"
#, fuzzy, javascript-format
msgid "Decrypting items: %d/%d"
msgstr "Stvorene lokalne stavke: %d."
msgstr "Stvorene lokalne stavke: %d/%d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "Resursi: %d."
msgid "Fetching resources: %d/%d"
msgstr "Resursi: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "Odaberi lokaciju za izvoz statusa sinkronizacije"
@@ -1547,6 +1547,24 @@ msgid ""
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Direktorij za sinkroniziranje (apsolutna putanja)"

View File

@@ -1192,8 +1192,8 @@ msgid "Decrypting items: %d/%d"
msgstr "Decrittografia Elementi: %d/%d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "Risorse: %d."
msgid "Fetching resources: %d/%d"
msgstr "Risorse: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr ""
@@ -1565,6 +1565,24 @@ msgstr ""
"Ogni target di sincronizzazione può avere parametri aggiuntivi denominati "
"come `sync.NUM.NAME` (tutti documentati di seguito)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Cartella da sincronizzare con (percorso assoluto)"

View File

@@ -1169,8 +1169,8 @@ msgid "Decrypting items: %d/%d"
msgstr "復号中のアイテム: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "取得中のリソース: %d"
msgid "Fetching resources: %d/%d"
msgstr "取得中のリソース: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "同期状況の出力先を選択してください"
@@ -1544,6 +1544,24 @@ msgstr ""
"同期する先です。いずれの同期先も `sync.NUM.NAME` のように追加のパラメーターを"
"持つことができるでしょう(すべてのドキュメントは下にあります)。"
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "同期先のディレクトリ(絶対パス)"

View File

@@ -1068,7 +1068,7 @@ msgid "Decrypting items: %d/%d"
msgstr ""
#, javascript-format
msgid "Fetching resources: %d"
msgid "Fetching resources: %d/%d"
msgstr ""
msgid "Please select where the sync status should be exported to"
@@ -1420,6 +1420,24 @@ msgid ""
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr ""

View File

@@ -1163,8 +1163,8 @@ msgid "Decrypting items: %d/%d"
msgstr "복호화 항목: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "리소스 가져오는 중: %d."
msgid "Fetching resources: %d/%d"
msgstr "리소스 가져오는 중: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "동기화 상태를 내보낼 대상을 선택하세요"
@@ -1536,6 +1536,24 @@ msgstr ""
"동기화를 할 대상을 선택합니다. 각각의 동기화 대상은 `sync.NUM.NAME` 형식으로 "
"된 추가적인 매개 변수를 포함할 수 있습니다(아래에 문서화되어 있습니다)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "동기화를 할 폴더 (절대적 경로)"

View File

@@ -1168,7 +1168,7 @@ msgid "Decrypting items: %d/%d"
msgstr "Dekrypterer elementer: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgid "Fetching resources: %d/%d"
msgstr "Henter ressurser: %d"
msgid "Please select where the sync status should be exported to"
@@ -1545,6 +1545,24 @@ msgstr ""
"Målet å synkronisere til. Hvert synkroniseringsmål kan ha tilleggsparametere "
"som er navngitt som `sync.NUM.NAME` (dokumentert nedenfor)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Katalog å synkronisere med (absolutt sti)"

View File

@@ -1184,11 +1184,11 @@ msgstr "Notitieboeken"
#, fuzzy, javascript-format
msgid "Decrypting items: %d/%d"
msgstr "Opgehaalde items: %d/%d."
msgstr "Opgehaalde items: %d/%d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "Middelen: %d."
msgid "Fetching resources: %d/%d"
msgstr "Middelen: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "Selecteer waar de synchronisatie status naar geëxporteerd moet worden"
@@ -1570,6 +1570,24 @@ msgid ""
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Folder om mee te synchroniseren (absolute pad)"

View File

@@ -1192,8 +1192,8 @@ msgid "Decrypting items: %d/%d"
msgstr "Bezig met ontsleutelen van items: %d/%d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "Bronnen: %d."
msgid "Fetching resources: %d/%d"
msgstr "Bronnen: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "Kies waar de synchronisatiestatus naar moet worden geëxporteerd"
@@ -1566,6 +1566,24 @@ msgstr ""
"argumenten bevatten, welke `sync.NUM.NAME` worden genoemd (wordt hieronder "
"uitgelegd)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Map waarnaar gesynchroniseerd moet worden (absoluut pad)"

2004
CliClient/locales/pl_PL.po Normal file

File diff suppressed because it is too large Load Diff

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.2.1\n"
"X-Generator: Poedit 2.0.7\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid "To delete a tag, untag the associated notes."
@@ -124,13 +124,12 @@ 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`, `decrypt-file` and `target-status`."
msgstr ""
"Gerencia a configuração E2EE. Os comandos são `enable`, `disable`, "
"`decrypt`, `status` e `target-status`."
"`decrypt`, `status`, `decrypt-file` e `target-status`."
msgid "Enter master password:"
msgstr "Entre a senha master:"
@@ -584,18 +583,16 @@ msgid "Exporting to \"%s\" as \"%s\" format. Please wait..."
msgstr "Exportando para \"%s\" com o formato \"%s\". Por favor, aguarde..."
msgid "Sidebar"
msgstr ""
msgstr "Barra Lateral"
msgid "Note list"
msgstr ""
msgstr "Lista de notas"
#, fuzzy
msgid "Note title"
msgstr "Título do caderno:"
msgstr "Título da Nota:"
#, fuzzy
msgid "Note body"
msgstr "Cadernos"
msgstr "Corpo da Nota"
#, javascript-format
msgid "Importing from \"%s\" as \"%s\" format. Please wait..."
@@ -632,15 +629,14 @@ msgstr "Opções do Web clipper"
msgid "%s %s (%s, %s)"
msgstr "%s %s (%s, %s)"
#, fuzzy
msgid "&File"
msgstr "Arquivo"
msgstr "&Arquivo"
msgid "About Joplin"
msgstr "Sobre o Joplin"
msgid "Preferences..."
msgstr ""
msgstr "Preferências..."
msgid "Check for updates..."
msgstr "Verificar atualizações..."
@@ -662,11 +658,10 @@ msgid "Quit"
msgstr "Sair"
msgid "Close Window"
msgstr ""
msgstr "Fechar Janela"
#, fuzzy
msgid "&Edit"
msgstr "Editar"
msgstr "&Editar"
msgid "Copy"
msgstr "Copiar"
@@ -687,7 +682,7 @@ msgid "Italic"
msgstr "Itálico"
msgid "Link"
msgstr ""
msgstr "Link"
msgid "Insert Date Time"
msgstr "Inserir Data e Hora"
@@ -701,9 +696,8 @@ msgstr "Pesquisar em todas as notas"
msgid "Search in current note"
msgstr "Pesquisar na nota atual"
#, fuzzy
msgid "&View"
msgstr "Visualizar"
msgstr "&Visualizar"
msgid "Toggle sidebar"
msgstr "Alternar barra lateral"
@@ -711,17 +705,14 @@ msgstr "Alternar barra lateral"
msgid "Toggle editor layout"
msgstr "Alternar layout do editor"
#, fuzzy
msgid "Focus"
msgstr "Focar no corpo"
msgstr "Focar"
#, fuzzy
msgid "&Tools"
msgstr "Ferramentas"
msgstr "&Ferramentas"
#, fuzzy
msgid "&Help"
msgstr "Ajuda"
msgstr "&Ajuda"
msgid "Website and documentation"
msgstr "Website e documentação"
@@ -747,18 +738,18 @@ msgstr "A versão atual está atualizada."
#, javascript-format
msgid "%s (pre-release)"
msgstr ""
msgstr "%s (pre-release)"
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: %s"
msgstr ""
msgstr "Sua versão: %s"
#, javascript-format
msgid "New version: %s"
msgstr ""
msgstr "Nova versão: %s"
msgid "Yes"
msgstr "Sim"
@@ -842,7 +833,7 @@ msgid "Check synchronisation configuration"
msgstr "Verificar a configuração da sincronização"
msgid "Browse..."
msgstr ""
msgstr "Navegar..."
msgid "Apply"
msgstr "Aplicar"
@@ -937,9 +928,8 @@ msgstr "Status"
msgid "Encryption is:"
msgstr "Encriptação está:"
#, fuzzy
msgid "Usage"
msgstr "Uso: %s"
msgstr "Uso"
msgid "Back"
msgstr "Voltar"
@@ -1005,32 +995,32 @@ msgstr "Localização"
msgid "URL"
msgstr "URL"
#, fuzzy
msgid "Note History"
msgstr "Cadernos"
msgstr "Histórico da Nota"
msgid "Previous versions of this note"
msgstr ""
msgstr "Versões anteriores desta nota"
msgid "Note properties"
msgstr "Propriedades da nota"
#, javascript-format
msgid "The note \"%s\" has been successfully restored to the notebook \"%s\"."
msgstr ""
msgstr "A nota \"%s\" foi restaurada com sucesso no caderno \"%s\"."
#, fuzzy
msgid "This note has no history"
msgstr "Esta nota foi modificada:"
msgstr "Esta nota não tem histórico"
msgid "Restore"
msgstr ""
msgstr "Restaurar"
#, javascript-format
msgid ""
"Click \"%s\" to restore the note. It will be copied in the notebook named "
"\"%s\". The current version of the note will not be replaced or modified."
msgstr ""
"Clique \"%s\" para restaurar a nota. Ela será copiada no caderno com nomes "
"\"%s\". A versão atual da nota não será substituída ou modificada."
msgid "Open..."
msgstr "Abrir..."
@@ -1064,7 +1054,7 @@ msgstr ""
"e edite a nota."
msgid "Only one note can be printed or exported to PDF at a time."
msgstr ""
msgstr "Só uma nota pode ser impressa ou exportada para PDF de cada vez."
msgid "strong text"
msgstr "texto forte"
@@ -1152,18 +1142,19 @@ msgstr "Opções de Encriptação"
msgid "Clipper Options"
msgstr "Opções do clipper"
#, fuzzy, javascript-format
#, javascript-format
msgid ""
"Delete notebook \"%s\"?\n"
"\n"
"All notes and sub-notebooks within this notebook will also be deleted."
msgstr ""
"Excluir o caderno? Todas as notas e sub-cadernos dentro deste também serão "
"excluídas."
"Excluir o caderno\"%s\"?\n"
"\n"
"Todas as notas e sub-cadernos dentro deste também serão excluídos."
#, fuzzy, javascript-format
#, javascript-format
msgid "Remove tag \"%s\" from all notes?"
msgstr "Remover esta tag de todas as notas?"
msgstr "Remover a tag \"%s\" de todas as notas?"
msgid "Remove this search from the sidebar?"
msgstr "Remover essa pesquisa da barra lateral?"
@@ -1181,8 +1172,8 @@ msgstr "Cadernos"
msgid "Decrypting items: %d/%d"
msgstr "Decriptando itens: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d/%d"
msgstr "Buscando recursos: %d"
msgid "Please select where the sync status should be exported to"
@@ -1212,21 +1203,23 @@ msgstr "Alternar para o tipo Tarefa"
msgid "Copy Markdown link"
msgstr "Copiar link de Markdown"
#, fuzzy, javascript-format
#, javascript-format
msgid "Delete note \"%s\"?"
msgstr "Apagar o caderno \"%s\"?"
msgstr "Apagar a nota \"%s\"?"
#, fuzzy, javascript-format
#, javascript-format
msgid "Delete these %d notes?"
msgstr "Excluir estas notas?"
msgstr "Excluir estas %d notas?"
msgid ""
"Type a note title to jump to it. Or type # followed by a tag name, or @ "
"followed by a notebook name."
msgstr ""
"Digite um título de nota para pular pra ela. Ou digite # seguido por um nome "
"de tag, ou @ seguido por um nome de caderno."
msgid "Goto Anything..."
msgstr ""
msgstr "Ir para qualquer coisa..."
#, javascript-format
msgid "Usage: %s"
@@ -1343,6 +1336,8 @@ msgstr "Sincronização já em andamento. Estado: %s"
msgid ""
"Unknown item type downloaded - please upgrade Joplin to the latest version"
msgstr ""
"Tipo de item desconhecido baixado - por favor, atualize o Joplin para a "
"última versão"
msgid "Encrypted"
msgstr "Encriptado"
@@ -1421,7 +1416,6 @@ msgstr "Ordenar notas por"
msgid "Reverse sort order"
msgstr "Inverter ordem de classificação"
#, fuzzy
msgid "Sort notebooks by"
msgstr "Ordenar notas por"
@@ -1441,41 +1435,40 @@ msgid "When creating a new note:"
msgstr "Quando criar uma nota nova:"
msgid "Enable soft breaks"
msgstr ""
msgstr "Habilitar soft breaks"
#, fuzzy
msgid "Enable math expressions"
msgstr "Habilitar encriptação"
msgstr "Habilitar expressões matemáticas"
msgid "Enable ==mark== syntax"
msgstr ""
msgstr "Habilitar sintaxe ==marcador== "
msgid "Enable footnotes"
msgstr ""
msgstr "Habilitar notas de rodapé"
msgid "Enable table of contents extension"
msgstr ""
msgstr "Habilitar extensão de tabela de conteúdo"
msgid "Enable ~sub~ syntax"
msgstr ""
msgstr "Habilitar sintaxe ~sub~"
msgid "Enable ^sup^ syntax"
msgstr ""
msgstr "Habilitar sintaxe ^sup^ "
msgid "Enable deflist syntax"
msgstr ""
msgstr "Habilitar sintaxe de deflist "
msgid "Enable abbreviation syntax"
msgstr ""
msgstr "Habilitar sintaxe de abreviações"
msgid "Enable markdown emoji"
msgstr ""
msgstr "Habilitar emojis em markdown "
msgid "Enable ++insert++ syntax"
msgstr ""
msgstr "Habilitar sintaxe ++inserir++ "
msgid "Enable multimarkdown table extension"
msgstr ""
msgstr "Habilitar extensão de tabela de multimarkdown "
msgid "Show tray icon"
msgstr "Exibir tray icon"
@@ -1515,11 +1508,11 @@ msgid "Automatically update the application"
msgstr "Atualizar automaticamente o aplicativo"
msgid "Get pre-releases when checking for updates"
msgstr ""
msgstr "Obter pre-releases quando for checar atualizações"
#, javascript-format
msgid "See the pre-release page for more details: %s"
msgstr ""
msgstr "Ver página de pre-release para mais detalhes: %s"
msgid "Synchronisation interval"
msgstr "Intervalo de sincronização"
@@ -1560,6 +1553,24 @@ msgstr ""
"O alvo para onde sincronizar. Cada alvo pode ter parâmetros adicionais que "
"são nomeados como `sync.NUM.NAME` (todos documentados abaixo)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Diretório para sincronizar (caminho absoluto)"
@@ -1599,45 +1610,40 @@ msgstr ""
msgid "Ignore TLS certificate errors"
msgstr "Ignorar erros de certificados TLS"
#, fuzzy
msgid "Enable note history"
msgstr "Habilitar encriptação"
msgstr "Habilitar histórico de notas"
msgid "days"
msgstr ""
msgstr "dias"
#, javascript-format
msgid "%d days"
msgstr ""
msgstr "%d dias"
msgid "Keep note history for"
msgstr ""
msgstr "Manter histórico de nota por"
#, javascript-format
msgid "Invalid option value: \"%s\". Possible values are: %s."
msgstr "Valor da opção inválida: \"%s\". Os valores possíveis são: %s."
#, fuzzy
msgid "General"
msgstr "Opções Gerais"
msgstr "Geral"
#, fuzzy
msgid "Synchronisation"
msgstr "Status de sincronização"
msgstr "Sincronização"
msgid "Appearance"
msgstr ""
msgstr "Aparência"
#, fuzzy
msgid "Note"
msgstr "Cadernos"
msgstr "Nota"
msgid "Plugins"
msgstr ""
msgstr "Plugins"
#, fuzzy
msgid "Application"
msgstr "Localização"
msgstr "Aplicação"
#, javascript-format
msgid "The tag \"%s\" already exists. Please choose a different name."
@@ -1688,18 +1694,18 @@ msgstr ""
"Por favor, especifique o caderno para onde as notas deveriam ser importadas."
msgid "Restored Notes"
msgstr ""
msgstr "Notas restauradas"
msgid "Items that cannot be synchronised"
msgstr "Os itens não podem ser sincronizados"
#, fuzzy, javascript-format
#, javascript-format
msgid "%s (%s) could not be uploaded: %s"
msgstr "Este arquivo não pôde ser aberto: %s"
msgstr "%s (%s) não pôde ser enviado: %s"
#, fuzzy, javascript-format
#, javascript-format
msgid "Item \"%s\" could not be downloaded: %s"
msgstr "Este arquivo não pôde ser aberto: %s"
msgstr "Item \"%s\" não pôde ser baixado: %s"
msgid ""
"These items will remain on the device but will not be uploaded to the sync "
@@ -1861,18 +1867,17 @@ msgstr "Site do Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
msgstr "Banco de dados v%s"
#, fuzzy, javascript-format
#, javascript-format
msgid "FTS enabled: %d"
msgstr "Para excluir: %d"
msgstr "FTS habilitado: %d"
msgid "Login with Dropbox"
msgstr "Login com Dropbox"
#, fuzzy
msgid "Enter code here"
msgstr "Entrar no modo de linha de comando"
msgstr "Entre o código aqui"
#, javascript-format
msgid "Master Key %s"

View File

@@ -1094,8 +1094,8 @@ msgid "Decrypting items: %d/%d"
msgstr "Se decriptează itemi: %d/%d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "Resurse: %d."
msgid "Fetching resources: %d/%d"
msgstr "Resurse: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr ""
@@ -1452,6 +1452,24 @@ msgid ""
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr ""

View File

@@ -1180,8 +1180,8 @@ msgid "Decrypting items: %d/%d"
msgstr "Расшифровано элементов: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "Получение ресурсов: %d"
msgid "Fetching resources: %d/%d"
msgstr "Получение ресурсов: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr ""
@@ -1558,6 +1558,24 @@ msgstr ""
"Цель синхронизации. Каждая цель синхронизации может иметь дополнительные "
"параметры, именованные как `sync.NUM.NAME` (все документировано ниже)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Каталог синхронизации (абсолютный путь)"

View File

@@ -1182,11 +1182,11 @@ msgstr "Beležnice"
#, fuzzy, javascript-format
msgid "Decrypting items: %d/%d"
msgstr "Preneseni predmeti: %d/%d."
msgstr "Preneseni predmeti: %d/%d"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "Viri: %d."
msgid "Fetching resources: %d/%d"
msgstr "Viri: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "Prosim izberite, kam želite izvoziti sinhronizacijski status"
@@ -1566,6 +1566,24 @@ msgstr ""
"Ciljno sinhronizacijsko mesto. Vsak sinhronizacijski cilj ima lahko dodatne "
"parametre imenovano kot `sync.NUM.NAME` (vse je dokumentirano spodaj)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Mesto ciljne sinhronizacije (absolutna pot)"

View File

@@ -1188,8 +1188,8 @@ msgid "Decrypting items: %d/%d"
msgstr "Dekrypterar objekt: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "Hämtar resurser: %d"
msgid "Fetching resources: %d/%d"
msgstr "Hämtar resurser: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "Välj vart synkroniseringstillståndet ska exporteras till"
@@ -1567,6 +1567,24 @@ msgstr ""
"Målet att synkronisera till. Varje synkroniseringsmål kan ha ytterligare "
"parametrar som heter `sync.NUM.NAME` (alla dokumenterade nedan)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Katalog för att synkronisera med (absolut sökväg)"

View File

@@ -1157,8 +1157,8 @@ msgid "Decrypting items: %d/%d"
msgstr "Şifresi çözülenler: %d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "Kaynaklar alınıyor: %d"
msgid "Fetching resources: %d/%d"
msgstr "Kaynaklar alınıyor: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "Lütfen senkronizasyon durumunun nereye aktarılacağını seçin"
@@ -1534,6 +1534,24 @@ msgstr ""
"Senkronize edilecek hedef. Her senkronizasyon hedefi, `sync.NUM.NAME` olarak "
"adlandırılan ek parametrelere sahip olabilir (tümü aşağıda belgelenmiştir)."
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "Eşitlenecek dizin (kesin yol)"

View File

@@ -47,7 +47,7 @@ msgid "y"
msgstr "是"
msgid "Cancelling background synchronisation... Please wait."
msgstr "正在取消后台同步... 请稍候。"
msgstr "正在取消后台同步……请稍候。"
#, javascript-format
msgid "No such command: %s"
@@ -601,7 +601,7 @@ msgid "About Joplin"
msgstr "关于 Joplin"
msgid "Preferences..."
msgstr ""
msgstr "偏好……"
msgid "Check for updates..."
msgstr "检查更新..."
@@ -623,7 +623,7 @@ msgid "Quit"
msgstr "退出"
msgid "Close Window"
msgstr ""
msgstr "关闭窗口"
msgid "&Edit"
msgstr "编辑 (&E)"
@@ -947,32 +947,32 @@ msgstr "位置"
msgid "URL"
msgstr "URL"
#, fuzzy
msgid "Note History"
msgstr "笔记列表"
msgstr "笔记历史"
msgid "Previous versions of this note"
msgstr ""
msgstr "此笔记的早期版本"
msgid "Note properties"
msgstr "笔记属性"
#, javascript-format
msgid "The note \"%s\" has been successfully restored to the notebook \"%s\"."
msgstr ""
msgstr "笔记\"%s\"已成功恢复到笔记本\"%s\"中。"
#, fuzzy
msgid "This note has no history"
msgstr "笔记已被修改:"
msgstr "笔记没有历史记录"
msgid "Restore"
msgstr ""
msgstr "恢复"
#, javascript-format
msgid ""
"Click \"%s\" to restore the note. It will be copied in the notebook named "
"\"%s\". The current version of the note will not be replaced or modified."
msgstr ""
"单击 \"%s\" 以恢复笔记。它将会被复制到名为 \"%s\" 的笔记本中。笔记的当前版本"
"不会被替换或修改。"
msgid "Open..."
msgstr "打开…"
@@ -1123,8 +1123,8 @@ msgid "Decrypting items: %d/%d"
msgstr "正在解密项目:%d/%d"
#, javascript-format
msgid "Fetching resources: %d"
msgstr "正在获取资源:%d"
msgid "Fetching resources: %d/%d"
msgstr "正在获取资源:%d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "请选择同步状态的导出位置"
@@ -1163,9 +1163,11 @@ msgid ""
"Type a note title to jump to it. Or type # followed by a tag name, or @ "
"followed by a notebook name."
msgstr ""
"输入笔记标题以便转跳到它。或者输入 # 跟着一个标签名字,或者输入 @ 跟着一个笔"
"记本名字。"
msgid "Goto Anything..."
msgstr ""
msgstr "转到某处……"
#, javascript-format
msgid "Usage: %s"
@@ -1278,7 +1280,7 @@ msgstr "已经在同步。状态:%s"
msgid ""
"Unknown item type downloaded - please upgrade Joplin to the latest version"
msgstr ""
msgstr "已下载项目为未知类型,请将 Joplin 升级到最新版本"
msgid "Encrypted"
msgstr "已加密"
@@ -1373,45 +1375,41 @@ msgstr "聚焦正文"
msgid "When creating a new note:"
msgstr "当新建笔记时:"
#, fuzzy
msgid "Enable soft breaks"
msgstr "目录"
msgstr ""
#, fuzzy
msgid "Enable math expressions"
msgstr "启用加密"
msgstr "启用数学表达式"
msgid "Enable ==mark== syntax"
msgstr ""
msgstr "启用 ==mark== 句法"
#, fuzzy
msgid "Enable footnotes"
msgstr "目录"
msgstr "启用脚注"
#, fuzzy
msgid "Enable table of contents extension"
msgstr "目录"
msgstr "启用目录扩展"
msgid "Enable ~sub~ syntax"
msgstr ""
msgstr "启用 ~sub~ 句法"
msgid "Enable ^sup^ syntax"
msgstr ""
msgstr "启用 ^sup^ 句法"
msgid "Enable deflist syntax"
msgstr ""
msgstr "启用术语表句法"
msgid "Enable abbreviation syntax"
msgstr ""
msgstr "启用缩写句法"
msgid "Enable markdown emoji"
msgstr ""
msgstr "启用 markdown emoji"
msgid "Enable ++insert++ syntax"
msgstr ""
msgstr "启用 ++insert++ 句法"
msgid "Enable multimarkdown table extension"
msgstr ""
msgstr "启用 multimarkdown 表格扩展"
msgid "Show tray icon"
msgstr "显示托盘图标"
@@ -1493,6 +1491,24 @@ msgid ""
msgstr ""
"所同步的目标。每个同步目标都可能有名为 `sync.NUM.NAME` 的附加参数(见下文)。"
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "待同步的目录(绝对路径)。"
@@ -1530,9 +1546,8 @@ msgstr ""
msgid "Ignore TLS certificate errors"
msgstr "忽略 TLS 证书错误"
#, fuzzy
msgid "Enable note history"
msgstr "目录"
msgstr "启用笔记历史"
msgid "days"
msgstr ""
@@ -1561,7 +1576,7 @@ msgid "Note"
msgstr "笔记"
msgid "Plugins"
msgstr ""
msgstr "插件"
msgid "Application"
msgstr "应用程序"
@@ -1612,18 +1627,18 @@ msgid "Please specify the notebook where the notes should be imported to."
msgstr "请指定导入笔记的目标笔记本。"
msgid "Restored Notes"
msgstr ""
msgstr "已恢复的笔记"
msgid "Items that cannot be synchronised"
msgstr "无法同步项目"
#, fuzzy, javascript-format
#, javascript-format
msgid "%s (%s) could not be uploaded: %s"
msgstr "该笔记本无法打开:%s"
msgstr "%s (%s) 无法上传到:%s"
#, fuzzy, javascript-format
#, javascript-format
msgid "Item \"%s\" could not be downloaded: %s"
msgstr "该笔记本无法打开:%s"
msgstr "项目 \"%s\" 无法从 %s 中下载"
msgid ""
"These items will remain on the device but will not be uploaded to the sync "

View File

@@ -1134,8 +1134,8 @@ msgid "Decrypting items: %d/%d"
msgstr "正在解密項目: %d/%d 項"
#, fuzzy, javascript-format
msgid "Fetching resources: %d"
msgstr "資源: %d"
msgid "Fetching resources: %d/%d"
msgstr "資源: %d/%d"
msgid "Please select where the sync status should be exported to"
msgstr "請選擇將同步狀態導出到的位置"
@@ -1502,6 +1502,24 @@ msgstr ""
"要同步的目標。每個同步目標可能有附加的參數,它們被命名為 `sync.NUM.NAME` (全"
"部記錄如下)。"
msgid "Attachment download behaviour"
msgstr ""
msgid ""
"In \"Manual\" mode, attachments are downloaded only when you click on them. "
"In \"Auto\", they are downloaded when you open the note. In \"Always\", all "
"the attachments are downloaded whether you open the note or not."
msgstr ""
msgid "Always"
msgstr ""
msgid "Manual"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr "要同步的目錄 (絕對路徑)"

View File

@@ -1,6 +1,6 @@
{
"name": "joplin",
"version": "1.0.128",
"version": "1.0.137",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -20,7 +20,7 @@
],
"owner": "Laurent Cozic"
},
"version": "1.0.128",
"version": "1.0.137",
"bin": {
"joplin": "./main.js"
},

View File

@@ -68,4 +68,37 @@ describe('models_Revision', function() {
expect(newRevs[2].id).toBe('789');
}));
it('should create patch stats', asyncTest(async () => {
const tests = [
{
patch: `@@ -625,16 +625,48 @@
rrupted download
+%0A- %5B %5D Fix mobile screen options`,
expected: [-0, +32],
},
{
patch: `@@ -564,17 +564,17 @@
ages%0A- %5B
-
+x
%5D Check `,
expected: [-1, +1],
},
{
patch: `@@ -1022,56 +1022,415 @@
.%0A%0A#
- How to view a note history%0A%0AWhile all the apps
+%C2%A0How does it work?%0A%0AAll the apps save a version of the modified notes every 10 minutes.
%0A%0A# `,
expected: [-(19+27+2), 17+67+4],
},
];
for (const test of tests) {
const stats = Revision.patchStats(test.patch);
expect(stats.removed).toBe(-test.expected[0]);
expect(stats.added).toBe(test.expected[1]);
}
}));
});

View File

@@ -53,6 +53,10 @@ async function remoteNotesFoldersResources() {
return remoteItemsByTypes([BaseModel.TYPE_NOTE, BaseModel.TYPE_FOLDER, BaseModel.TYPE_RESOURCE]);
}
async function remoteResources() {
return remoteItemsByTypes([BaseModel.TYPE_RESOURCE]);
}
async function localNotesFoldersSameAsRemote(locals, expect) {
let error = null;
try {
@@ -861,7 +865,7 @@ describe('Synchronizer', function() {
expect(ls.fetch_status).toBe(Resource.FETCH_STATUS_IDLE);
const fetcher = new ResourceFetcher(() => { return synchronizer().api() });
fetcher.queueDownload(resource1_2.id);
fetcher.queueDownload_(resource1_2.id);
await fetcher.waitForAllFinished();
resource1_2 = await Resource.load(resource1.id);
@@ -890,7 +894,7 @@ describe('Synchronizer', function() {
// Simulate a failed download
get: () => { return new Promise((resolve, reject) => { reject(new Error('did not work')) }); }
} });
fetcher.queueDownload(resource1.id);
fetcher.queueDownload_(resource1.id);
await fetcher.waitForAllFinished();
resource1 = await Resource.load(resource1.id);
@@ -916,7 +920,7 @@ describe('Synchronizer', function() {
expect(r1.size).toBe(-1);
const fetcher = new ResourceFetcher(() => { return synchronizer().api() });
fetcher.queueDownload(r1.id);
fetcher.queueDownload_(r1.id);
await fetcher.waitForAllFinished();
r1 = await Resource.load(r1.id);
expect(r1.size).toBe(2720);
@@ -970,7 +974,7 @@ describe('Synchronizer', function() {
await encryptionService().loadMasterKeysFromSettings();
const fetcher = new ResourceFetcher(() => { return synchronizer().api() });
fetcher.queueDownload(resource1.id);
fetcher.queueDownload_(resource1.id);
await fetcher.waitForAllFinished();
let resource1_2 = (await Resource.all())[0];
@@ -1053,7 +1057,7 @@ describe('Synchronizer', function() {
await encryptionService().loadMasterKeysFromSettings();
const fetcher = new ResourceFetcher(() => { return synchronizer().api() });
fetcher.queueDownload(resource1.id);
fetcher.queueDownload_(resource1.id);
await fetcher.waitForAllFinished();
await decryptionWorker().start();
@@ -1320,4 +1324,65 @@ describe('Synchronizer', function() {
expect(syncItems[1].sync_disabled).toBe(1);
}));
it("should not upload a resource if it has not been fetched yet", asyncTest(async () => {
// In some rare cases, the synchronizer might try to upload a resource even though it
// doesn't have the resource file. It can happen in this situation:
// - C1 create resource
// - C1 sync
// - C2 sync
// - C2 resource metadata is received but ResourceFetcher hasn't downloaded the file yet
// - C2 enables E2EE - all the items are marked for forced sync
// - C2 sync
// The synchronizer will try to upload the resource, even though it doesn't have the file,
// so we need to make sure it doesn't. But also that once it gets the file, the resource
// does get uploaded.
const note1 = await Note.save({ title: 'note' });
await shim.attachFileToNote(note1, __dirname + '/../tests/support/photo.jpg');
const resource = (await Resource.all())[0];
await Resource.setLocalState(resource.id, { fetch_status: Resource.FETCH_STATUS_IDLE });
await synchronizer().start();
expect((await remoteResources()).length).toBe(0);
await Resource.setLocalState(resource.id, { fetch_status: Resource.FETCH_STATUS_DONE });
await synchronizer().start();
expect((await remoteResources()).length).toBe(1);
}));
it('should decrypt the resource metadata, but not try to decrypt the file, if it is not present', asyncTest(async () => {
const note1 = await Note.save({ title: 'note' });
await shim.attachFileToNote(note1, __dirname + '/../tests/support/photo.jpg');
const masterKey = await loadEncryptionMasterKey();
await encryptionService().enableEncryption(masterKey, '123456');
await encryptionService().loadMasterKeysFromSettings();
await synchronizer().start();
expect(await allSyncTargetItemsEncrypted()).toBe(true);
await switchClient(2);
await synchronizer().start();
Setting.setObjectKey('encryption.passwordCache', masterKey.id, '123456');
await encryptionService().loadMasterKeysFromSettings();
await decryptionWorker().start();
let resource = (await Resource.all())[0];
expect(!!resource.encryption_applied).toBe(false);
expect(!!resource.encryption_blob_encrypted).toBe(true);
const resourceFetcher = new ResourceFetcher(() => { return synchronizer().api() });
await resourceFetcher.start();
await resourceFetcher.waitForAllFinished();
const ls = await Resource.localState(resource);
expect(ls.fetch_status).toBe(Resource.FETCH_STATUS_DONE);
await decryptionWorker().start();
resource = (await Resource.all())[0];
expect(!!resource.encryption_blob_encrypted).toBe(false);
}));
});

View File

@@ -74,6 +74,11 @@ const sleepTime = syncTargetId_ == SyncTargetRegistry.nameToId('filesystem') ? 1
console.info('Testing with sync target: ' + SyncTargetRegistry.idToName(syncTargetId_));
const dbLogger = new Logger();
dbLogger.addTarget('console');
dbLogger.addTarget('file', { path: logDir + '/log.txt' });
dbLogger.setLevel(Logger.LEVEL_WARN);
const logger = new Logger();
logger.addTarget('console');
logger.addTarget('file', { path: logDir + '/log.txt' });
@@ -181,7 +186,7 @@ async function setupDatabase(id = null) {
};
databases_[id] = new JoplinDatabase(new DatabaseDriverNode());
databases_[id].setLogger(logger);
databases_[id].setLogger(dbLogger);
await databases_[id].open({ name: filePath });
BaseModel.db_ = databases_[id];

View File

@@ -806,6 +806,24 @@ class Application extends BaseApplication {
rootMenus.file = rootMenuFile;
}
// It seems the "visible" property of separators is ignored by Electron, making
// it display separators that we want hidden. So this function iterates through
// them and remove them completely.
const cleanUpSeparators = items => {
const output = [];
for (const item of items) {
if ('visible' in item && item.type === 'separator' && !item.visible) continue;
output.push(item);
}
return output;
}
for (const key in rootMenus) {
if (!rootMenus.hasOwnProperty(key)) continue;
if (!rootMenus[key].submenu) continue;
rootMenus[key].submenu = cleanUpSeparators(rootMenus[key].submenu);
}
const pluginMenuItems = PluginManager.instance().menuItems();
for (const item of pluginMenuItems) {
let itemParent = rootMenus[item.parent] ? rootMenus[item.parent] : 'tools';

View File

@@ -35,8 +35,7 @@ class HeaderComponent extends React.Component {
};
this.search_onClear = (event) => {
this.setState({ searchQuery: '' });
triggerOnQuery('');
this.resetSearch();
if (this.searchElement_) this.searchElement_.focus();
}
@@ -56,6 +55,17 @@ class HeaderComponent extends React.Component {
this.setState({ showSearchUsageLink: false });
}, 5000);
}
this.search_keyDown = event => {
if (event.keyCode === 27) { // ESCAPE
this.resetSearch();
}
}
this.resetSearch = () => {
this.setState({ searchQuery: '' });
triggerOnQuery('');
}
this.searchUsageLink_click = event => {
bridge().openExternal('https://joplinapp.org/#searching');
@@ -68,6 +78,12 @@ class HeaderComponent extends React.Component {
}
}
componentDidUpdate(prevProps) {
if(prevProps.notesParentType !== this.props.notesParentType && this.props.notesParentType !== 'Search' && this.state.searchQuery) {
this.resetSearch();
}
}
componentWillUnmount() {
if (this.hideSearchUsageLinkIID_) {
clearTimeout(this.hideSearchUsageLinkIID_);
@@ -190,6 +206,7 @@ class HeaderComponent extends React.Component {
ref={elem => this.searchElement_ = elem}
onFocus={this.search_onFocus}
onBlur={this.search_onBlur}
onKeyDown={this.search_keyDown}
/>
<a
href="#"
@@ -257,6 +274,7 @@ const mapStateToProps = (state) => {
return {
theme: state.settings.theme,
windowCommand: state.windowCommand,
notesParentType: state.notesParentType,
};
};

View File

@@ -126,10 +126,12 @@ class NoteRevisionViewerComponent extends React.PureComponent {
const revs = this.state.revisions.slice().reverse();
for (let i = 0; i < revs.length; i++) {
const rev = revs[i];
const stats = Revision.revisionPatchStatsText(rev);
revisionListItems.push(<option
key={rev.id}
value={rev.id}
>{time.formatMsToLocal(rev.item_updated_time)}</option>);
>{time.formatMsToLocal(rev.item_updated_time) + ' (' + stats + ')'}</option>);
}
const restoreButtonTitle = _('Restore');

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 DecryptionWorker = require('lib/services/DecryptionWorker');
const ModelCache = require('lib/services/ModelCache');
const NoteTextViewer = require('./NoteTextViewer.min');
const NoteRevisionViewer = require('./NoteRevisionViewer.min');
@@ -226,14 +227,13 @@ class NoteTextComponent extends React.Component {
}
}
this.resourceFetcher_downloadComplete = async (resource) => {
this.refreshResource = async (event) => {
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();
if (resourceIds.indexOf(event.id) >= 0) {
shared.clearResourceCache();
this.lastSetHtml_ = '';
this.scheduleHtmlUpdate();
//this.updateHtml(this.state.note.body);
}
}
@@ -363,7 +363,8 @@ class NoteTextComponent extends React.Component {
eventManager.on('noteTypeToggle', this.onNoteTypeToggle_);
eventManager.on('todoToggle', this.onTodoToggle_);
ResourceFetcher.instance().on('downloadComplete', this.resourceFetcher_downloadComplete);
shared.installResourceHandling(this.refreshResource);
ExternalEditWatcher.instance().on('noteChange', this.externalEditWatcher_noteChange);
}
@@ -376,7 +377,8 @@ class NoteTextComponent extends React.Component {
eventManager.removeListener('noteTypeToggle', this.onNoteTypeToggle_);
eventManager.removeListener('todoToggle', this.onTodoToggle_);
ResourceFetcher.instance().off('downloadComplete', this.resourceFetcher_downloadComplete);
shared.uninstallResourceHandling(this.refreshResource);
ExternalEditWatcher.instance().off('noteChange', this.externalEditWatcher_noteChange);
}
@@ -474,6 +476,8 @@ class NoteTextComponent extends React.Component {
// Scroll back to top when loading new note
if (loadingNewNote) {
shared.clearResourceCache();
this.editorMaxScrollTop_ = 0;
// HACK: To go around a bug in Ace editor, we first set the scroll position to 1
@@ -521,6 +525,11 @@ class NoteTextComponent extends React.Component {
this.setViewerPercentScroll(scrollPercent ? scrollPercent : 0);
}, 10);
}
if (note && note.body && Setting.value('sync.resourceDownloadMode') === 'auto') {
const resourceIds = await Note.linkedResourceIds(note.body);
await ResourceFetcher.instance().markForDownload(resourceIds);
}
}
if (note) {
@@ -647,7 +656,7 @@ class NoteTextComponent extends React.Component {
async webview_ipcMessage(event) {
const msg = event.channel ? event.channel : '';
const args = event.args;
const args = event.args;
const arg0 = args && args.length >= 1 ? args[0] : null;
const arg1 = args && args.length >= 2 ? args[1] : null;
@@ -662,10 +671,18 @@ class NoteTextComponent extends React.Component {
const newBody = shared.toggleCheckbox(msg, this.state.note.body);
this.saveOneProperty('body', newBody);
} else if (msg.indexOf('error:') === 0) {
const s = msg.split(':');
s.splice(0, 1);
reg.logger().error(s.join(':'));
} else if (msg === 'setMarkerCount') {
const ls = Object.assign({}, this.state.localSearch);
ls.resultCount = arg0;
this.setState({ localSearch: ls });
} else if (msg.indexOf('markForDownload:') === 0) {
const s = msg.split(':');
if (s.length < 2) throw new Error('Invalid message: ' + msg);
ResourceFetcher.instance().markForDownload(s[1]);
} else if (msg === 'percentScroll') {
this.ignoreNextEditorScroll_ = true;
this.setEditorPercentScroll(arg0);
@@ -740,7 +757,6 @@ 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) {
@@ -864,6 +880,9 @@ class NoteTextComponent extends React.Component {
}
return output;
}
//fixes #1426 but this is an Ace issue, so it can be removed if ace/brace is updated.
this.editor_.editor.getSession().getMode().$quotes = {'"': '"', "'": "'", "`": "`"};
// Disable Markdown auto-completion (eg. auto-adding a dash after a line with a dash.
// https://github.com/ajaxorg/ace/issues/2754
@@ -1741,6 +1760,7 @@ class NoteTextComponent extends React.Component {
if (htmlHasChanged) {
let options = {
cssFiles: this.state.lastRenderCssFiles,
downloadResources: Setting.value('sync.resourceDownloadMode'),
};
this.webviewRef_.current.wrappedInstance.send('setHtml', html, options);
this.lastSetHtml_ = html;

View File

@@ -714,7 +714,7 @@ class SideBarComponent extends React.Component {
let resourceFetcherText = '';
if (this.props.resourceFetcher && this.props.resourceFetcher.toFetchCount) {
resourceFetcherText = _('Fetching resources: %d', this.props.resourceFetcher.toFetchCount);
resourceFetcherText = _('Fetching resources: %d/%d', this.props.resourceFetcher.fetchingCount, this.props.resourceFetcher.toFetchCount);
}
let lines = Synchronizer.reportToLines(this.props.syncReport);

View File

@@ -38,277 +38,286 @@
<script src="./lib.js"></script>
<script>
const contentElement = document.getElementById('content');
const ipc = {};
window.addEventListener('message', (event) => {
// Here we only deal with messages that are sent from the main Electro process to the webview.
if (!event.data || event.data.target !== 'webview') return;
const callName = event.data.name;
const callData = event.data.data;
if (!ipc[callName]) {
console.warn('Missing IPC function:', event.data);
} else {
ipc[callName](callData);
}
});
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);
}
}
// 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
// so that it is not greater than contentHeight. On the other hand, with percentScroll it is possible to restore
// it at any time knowing that it's not going to be changed because the content height has changed.
// To restore percentScroll the "checkScrollIID" interval is used. It constantly resets the scroll position during
// one second after the content has been updated.
//
// ignoreNextScroll is used to differentiate between scroll event from the users and those that are the result
// of programmatically changing scrollTop. We only want to respond to events initiated by the user.
let percentScroll_ = 0;
let checkScrollIID_ = null;
function setPercentScroll(percent) {
percentScroll_ = percent;
contentElement.scrollTop = percentScroll_ * maxScrollTop();
}
function percentScroll() {
return percentScroll_;
}
function restorePercentScroll() {
setPercentScroll(percentScroll_);
}
ipc.setHtml = (event) => {
const html = event.html;
markJsHackMarkerInserted_ = false;
updateBodyHeight();
contentElement.innerHTML = html;
let previousContentHeight = contentElement.scrollHeight;
let startTime = Date.now();
restorePercentScroll();
if (!checkScrollIID_) {
checkScrollIID_ = setInterval(() => {
const h = contentElement.scrollHeight;
if (h !== previousContentHeight) {
previousContentHeight = h;
restorePercentScroll();
}
if (Date.now() - startTime >= 1000) {
clearInterval(checkScrollIID_);
checkScrollIID_ = null;
}
}, 1);
}
loadCssFiles(event.options.cssFiles);
}
let ignoreNextScrollEvent = false;
ipc.setPercentScroll = (event) => {
const percent = event.percent;
if (checkScrollIID_) {
clearInterval(checkScrollIID_);
checkScrollIID_ = null;
}
ignoreNextScrollEvent = true;
setPercentScroll(percent);
}
// HACK for Mark.js bug - https://github.com/julmot/mark.js/issues/127
let markJsHackMarkerInserted_ = false;
function addMarkJsSpaceHack(document) {
if (markJsHackMarkerInserted_) return;
const prepareElementsForMarkJs = (elements, type) => {
// const markJsHackMarker_ = '&#8203; &#8203;'
const markJsHackMarker_ = ' ';
for (let i = 0; i < elements.length; i++) {
if (!type) {
elements[i].innerHTML = elements[i].innerHTML + markJsHackMarker_;
} else if (type === 'insertBefore') {
elements[i].insertAdjacentHTML('beforeBegin', markJsHackMarker_);
}
}
}
prepareElementsForMarkJs(document.getElementsByTagName('p'));
prepareElementsForMarkJs(document.getElementsByTagName('div'));
prepareElementsForMarkJs(document.getElementsByTagName('br'), 'insertBefore');
markJsHackMarkerInserted_ = true;
}
let mark_ = null;
let markSelectedElement_ = null;
function setMarkers(keywords, options = null) {
if (!options) options = {};
// TODO: Add support for scriptType on mobile and CLI
if (!mark_) {
mark_ = new Mark(document.getElementById('content'), {
exclude: ['img'],
acrossElements: true,
});
}
addMarkJsSpaceHack(document);
mark_.unmark()
if (markSelectedElement_) markSelectedElement_.classList.remove('mark-selected');
let selectedElement = null;
let elementIndex = 0;
const onEachElement = (element) => {
if (!('selectedIndex' in options)) return;
if (('selectedIndex' in options) && elementIndex === options.selectedIndex) {
markSelectedElement_ = element;
element.classList.add('mark-selected');
selectedElement = element;
}
elementIndex++;
}
for (let i = 0; i < keywords.length; i++) {
let keyword = keywords[i];
markJsUtils.markKeyword(mark_, keyword, {
pregQuote: pregQuote,
replaceRegexDiacritics: replaceRegexDiacritics,
}, {
each: onEachElement,
});
}
ipcProxySendToHost('setMarkerCount', elementIndex);
if (selectedElement) selectedElement.scrollIntoView();
}
let markLoaded_ = false;
ipc.setMarkers = (event) => {
const keywords = event.keywords;
const options = event.options;
if (!keywords.length && !markLoaded_) return;
if (!markLoaded_) {
const script = document.createElement('script');
script.onload = function() {
setMarkers(keywords, options);
};
script.src = '../../node_modules/mark.js/dist/mark.min.js';
document.getElementById('markScriptContainer').appendChild(script);
markLoaded_ = true;
} else {
setMarkers(keywords, options);
}
}
function maxScrollTop() {
return Math.max(0, contentElement.scrollHeight - contentElement.clientHeight);
}
// The body element needs to have a fixed height for the content to be scrollable
function updateBodyHeight() {
document.getElementById('body').style.height = window.innerHeight + 'px';
}
const ipcProxySendToHost = (methodName, arg) => {
window.postMessage({ target: 'main', name: methodName, args: [ arg ] }, '*');
}
contentElement.addEventListener('scroll', function(e) {
if (ignoreNextScrollEvent) {
ignoreNextScrollEvent = false;
return;
}
const m = maxScrollTop();
const percent = m ? contentElement.scrollTop / m : 0;
setPercentScroll(percent);
ipcProxySendToHost('percentScroll', percent);
});
try {
const contentElement = document.getElementById('content');
document.addEventListener('contextmenu', function(event) {
let element = event.target;
const ipc = {};
// To handle right clicks on resource icons
if (element && !element.getAttribute('data-resource-id')) element = element.parentElement;
window.addEventListener('message', webviewLib.logEnabledEventHandler(event => {
// Here we only deal with messages that are sent from the main Electro process to the webview.
if (!event.data || event.data.target !== 'webview') return;
if (element && element.getAttribute('data-resource-id')) {
ipcProxySendToHost('contextMenu', {
type: element.getAttribute('src') ? 'image' : 'resource',
resourceId: element.getAttribute('data-resource-id'),
});
} else {
const selectedText = window.getSelection().toString();
const callName = event.data.name;
const callData = event.data.data;
if (selectedText) {
ipcProxySendToHost('contextMenu', {
type: 'text',
textToCopy: selectedText,
});
} else if (event.target.getAttribute('href')) {
ipcProxySendToHost('contextMenu', {
type: 'link',
textToCopy: event.target.getAttribute('href'),
});
if (!ipc[callName]) {
console.warn('Missing IPC function:', event.data);
} else {
ipc[callName](callData);
}
}));
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);
}
}
});
webviewLib.initialize({
postMessage: ipcProxySendToHost,
});
// 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
// so that it is not greater than contentHeight. On the other hand, with percentScroll it is possible to restore
// it at any time knowing that it's not going to be changed because the content height has changed.
// To restore percentScroll the "checkScrollIID" interval is used. It constantly resets the scroll position during
// one second after the content has been updated.
//
// ignoreNextScroll is used to differentiate between scroll event from the users and those that are the result
// of programmatically changing scrollTop. We only want to respond to events initiated by the user.
// Disable drag and drop otherwise it's possible to drop a URL
// on it and it will open in the view as a website.
document.addEventListener('drop', function(e) {
e.preventDefault();
e.stopPropagation();
});
document.addEventListener('dragover', function(e) {
e.preventDefault();
e.stopPropagation();
});
document.addEventListener('dragover', function(e) {
e.preventDefault();
});
let percentScroll_ = 0;
let checkScrollIID_ = null;
function setPercentScroll(percent) {
percentScroll_ = percent;
contentElement.scrollTop = percentScroll_ * maxScrollTop();
}
function percentScroll() {
return percentScroll_;
}
function restorePercentScroll() {
setPercentScroll(percentScroll_);
}
ipc.setHtml = (event) => {
const html = event.html;
markJsHackMarkerInserted_ = false;
updateBodyHeight();
contentElement.innerHTML = html;
let previousContentHeight = contentElement.scrollHeight;
let startTime = Date.now();
restorePercentScroll();
if (!checkScrollIID_) {
checkScrollIID_ = setInterval(() => {
const h = contentElement.scrollHeight;
if (h !== previousContentHeight) {
previousContentHeight = h;
restorePercentScroll();
}
if (Date.now() - startTime >= 1000) {
clearInterval(checkScrollIID_);
checkScrollIID_ = null;
}
}, 1);
}
loadCssFiles(event.options.cssFiles);
if (event.options.downloadResources === 'manual') {
webviewLib.setupResourceManualDownload();
}
}
let ignoreNextScrollEvent = false;
ipc.setPercentScroll = (event) => {
const percent = event.percent;
if (checkScrollIID_) {
clearInterval(checkScrollIID_);
checkScrollIID_ = null;
}
ignoreNextScrollEvent = true;
setPercentScroll(percent);
}
// HACK for Mark.js bug - https://github.com/julmot/mark.js/issues/127
let markJsHackMarkerInserted_ = false;
function addMarkJsSpaceHack(document) {
if (markJsHackMarkerInserted_) return;
const prepareElementsForMarkJs = (elements, type) => {
// const markJsHackMarker_ = '&#8203; &#8203;'
const markJsHackMarker_ = ' ';
for (let i = 0; i < elements.length; i++) {
if (!type) {
elements[i].innerHTML = elements[i].innerHTML + markJsHackMarker_;
} else if (type === 'insertBefore') {
elements[i].insertAdjacentHTML('beforeBegin', markJsHackMarker_);
}
}
}
prepareElementsForMarkJs(document.getElementsByTagName('p'));
prepareElementsForMarkJs(document.getElementsByTagName('div'));
prepareElementsForMarkJs(document.getElementsByTagName('br'), 'insertBefore');
markJsHackMarkerInserted_ = true;
}
let mark_ = null;
let markSelectedElement_ = null;
function setMarkers(keywords, options = null) {
if (!options) options = {};
// TODO: Add support for scriptType on mobile and CLI
if (!mark_) {
mark_ = new Mark(document.getElementById('content'), {
exclude: ['img'],
acrossElements: true,
});
}
addMarkJsSpaceHack(document);
mark_.unmark()
if (markSelectedElement_) markSelectedElement_.classList.remove('mark-selected');
let selectedElement = null;
let elementIndex = 0;
const onEachElement = (element) => {
if (!('selectedIndex' in options)) return;
if (('selectedIndex' in options) && elementIndex === options.selectedIndex) {
markSelectedElement_ = element;
element.classList.add('mark-selected');
selectedElement = element;
}
elementIndex++;
}
for (let i = 0; i < keywords.length; i++) {
let keyword = keywords[i];
markJsUtils.markKeyword(mark_, keyword, {
pregQuote: pregQuote,
replaceRegexDiacritics: replaceRegexDiacritics,
}, {
each: onEachElement,
});
}
ipcProxySendToHost('setMarkerCount', elementIndex);
if (selectedElement) selectedElement.scrollIntoView();
}
let markLoaded_ = false;
ipc.setMarkers = (event) => {
const keywords = event.keywords;
const options = event.options;
if (!keywords.length && !markLoaded_) return;
if (!markLoaded_) {
const script = document.createElement('script');
script.onload = function() {
setMarkers(keywords, options);
};
script.src = '../../node_modules/mark.js/dist/mark.min.js';
document.getElementById('markScriptContainer').appendChild(script);
markLoaded_ = true;
} else {
setMarkers(keywords, options);
}
}
function maxScrollTop() {
return Math.max(0, contentElement.scrollHeight - contentElement.clientHeight);
}
// The body element needs to have a fixed height for the content to be scrollable
function updateBodyHeight() {
document.getElementById('body').style.height = window.innerHeight + 'px';
}
contentElement.addEventListener('scroll', webviewLib.logEnabledEventHandler(e => {
if (ignoreNextScrollEvent) {
ignoreNextScrollEvent = false;
return;
}
const m = maxScrollTop();
const percent = m ? contentElement.scrollTop / m : 0;
setPercentScroll(percent);
ipcProxySendToHost('percentScroll', percent);
}));
document.addEventListener('contextmenu', webviewLib.logEnabledEventHandler(event => {
let element = event.target;
// To handle right clicks on resource icons
if (element && !element.getAttribute('data-resource-id')) element = element.parentElement;
if (element && element.getAttribute('data-resource-id')) {
ipcProxySendToHost('contextMenu', {
type: element.getAttribute('src') ? 'image' : 'resource',
resourceId: element.getAttribute('data-resource-id'),
});
} else {
const selectedText = window.getSelection().toString();
if (selectedText) {
ipcProxySendToHost('contextMenu', {
type: 'text',
textToCopy: selectedText,
});
} else if (event.target.getAttribute('href')) {
ipcProxySendToHost('contextMenu', {
type: 'link',
textToCopy: event.target.getAttribute('href'),
});
}
}
}));
webviewLib.initialize({
postMessage: ipcProxySendToHost,
});
// Disable drag and drop otherwise it's possible to drop a URL
// on it and it will open in the view as a website.
document.addEventListener('drop', webviewLib.logEnabledEventHandler(e => {
e.preventDefault();
e.stopPropagation();
}));
document.addEventListener('dragover', webviewLib.logEnabledEventHandler(e => {
e.preventDefault();
e.stopPropagation();
}));
document.addEventListener('dragover', webviewLib.logEnabledEventHandler(e => {
e.preventDefault();
}));
window.addEventListener('resize', webviewLib.logEnabledEventHandler(() => {
updateBodyHeight();
}));
window.addEventListener('resize', function() {
updateBodyHeight();
});
updateBodyHeight();
} catch (error) {
ipcProxySendToHost('error:' + JSON.stringify(webviewLib.cloneError(error)));
throw error;
}
</script>
</body>

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

@@ -8,6 +8,7 @@ locales['de_DE'] = require('./de_DE.json');
locales['en_US'] = require('./en_US.json');
locales['es_ES'] = require('./es_ES.json');
locales['eu'] = require('./eu.json');
locales['fa'] = require('./fa.json');
locales['fr_FR'] = require('./fr_FR.json');
locales['gl_ES'] = require('./gl_ES.json');
locales['hr_HR'] = require('./hr_HR.json');
@@ -17,6 +18,7 @@ locales['ko'] = require('./ko.json');
locales['nb_NO'] = require('./nb_NO.json');
locales['nl_BE'] = require('./nl_BE.json');
locales['nl_NL'] = require('./nl_NL.json');
locales['pl_PL'] = require('./pl_PL.json');
locales['pt_BR'] = require('./pt_BR.json');
locales['ro'] = require('./ro.json');
locales['ru_RU'] = require('./ru_RU.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

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "Joplin",
"version": "1.0.152",
"version": "1.0.158",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -3933,31 +3933,23 @@
"integrity": "sha1-RqGqlHEFrtgYiXjgoBYXnkBPQsc="
},
"markdown-it-multimd-table": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/markdown-it-multimd-table/-/markdown-it-multimd-table-3.1.3.tgz",
"integrity": "sha1-l5Jr4N87WWdhGEZM5D0C03nKNNw=",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/markdown-it-multimd-table/-/markdown-it-multimd-table-3.2.0.tgz",
"integrity": "sha512-dBtYHVtyAnoWslzYLYDh0d9jX2/qroyMIsJ1BjFdIcLgZjzqBIBGwZ1j3AaaWh+IIfe3KVm5Irqn5Uzadm5kQA==",
"requires": {
"markdown-it": "^5.0.3"
"markdown-it": "^8.4.2"
},
"dependencies": {
"linkify-it": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-1.2.4.tgz",
"integrity": "sha1-B3NSbDF8j9E71TTuHRgP+Iq/iBo=",
"requires": {
"uc.micro": "^1.0.1"
}
},
"markdown-it": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-5.1.0.tgz",
"integrity": "sha1-JShrhGW6xJbz8bd+7VRGQ+m9cY0=",
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz",
"integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==",
"requires": {
"argparse": "~1.0.3",
"argparse": "^1.0.7",
"entities": "~1.1.1",
"linkify-it": "~1.2.0",
"mdurl": "~1.0.1",
"uc.micro": "^1.0.0"
"linkify-it": "^2.0.0",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "Joplin",
"version": "1.0.152",
"version": "1.0.158",
"description": "Joplin for Desktop",
"main": "main.js",
"scripts": {
@@ -117,7 +117,7 @@
"markdown-it-ins": "^2.0.0",
"markdown-it-katex": "^2.0.3",
"markdown-it-mark": "^2.0.0",
"markdown-it-multimd-table": "^3.1.3",
"markdown-it-multimd-table": "^3.2.0",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"markdown-it-toc-done-right": "^3.0.1",

View File

@@ -193,13 +193,25 @@ class Dialog extends React.PureComponent {
}
}
gotoItem(item) {
async gotoItem(item) {
this.props.dispatch({
pluginName: PLUGIN_NAME,
type: 'PLUGIN_DIALOG_SET',
open: false,
});
if (this.state.listType === BaseModel.TYPE_NOTE || this.state.listType === BaseModel.TYPE_FOLDER) {
const folderPath = await Folder.folderPath(this.props.folders, item.parent_id);
for (const folder of folderPath) {
this.props.dispatch({
type: "FOLDER_SET_COLLAPSED",
id: folder.id,
collapsed: false,
});
}
}
if (this.state.listType === BaseModel.TYPE_NOTE) {
this.props.dispatch({
type: "FOLDER_AND_NOTE_SELECT",

3
ElectronClient/package-lock.json generated Normal file
View File

@@ -0,0 +1,3 @@
{
"lockfileVersion": 1
}

View File

@@ -37,7 +37,7 @@ if [[ ! -e ~/.joplin/VERSION ]] || [[ $(< ~/.joplin/VERSION) != "$version" ]]; t
echo 'Downloading Joplin...'
# Delete previous version (in future versions joplin.desktop shouldn't exist)
rm -f ~/.joplin/*.AppImage ~/.local/share/applications/joplin.desktop ~/.local/share/applications/appimagekit-joplin.desktop ~/.joplin/VERSION
rm -f ~/.joplin/*.AppImage ~/.local/share/applications/joplin.desktop ~/.joplin/VERSION
# Creates the folder where the binary will be stored
mkdir -p ~/.joplin/
@@ -78,7 +78,10 @@ if [[ ! -e ~/.joplin/VERSION ]] || [[ $(< ~/.joplin/VERSION) != "$version" ]]; t
(cd $TMPDIR && ~/.joplin/Joplin.AppImage --appimage-extract joplin.desktop &> /dev/null)
APPIMAGE_VERSION=$(grep "^X-AppImage-BuildId=" $TMPDIR/squashfs-root/joplin.desktop | head -n 1 | cut -d " " -f 1)
rm -rf $TMPDIR/squashfs-root
# Only delete the desktop file if it will be replaced
rm -f ~/.local/share/applications/appimagekit-joplin.desktop
# On some systems this directory doesn't exist by default
mkdir -p ~/.local/share/applications
echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Joplin\nComment=Joplin for Desktop\nExec=/home/$USER/.joplin/Joplin.AppImage\nIcon=/home/$USER/.joplin/Icon512.png\nStartupWMClass=Joplin\nType=Application\nCategories=Application;\n$APPIMAGE_VERSION" >> ~/.local/share/applications/appimagekit-joplin.desktop
echo "${COLOR_GREEN}OK${COLOR_RESET}"

View File

@@ -20,15 +20,15 @@ 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.151/Joplin-Setup-1.0.151.exe'><img alt='Get it on Windows' width="134px" src='https://joplinapp.org/images/BadgeWindows.png'/></a> | Or get the <a href='https://github.com/laurent22/joplin/releases/download/v1.0.151/JoplinPortable.exe'>Portable version</a><br><br>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.
macOS | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.151/Joplin-1.0.151.dmg'><img alt='Get it on macOS' width="134px" src='https://joplinapp.org/images/BadgeMacOS.png'/></a> | You can also use Homebrew: `brew cask install joplin`
Linux | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.151/Joplin-1.0.151-x86_64.AppImage'><img alt='Get it on Linux' width="134px" src='https://joplinapp.org/images/BadgeLinux.png'/></a> | An Arch Linux package [is also available](#terminal-application).<br><br>If it works with your distribution (it has been tested on Ubuntu, Fedora, Gnome and Mint), the recommended way is to use this script as it will handle the desktop icon too:<br><br> `wget -O - https://raw.githubusercontent.com/laurent22/joplin/master/Joplin_install_and_update.sh | bash`
Windows (32 and 64-bit) | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.152/Joplin-Setup-1.0.152.exe'><img alt='Get it on Windows' width="134px" src='https://joplinapp.org/images/BadgeWindows.png'/></a> | Or get the <a href='https://github.com/laurent22/joplin/releases/download/v1.0.152/JoplinPortable.exe'>Portable version</a><br><br>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.
macOS | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.152/Joplin-1.0.152.dmg'><img alt='Get it on macOS' width="134px" src='https://joplinapp.org/images/BadgeMacOS.png'/></a> | You can also use Homebrew: `brew cask install joplin`
Linux | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.152/Joplin-1.0.152-x86_64.AppImage'><img alt='Get it on Linux' width="134px" src='https://joplinapp.org/images/BadgeLinux.png'/></a> | An Arch Linux package [is also available](#terminal-application).<br><br>If it works with your distribution (it has been tested on Ubuntu, Fedora, Gnome and Mint), the recommended way is to use this script as it will handle the desktop icon too:<br><br> `wget -O - https://raw.githubusercontent.com/laurent22/joplin/master/Joplin_install_and_update.sh \| bash`
## Mobile applications
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://joplinapp.org/images/BadgeAndroid.png'/></a> | or [Download APK File](https://github.com/laurent22/joplin-android/releases/download/android-v1.0.252/joplin-v1.0.252.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://joplinapp.org/images/BadgeAndroid.png'/></a> | or [Download APK File](https://github.com/laurent22/joplin-android/releases/download/android-v1.0.255/joplin-v1.0.255.apk)
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://joplinapp.org/images/BadgeIOS.png'/></a> | -
## Terminal application
@@ -59,7 +59,7 @@ The Web Clipper is a browser extension that allows you to save web pages and scr
- Support
- [Joplin Forum](https://discourse.joplin.cozic.net)
- [Joplin Forum](https://discourse.joplinapp.org)
- [How to enable end-to-end encryption](https://github.com/laurent22/joplin/blob/master/readme/e2ee.md)
- [End-to-end encryption spec](https://github.com/laurent22/joplin/blob/master/readme/spec.md)
- [How to enable debug mode](https://github.com/laurent22/joplin/blob/master/readme/debugging.md)
@@ -68,7 +68,8 @@ The Web Clipper is a browser extension that allows you to save web pages and scr
- About
- [Changelog](https://github.com/laurent22/joplin/blob/master/readme/changelog.md)
- [Changelog (Desktop App)](https://github.com/laurent22/joplin/blob/master/readme/changelog.md)
- [Changelog (CLI App)](https://github.com/laurent22/joplin/blob/master/readme/changelog_cli.md)
- [Stats](https://github.com/laurent22/joplin/blob/master/readme/stats.md)
- [Donate](https://github.com/laurent22/joplin/blob/master/readme/donate.md)
<!-- TOC -->
@@ -78,6 +79,7 @@ The Web Clipper is a browser extension that allows you to save web pages and scr
- Desktop, mobile and terminal applications.
- [Web Clipper](https://github.com/laurent22/joplin/blob/master/readme/clipper.md) for Firefox and Chrome.
- End To End Encryption (E2EE)
- Note history (revisions)
- Synchronisation with various services, including NextCloud, Dropbox, WebDAV and OneDrive.
- Import Enex files (Evernote export format) and Markdown files.
- Export JEX files (Joplin Export format) and raw files.
@@ -123,7 +125,7 @@ In general the way to import notes from any application into Joplin is to conver
* Standard Notes: Please see [this tutorial](https://programadorwebvalencia.com/migrate-notes-from-standard-notes-to-joplin/)
* Tomboy Notes: Export the notes to ENEX files [as described here](https://askubuntu.com/questions/243691/how-can-i-export-my-tomboy-notes-into-evernote/608551) for example, and import these ENEX files into Joplin.
* OneNote: First [import the notes from OneNote into Evernote](https://discussion.evernote.com/topic/107736-is-there-a-way-to-import-from-onenote-into-evernote-on-the-mac/). Then export the ENEX file from Evernote and import it into Joplin.
* NixNote: Synchronise with Evernote, then export the ENEX files and import them into Joplin. More info [in this thread](https://discourse.joplin.cozic.net/t/import-from-nixnote/183/3).
* NixNote: Synchronise with Evernote, then export the ENEX files and import them into Joplin. More info [in this thread](https://discourse.joplinapp.org/t/import-from-nixnote/183/3).
# Exporting
@@ -193,6 +195,14 @@ Joplin supports end-to-end encryption (E2EE) on all the applications. E2EE is a
For a more technical description, mostly relevant for development or to review the method being used, please see the [Encryption specification](https://joplinapp.org/spec/).
# Note history
The Joplin applications automatically save previous versions of your notes at regular intervals. These versions are synced across devices and can be viewed from the desktop application. To do so, click on the "Information" button on a note, then click on "Previous version of this note". From this screen you can view the previous versions of the note as well as restore any of them.
This feature can be disabled from the "Note history" section in the settings, and it is also possible to change for how long the history of a note is saved.
More information about this feature in the [announcement post](https://www.patreon.com/posts/note-history-now-27083082).
# External text editor
Joplin notes can be opened and edited using an external editor of your choice. It can be a simple text editor like Notepad++ or Sublime Text or an actual Markdown editor like Typora. In that case, images will also be displayed within the editor. To open the note in an external editor, click on the icon in the toolbar or press Ctrl+E (or Cmd+E). Your default text editor will be used to open the note. If needed, you can also specify the editor directly in the General Options, under "Text editor command".
@@ -323,8 +333,8 @@ Please see the [donation page](https://joplinapp.org/donate/) for information on
# Community
- For general discussion about Joplin, user support, software development questions, and to discuss new features, go to the [Joplin Forum](https://discourse.joplin.cozic.net/). It is possible to login with your GitHub account.
- Also see here for information about [the latest releases and general news](https://discourse.joplin.cozic.net/c/news).
- For general discussion about Joplin, user support, software development questions, and to discuss new features, go to the [Joplin Forum](https://discourse.joplinapp.org/). It is possible to login with your GitHub account.
- Also see here for information about [the latest releases and general news](https://discourse.joplinapp.org/c/news).
- For bug reports and feature requests, go to the [GitHub Issue Tracker](https://github.com/laurent22/joplin/issues).
- The latest news are posted [on the Patreon page](https://www.patreon.com/joplin).
@@ -350,32 +360,34 @@ Current translations:
<!-- LOCALE-TABLE-AUTO-GENERATED -->
&nbsp; | Language | Po File | Last translator | Percent done
---|---|---|---|---
![](https://joplinapp.org/images/flags/country-4x3/arableague.png) | Arabic | [ar](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ar.po) | عبد الناصر سعيد (as@althobaity.com) | 93%
![](https://joplinapp.org/images/flags/es/basque_country.png) | Basque | [eu](https://github.com/laurent22/joplin/blob/master/CliClient/locales/eu.po) | juan.abasolo@ehu.eus | 53%
![](https://joplinapp.org/images/flags/country-4x3/arableague.png) | Arabic | [ar](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ar.po) | عبد الناصر سعيد (as@althobaity.com) | 92%
![](https://joplinapp.org/images/flags/es/basque_country.png) | Basque | [eu](https://github.com/laurent22/joplin/blob/master/CliClient/locales/eu.po) | juan.abasolo@ehu.eus | 52%
![](https://joplinapp.org/images/flags/es/catalonia.png) | Catalan | [ca](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ca.po) | jmontane, 2018 | 75%
![](https://joplinapp.org/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) | 43%
![](https://joplinapp.org/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) | 93%
![](https://joplinapp.org/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. | 68%
![](https://joplinapp.org/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) | 97%
![](https://joplinapp.org/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) | 42%
![](https://joplinapp.org/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) | 92%
![](https://joplinapp.org/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. | 67%
![](https://joplinapp.org/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://joplinapp.org/images/flags/country-4x3/gb.png) | English (UK) | [en_GB](https://github.com/laurent22/joplin/blob/master/CliClient/locales/en_GB.po) | | 100%
![](https://joplinapp.org/images/flags/country-4x3/us.png) | English (US) | [en_US](https://github.com/laurent22/joplin/blob/master/CliClient/locales/en_US.po) | | 100%
![](https://joplinapp.org/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) | 93%
![](https://joplinapp.org/images/flags/country-4x3/fr.png) | Français | [fr_FR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/fr_FR.po) | Laurent Cozic | 97%
![](https://joplinapp.org/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) | 67%
![](https://joplinapp.org/images/flags/country-4x3/it.png) | Italiano | [it_IT](https://github.com/laurent22/joplin/blob/master/CliClient/locales/it_IT.po) | | 83%
![](https://joplinapp.org/images/flags/country-4x3/be.png) | Nederlands | [nl_BE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nl_BE.po) | | 53%
![](https://joplinapp.org/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) | 81%
![](https://joplinapp.org/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) | 92%
![](https://joplinapp.org/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://joplinapp.org/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) | 66%
![](https://joplinapp.org/images/flags/country-4x3/it.png) | Italiano | [it_IT](https://github.com/laurent22/joplin/blob/master/CliClient/locales/it_IT.po) | | 82%
![](https://joplinapp.org/images/flags/country-4x3/be.png) | Nederlands | [nl_BE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nl_BE.po) | | 52%
![](https://joplinapp.org/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) | 80%
![](https://joplinapp.org/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://joplinapp.org/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) | 87%
![](https://joplinapp.org/images/flags/country-4x3/ro.png) | Română | [ro](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ro.po) | | 53%
![](https://joplinapp.org/images/flags/country-4x3/si.png) | Slovenian | [sl_SI](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sl_SI.po) | | 66%
![](https://joplinapp.org/images/flags/country-4x3/se.png) | Svenska | [sv](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sv.po) | Jonatan Nyberg (jonatan@autistici.org) | 90%
![](https://joplinapp.org/images/flags/country-4x3/ir.png) | Persian | [fa](https://github.com/laurent22/joplin/blob/master/CliClient/locales/fa.po) | Mehrad Mahmoudian (mehrad@mahmoudian.me) | 36%
![](https://joplinapp.org/images/flags/country-4x3/pl.png) | Polski | [pl_PL](https://github.com/laurent22/joplin/blob/master/CliClient/locales/pl_PL.po) | | 98%
![](https://joplinapp.org/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) | 98%
![](https://joplinapp.org/images/flags/country-4x3/ro.png) | Română | [ro](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ro.po) | | 52%
![](https://joplinapp.org/images/flags/country-4x3/si.png) | Slovenian | [sl_SI](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sl_SI.po) | | 65%
![](https://joplinapp.org/images/flags/country-4x3/se.png) | Svenska | [sv](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sv.po) | Jonatan Nyberg (jonatan@autistici.org) | 89%
![](https://joplinapp.org/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) | 87%
![](https://joplinapp.org/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) | 93%
![](https://joplinapp.org/images/flags/country-4x3/cn.png) | 中文 (简体) | [zh_CN](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_CN.po) | | 93%
![](https://joplinapp.org/images/flags/country-4x3/tw.png) | 中文 (繁體) | [zh_TW](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_TW.po) | penguinsam (samliu@gmail.com) | 81%
![](https://joplinapp.org/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) | 92%
![](https://joplinapp.org/images/flags/country-4x3/cn.png) | 中文 (简体) | [zh_CN](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_CN.po) | | 98%
![](https://joplinapp.org/images/flags/country-4x3/tw.png) | 中文 (繁體) | [zh_TW](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_TW.po) | penguinsam (samliu@gmail.com) | 80%
![](https://joplinapp.org/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) | 87%
![](https://joplinapp.org/images/flags/country-4x3/kr.png) | 한국말 | [ko](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ko.po) | | 89%
![](https://joplinapp.org/images/flags/country-4x3/kr.png) | 한국말 | [ko](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ko.po) | | 88%
<!-- 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 2097488
versionName "1.0.252"
versionCode 2097491
versionName "1.0.255"
ndk {
abiFilters "armeabi-v7a", "x86"
}

View File

@@ -279,6 +279,12 @@ class BaseApplication {
}
}
resourceFetcher_downloadComplete(event) {
if (event.encrypted) {
DecryptionWorker.instance().scheduleStart();
}
}
reducerActionToString(action) {
let o = [action.type];
if ('id' in action) o.push(action.id);
@@ -426,7 +432,7 @@ class BaseApplication {
}
if (this.hasGui() && action.type === 'SYNC_CREATED_RESOURCE') {
ResourceFetcher.instance().queueDownload(action.id);
ResourceFetcher.instance().autoAddResources();
}
if (refreshFolders) {
@@ -561,6 +567,8 @@ class BaseApplication {
this.database_.setLogger(this.dbLogger_);
await this.database_.open({ name: profileDir + '/database.sqlite' });
// if (Setting.value('env') === 'dev') await this.database_.clearForTesting();
reg.setDb(this.database_);
BaseModel.db_ = this.database_;
@@ -603,6 +611,7 @@ class BaseApplication {
ResourceFetcher.instance().setFileApi(() => { return reg.syncTarget().fileApi() });
ResourceFetcher.instance().setLogger(this.logger_);
ResourceFetcher.instance().on('downloadComplete', this.resourceFetcher_downloadComplete);
ResourceFetcher.instance().start();
SearchEngine.instance().setDb(reg.db());

View File

@@ -20,18 +20,18 @@ const rules = {
const setupLinkify = require('./MdToHtml/setupLinkify');
const hljs = require('highlight.js');
const markdownItAnchor = require('markdown-it-anchor');
const markdownItToc = require('markdown-it-toc-done-right');
// The keys must match the corresponding entry in Setting.js
const plugins = {
mark: require('markdown-it-mark'),
footnote: require('markdown-it-footnote'),
sub: require('markdown-it-sub'),
sup: require('markdown-it-sup'),
deflist: require('markdown-it-deflist'),
abbr: require('markdown-it-abbr'),
emoji: require('markdown-it-emoji'),
insert: require('markdown-it-ins'),
multitable: require('markdown-it-multimd-table'),
mark: {module: require('markdown-it-mark')},
footnote: {module: require('markdown-it-footnote')},
sub: {module: require('markdown-it-sub')},
sup: {module: require('markdown-it-sup')},
deflist: {module: require('markdown-it-deflist')},
abbr: {module: require('markdown-it-abbr')},
emoji: {module: require('markdown-it-emoji')},
insert: {module: require('markdown-it-ins')},
multitable: {module: require('markdown-it-multimd-table'), options: { enableMultilineRows: true, enableRowspan: true }},
toc: {module: require('markdown-it-toc-done-right'), options: { listType: 'ul' }},
};
class MdToHtml {
@@ -129,12 +129,10 @@ class MdToHtml {
markdownIt.use(rules.highlight_keywords(context, ruleOptions));
markdownIt.use(rules.code_inline(context, ruleOptions));
markdownIt.use(markdownItAnchor)
if (Setting.value('markdown.plugin.toc'))
markdownIt.use(markdownItToc, { listType: 'ul' })
for (let key in plugins) {
if (Setting.value('markdown.plugin.' + key))
markdownIt.use(plugins[key]);
markdownIt.use(plugins[key].module, plugins[key].options);
}
setupLinkify(markdownIt);

View File

@@ -19,6 +19,9 @@ module.exports = function(style, options) {
font-family: ` + fontFamily + `;
padding-bottom: ` + options.paddingBottom + `;
}
strong {
color: ` + style.colorBright + `
}
::-webkit-scrollbar {
width: 7px;
height: 7px;
@@ -161,6 +164,29 @@ module.exports = function(style, options) {
color: black;
}
.not-loaded-resource img {
width: 1.15em;
height: 1.15em;
background: white;
padding: 2px !important;
border-radius: 2px;
box-shadow: 0 1px 3px #000000aa;
}
a.not-loaded-resource img {
margin-right: .2em;
}
a.not-loaded-resource {
display: flex;
flex-direction: row;
align-items: center;
}
.checkbox-label-checked {
opacity: 0.5;
}
@media print {
body {
height: auto !important;

View File

@@ -32,7 +32,16 @@ function createPrefixTokens(Token, id, checked, label, postMessageSyntax, source
// 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;";
const labelId = 'cb-label-' + id;
const js = `
${postMessageSyntax}('checkboxclick:${checkedString}:${lineIndex}');
const label = document.getElementById("${labelId}");
label.classList.remove(this.checked ? 'checkbox-label-unchecked' : 'checkbox-label-checked');
label.classList.add(this.checked ? 'checkbox-label-checked' : 'checkbox-label-unchecked');
return true;
`;
token = new Token('checkbox_input', 'input', 0);
token.attrs = [
@@ -44,7 +53,11 @@ function createPrefixTokens(Token, id, checked, label, postMessageSyntax, source
tokens.push(token);
token = new Token('label_open', 'label', 1);
token.attrs = [['for', id]];
token.attrs = [
['id', labelId],
['for', id],
['class', 'checkbox-label-' + checkedString],
];
tokens.push(token);
if (label) {

View File

@@ -5,8 +5,14 @@ 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 result = ruleOptions.resources[resourceId];
const resource = result ? result.item : null;
const resourceStatus = utils.resourceStatus(result);
if (resourceStatus !== 'ready') {
const icon = utils.resourceStatusImage(resourceStatus);
return '<div class="not-loaded-resource resource-status-' + resourceStatus + '" data-resource-id="' + resourceId + '">' + '<img src="data:image/svg+xml;utf8,' + htmlentities(icon) + '"/>' + '</div>';
}
const mime = resource.mime ? resource.mime.toLowerCase() : '';
if (Resource.isSupportedImageMimeType(mime)) {

View File

@@ -14,8 +14,14 @@ function installRule(markdownIt, mdOptions, ruleOptions) {
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 result = ruleOptions.resources[resourceId];
const resource = result ? result.item : null;
const resourceStatus = utils.resourceStatus(result);
if (resourceStatus !== 'ready') {
const icon = utils.resourceStatusImage(resourceStatus);
return '<div class="not-loaded-resource resource-status-' + resourceStatus + '" data-resource-id="' + resourceId + '">' + '<img src="data:image/svg+xml;utf8,' + htmlentities(icon) + '"/>' + '</div>';
}
const mime = resource.mime ? resource.mime.toLowerCase() : '';
if (Resource.isSupportedImageMimeType(mime)) {

View File

@@ -18,9 +18,19 @@ function installRule(markdownIt, mdOptions, ruleOptions) {
let hrefAttr = '#';
if (isResourceUrl) {
const resourceId = Resource.pathToId(href);
href = "joplin://" + resourceId;
resourceIdAttr = "data-resource-id='" + resourceId + "'";
icon = '<span class="resource-icon"></span>';
const result = ruleOptions.resources[resourceId];
const resource = result ? result.item : null;
const resourceStatus = utils.resourceStatus(result);
if (result && resourceStatus !== 'ready') {
const icon = utils.resourceStatusFile(resourceStatus);
return '<a class="not-loaded-resource resource-status-' + resourceStatus + '" data-resource-id="' + resourceId + '">' + '<img src="data:image/svg+xml;utf8,' + htmlentities(icon) + '"/>';
} else {
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.
@@ -29,7 +39,6 @@ function installRule(markdownIt, mdOptions, ruleOptions) {
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;
};
}

View File

@@ -1,14 +1,94 @@
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;
const Resource = require('lib/models/Resource.js');
const utils = {};
utils.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;
}
utils.notDownloadedResource = function() {
return `
<svg width="1700" height="1536" xmlns="http://www.w3.org/2000/svg">
<path d="M1280 1344c0-35-29-64-64-64s-64 29-64 64 29 64 64 64 64-29 64-64zm256 0c0-35-29-64-64-64s-64 29-64 64 29 64 64 64 64-29 64-64zm128-224v320c0 53-43 96-96 96H96c-53 0-96-43-96-96v-320c0-53 43-96 96-96h465l135 136c37 36 85 56 136 56s99-20 136-56l136-136h464c53 0 96 43 96 96zm-325-569c10 24 5 52-14 70l-448 448c-12 13-29 19-45 19s-33-6-45-19L339 621c-19-18-24-46-14-70 10-23 33-39 59-39h256V64c0-35 29-64 64-64h256c35 0 64 29 64 64v448h256c26 0 49 16 59 39z"/>
</svg>
`;
}
utils.notDownloadedImage = function() {
// https://github.com/ForkAwesome/Fork-Awesome/blob/master/src/icons/svg/file-image-o.svg
// Height changed to 1795
return `
<svg width="1925" height="1792" xmlns="http://www.w3.org/2000/svg">
<path d="M640 576c0 106-86 192-192 192s-192-86-192-192 86-192 192-192 192 86 192 192zm1024 384v448H256v-192l320-320 160 160 512-512zm96-704H160c-17 0-32 15-32 32v1216c0 17 15 32 32 32h1600c17 0 32-15 32-32V288c0-17-15-32-32-32zm160 32v1216c0 88-72 160-160 160H160c-88 0-160-72-160-160V288c0-88 72-160 160-160h1600c88 0 160 72 160 160z"/>
</svg>
`;
}
utils.notDownloadedFile = function() {
// https://github.com/ForkAwesome/Fork-Awesome/blob/master/src/icons/svg/file-o.svg
return `
<svg width="1925" height="1792" xmlns="http://www.w3.org/2000/svg">
<path d="M1468 380c37 37 68 111 68 164v1152c0 53-43 96-96 96H96c-53 0-96-43-96-96V96C0 43 43 0 96 0h896c53 0 127 31 164 68zm-444-244v376h376c-6-17-15-34-22-41l-313-313c-7-7-24-16-41-22zm384 1528V640H992c-53 0-96-43-96-96V128H128v1536h1280z"/>
</svg>
`;
}
utils.errorImage = function() {
// https://github.com/ForkAwesome/Fork-Awesome/blob/master/src/icons/svg/times-circle.svg
return `
<svg width="1795" height="1795" xmlns="http://www.w3.org/2000/svg">
<path d="M1149 1122c0-17-7-33-19-45L949 896l181-181c12-12 19-28 19-45s-7-34-19-46l-90-90c-12-12-29-19-46-19s-33 7-45 19L768 715 587 534c-12-12-28-19-45-19s-34 7-46 19l-90 90c-12 12-19 29-19 46s7 33 19 45l181 181-181 181c-12 12-19 28-19 45s7 34 19 46l90 90c12 12 29 19 46 19s33-7 45-19l181-181 181 181c12 12 28 19 45 19s34-7 46-19l90-90c12-12 19-29 19-46zm387-226c0 424-344 768-768 768S0 1320 0 896s344-768 768-768 768 344 768 768z"/>
</svg>
`;
}
utils.loaderImage = function() {
// https://github.com/ForkAwesome/Fork-Awesome/blob/master/src/icons/svg/hourglass-half.svg
return `
<svg width="1536" height="1790" xmlns="http://www.w3.org/2000/svg">
<path d="M1408 128c0 370-177 638-373 768 196 130 373 398 373 768h96c18 0 32 14 32 32v64c0 18-14 32-32 32H32c-18 0-32-14-32-32v-64c0-18 14-32 32-32h96c0-370 177-638 373-768-196-130-373-398-373-768H32c-18 0-32-14-32-32V32C0 14 14 0 32 0h1472c18 0 32 14 32 32v64c0 18-14 32-32 32h-96zm-128 0H256c0 146 33 275 85 384h854c52-109 85-238 85-384zm-57 1216c-74-193-207-330-340-384H653c-133 54-266 191-340 384h910z"/>
</svg>
`;
}
utils.resourceStatusImage = function(state) {
if (state === 'notDownloaded') return utils.notDownloadedResource();
return utils.resourceStatusFile(state);
}
utils.resourceStatusFile = function(state) {
if (state === 'notDownloaded') return utils.notDownloadedResource();
if (state === 'downloading') return utils.loaderImage();
if (state === 'encrypted') return utils.loaderImage();
if (state === 'error') return utils.errorImage();
throw new Error('Unknown state: ' + state);
}
utils.resourceStatus = function(resourceInfo, localState) {
let resourceStatus = 'ready';
if (resourceInfo) {
const resource = resourceInfo.item;
const localState = resourceInfo.localState;
if (localState.fetch_status === Resource.FETCH_STATUS_IDLE) {
resourceStatus = 'notDownloaded';
} else if (localState.fetch_status === Resource.FETCH_STATUS_STARTED) {
resourceStatus = 'downloading';
} else if (localState.fetch_status === Resource.FETCH_STATUS_DONE) {
if (resource.encryption_blob_encrypted || resource.encryption_applied) {
resourceStatus = 'encrypted';
}
}
return defaultValue;
},
} else {
resourceStatus = 'notDownloaded';
}
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>';
},
return resourceStatus;
}
};
module.exports = utils;

View File

@@ -1,7 +1,33 @@
const webviewLib = {};
let manualDownloadResourceElements = [];
webviewLib.onUnloadedResourceClick = function(event) {
const resourceId = event.currentTarget.getAttribute('data-resource-id');
webviewLib.options_.postMessage('markForDownload:' + resourceId);
}
webviewLib.setupResourceManualDownload = function() {
for (const element of manualDownloadResourceElements) {
element.style.cursor = 'default';
element.removeEventListener('click', webviewLib.onUnloadedResourceClick);
}
manualDownloadResourceElements = [];
const elements = document.getElementsByClassName('resource-status-notDownloaded');
for (const element of elements) {
element.style.cursor = 'pointer';
element.addEventListener('click', webviewLib.onUnloadedResourceClick);
manualDownloadResourceElements.push(element);
}
}
webviewLib.handleInternalLink = function(event, anchorNode) {
const href = anchorNode.getAttribute('href');
if (!href) return false;
if (href.indexOf('#') === 0) {
event.preventDefault();
let old_hash = location.hash;
@@ -18,6 +44,7 @@ webviewLib.handleInternalLink = function(event, anchorNode) {
setTimeout(function() { location.hash = old_hash; }, 10);
return true;
}
return false;
}
@@ -36,6 +63,24 @@ webviewLib.getParentAnchorElement = function(element) {
}
}
webviewLib.cloneError = function(error) {
return {
message: error.message,
stack: error.stack
};
}
webviewLib.logEnabledEventHandler = function(fn) {
return function(event) {
try {
return fn(event);
} catch (error) {
webviewLib.options_.postMessage('error:' + JSON.stringify(webviewLib.cloneError(error)));
throw error;
}
}
}
webviewLib.initialize = function(options) {
webviewLib.options_ = options;
}
@@ -52,9 +97,8 @@ document.addEventListener('click', function(event) {
// as Katex.
if (!anchor.hasAttribute('data-from-md')) {
if (webviewLib.handleInternalLink(event, anchor)) return;
event.preventDefault();
webviewLib.options_.postMessage(anchor.getAttribute('href'));
if (anchor.getAttribute('href')) webviewLib.options_.postMessage(anchor.getAttribute('href'));
return;
}
@@ -63,3 +107,4 @@ document.addEventListener('click', function(event) {
if (webviewLib.handleInternalLink(event, anchor)) return;
}
});

View File

@@ -104,11 +104,19 @@ class NoteBodyViewer extends Component {
let result = this.mdToHtml_.render(bodyToRender, this.props.webViewStyle, mdOptions);
let html = result.html;
const resourceDownloadMode = Setting.value('sync.resourceDownloadMode');
const injectedJs = [this.mdToHtml_.injectedJavaScript()];
injectedJs.push(shim.injectedJs('webviewLib'));
injectedJs.push('webviewLib.initialize({ postMessage: postMessage });');
console.info(injectedJs);
injectedJs.push('webviewLib.initialize({ postMessage: msg => { return postMessage(msg); } });');
injectedJs.push(`
const readyStateCheckInterval = setInterval(function() {
if (document.readyState === "complete") {
clearInterval(readyStateCheckInterval);
if ("${resourceDownloadMode}" === "manual") webviewLib.setupResourceManualDownload();
}
}, 10);
`);
html = `
<!DOCTYPE html>
@@ -169,12 +177,15 @@ class NoteBodyViewer extends Component {
onMessage={(event) => {
let msg = event.nativeEvent.data;
console.info('Got IPC message: ', msg);
if (msg.indexOf('checkboxclick:') === 0) {
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]);
} else if (msg.indexOf('markForDownload:') === 0) {
msg = msg.split(':');
const resourceId = msg[1];
if (this.props.onMarkForDownload) this.props.onMarkForDownload({ resourceId: resourceId });
} else {
this.props.onJoplinLinkClick(msg);
}

View File

@@ -66,12 +66,21 @@ class ConfigScreenComponent extends BaseScreenComponent {
color: theme.color,
fontSize: theme.fontSize,
flex: 1,
paddingRight: 5,
},
descriptionText: {
color: theme.color,
fontSize: theme.fontSize,
flex: 1,
},
settingDescriptionText: {
color: theme.color,
fontSize: theme.fontSize,
flex: 1,
paddingLeft: theme.marginLeft,
paddingRight: theme.marginRight,
paddingBottom: theme.marginBottom,
},
permissionText: {
color: theme.color,
fontSize: theme.fontSize,
@@ -84,10 +93,13 @@ class ConfigScreenComponent extends BaseScreenComponent {
},
}
// if (Platform.OS === 'ios') {
styles.settingControl.borderBottomWidth = 1;
styles.settingControl.borderBottomColor = theme.strongDividerColor;
// }
styles.settingContainerNoBottomBorder = Object.assign({}, styles.settingContainer, {
borderBottomWidth: 0,
paddingBottom: theme.marginBottom / 2,
});
styles.settingControl.borderBottomWidth = 1;
styles.settingControl.borderBottomColor = theme.strongDividerColor;
styles.switchSettingText = Object.assign({}, styles.settingText);
styles.switchSettingText.width = '80%';
@@ -121,6 +133,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
}
const md = Setting.settingMetadata(key);
const settingDescription = md.description ? md.description() : '';
if (md.isEnum) {
value = value.toString();
@@ -132,27 +145,33 @@ class ConfigScreenComponent extends BaseScreenComponent {
items.push({ label: settingOptions[k], value: k.toString() });
}
const descriptionComp = !settingDescription ? null : <Text style={this.styles().settingDescriptionText}>{settingDescription}</Text>
const containerStyle = !settingDescription ? this.styles().settingContainer : this.styles().settingContainerNoBottomBorder;
return (
<View key={key} style={this.styles().settingContainer}>
<Text key="label" style={this.styles().settingText}>{md.label()}</Text>
<Dropdown
key="control"
style={this.styles().settingControl}
items={items}
selectedValue={value}
itemListStyle={{
backgroundColor: theme.backgroundColor,
}}
headerStyle={{
color: theme.color,
fontSize: theme.fontSize,
}}
itemStyle={{
color: theme.color,
fontSize: theme.fontSize,
}}
onValueChange={(itemValue, itemIndex) => { updateSettingValue(key, itemValue); }}
/>
<View style={{flexDirection:'column', borderBottomWidth: 1, borderBottomColor: theme.dividerColor}}>
<View key={key} style={containerStyle}>
<Text key="label" style={this.styles().settingText}>{md.label()}</Text>
<Dropdown
key="control"
style={this.styles().settingControl}
items={items}
selectedValue={value}
itemListStyle={{
backgroundColor: theme.backgroundColor,
}}
headerStyle={{
color: theme.color,
fontSize: theme.fontSize,
}}
itemStyle={{
color: theme.color,
fontSize: theme.fontSize,
}}
onValueChange={(itemValue, itemIndex) => { updateSettingValue(key, itemValue); }}
/>
</View>
{descriptionComp}
</View>
);
} else if (md.type == Setting.TYPE_BOOL) {

View File

@@ -164,10 +164,11 @@ class NoteScreenComponent extends BaseScreenComponent {
}
}
this.resourceFetcher_downloadComplete = async (resource) => {
this.refreshResource = async (resource) => {
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) {
shared.clearResourceCache();
const attachedResources = await shared.attachedResources(this.state.note.body);
this.setState({ noteResources: attachedResources }, () => {
this.refs.noteBodyViewer.rebuildMd();
@@ -178,6 +179,7 @@ class NoteScreenComponent extends BaseScreenComponent {
this.takePhoto_onPress = this.takePhoto_onPress.bind(this);
this.cameraView_onPhoto = this.cameraView_onPhoto.bind(this);
this.cameraView_onCancel = this.cameraView_onCancel.bind(this);
this.onMarkForDownload = this.onMarkForDownload.bind(this);
}
styles() {
@@ -235,13 +237,23 @@ class NoteScreenComponent extends BaseScreenComponent {
BackButtonService.addHandler(this.backHandler);
NavService.addHandler(this.navHandler);
ResourceFetcher.instance().on('downloadComplete', this.resourceFetcher_downloadComplete);
shared.clearResourceCache();
shared.installResourceHandling(this.refreshResource);
await shared.initState(this);
if (this.state.note && this.state.note.body && Setting.value('sync.resourceDownloadMode') === 'auto') {
const resourceIds = await Note.linkedResourceIds(this.state.note.body);
await ResourceFetcher.instance().markForDownload(resourceIds);
}
this.refreshNoteMetadata();
}
onMarkForDownload(event) {
ResourceFetcher.instance().markForDownload(event.resourceId);
}
refreshNoteMetadata(force = null) {
return shared.refreshNoteMetadata(this, force);
}
@@ -250,7 +262,7 @@ class NoteScreenComponent extends BaseScreenComponent {
BackButtonService.removeHandler(this.backHandler);
NavService.removeHandler(this.navHandler);
ResourceFetcher.instance().off('downloadComplete', this.resourceFetcher_downloadComplete);
shared.uninstallResourceHandling(this.refreshResource);
if (Platform.OS !== 'ios' && this.state.fromShare) {
ShareExtension.close();
@@ -626,6 +638,7 @@ class NoteScreenComponent extends BaseScreenComponent {
highlightedKeywords={keywords}
theme={this.props.theme}
onCheckboxChange={(newBody) => { onCheckboxChange(newBody) }}
onMarkForDownload={this.onMarkForDownload}
onLoadEnd={() => {
setTimeout(() => {
this.setState({ HACK_webviewLoadingState: 1 });

View File

@@ -3,6 +3,8 @@ const Folder = require('lib/models/Folder.js');
const BaseModel = require('lib/BaseModel.js');
const Note = require('lib/models/Note.js');
const Resource = require('lib/models/Resource.js');
const ResourceFetcher = require('lib/services/ResourceFetcher.js');
const DecryptionWorker = require('lib/services/DecryptionWorker.js');
const Setting = require('lib/models/Setting.js');
const Mutex = require('async-mutex').Mutex;
@@ -154,7 +156,11 @@ shared.noteComponent_change = function(comp, propName, propValue) {
comp.setState(newState);
}
const resourceCache_ = {};
let resourceCache_ = {};
shared.clearResourceCache = function() {
resourceCache_ = {};
}
shared.attachedResources = async function(noteBody) {
if (!noteBody) return {};
@@ -163,14 +169,20 @@ shared.attachedResources = async function(noteBody) {
const output = {};
for (let i = 0; i < resourceIds.length; i++) {
const id = resourceIds[i];
if (resourceCache_[id]) {
output[id] = resourceCache_[id];
} else {
const resource = await Resource.load(id);
const isReady = await Resource.isReady(resource);
if (!isReady) continue;
resourceCache_[id] = resource;
output[id] = resource;
const localState = await Resource.localState(resource);
const o = {
item: resource,
localState: localState,
};
resourceCache_[id] = o;
output[id] = o;
}
}
@@ -269,4 +281,16 @@ shared.toggleCheckbox = function(ipcMessage, noteBody) {
return newBody.join('\n')
}
shared.installResourceHandling = function(refreshResourceHandler) {
ResourceFetcher.instance().on('downloadComplete', refreshResourceHandler);
ResourceFetcher.instance().on('downloadStarted', refreshResourceHandler);
DecryptionWorker.instance().on('resourceDecrypted', refreshResourceHandler);
}
shared.uninstallResourceHandling = function(refreshResourceHandler) {
ResourceFetcher.instance().off('downloadComplete', refreshResourceHandler);
ResourceFetcher.instance().off('downloadStarted', refreshResourceHandler);
DecryptionWorker.instance().off('resourceDecrypted', refreshResourceHandler);
}
module.exports = shared;

View File

@@ -1,6 +1,7 @@
const Setting = require('lib/models/Setting');
const Tag = require('lib/models/Tag');
const { reg } = require('lib/registry.js');
const ResourceFetcher = require('lib/services/ResourceFetcher');
const reduxSharedMiddleware = async function(store, next, action) {
const newState = store.getState();
@@ -15,6 +16,10 @@ const reduxSharedMiddleware = async function(store, next, action) {
reg.resetSyncTarget();
}
if (action.type === 'SETTING_UPDATE_ONE' && action.key === 'sync.resourceDownloadMode') {
ResourceFetcher.instance().autoAddResources();
}
if (action.type == 'NOTE_DELETE') {
refreshTags = true;
}

View File

@@ -207,13 +207,13 @@ class SideMenuContentComponent extends Component {
let resourceFetcherText = '';
if (this.props.resourceFetcher && this.props.resourceFetcher.toFetchCount) {
resourceFetcherText = _('Fetching resources: %d', this.props.resourceFetcher.toFetchCount);
resourceFetcherText = _('Fetching resources: %d/%d', this.props.resourceFetcher.fetchingCount, this.props.resourceFetcher.toFetchCount);
}
let fullReport = [];
if (syncReportText) fullReport.push(syncReportText);
// if (fullReport.length) fullReport.push('');
if (resourceFetcherText) lines.push(resourceFetcherText);
if (resourceFetcherText) fullReport.push(resourceFetcherText);
if (decryptionReportText) fullReport.push(decryptionReportText);
while (fullReport.length < 12) fullReport.push(''); // Add blank lines so that height of report text is fixed and doesn't affect scrolling

View File

@@ -162,6 +162,35 @@ class JoplinDatabase extends Database {
return output;
}
async clearForTesting() {
const tableNames = [
'notes',
'folders',
'resources',
'tags',
'note_tags',
// 'master_keys',
'item_changes',
'note_resources',
// 'settings',
'deleted_items',
'sync_items',
'notes_normalized',
'revisions',
'resources_to_download',
];
const queries = [];
for (const n of tableNames) {
queries.push('DELETE FROM ' + n);
queries.push('DELETE FROM sqlite_sequence WHERE name="' + n + '"'); // Reset autoincremented IDs
}
queries.push('DELETE FROM settings WHERE key="sync.7.context"');
await this.transactionExecBatch(queries);
}
createDefaultRow(tableName) {
const row = {};
const fields = this.tableFields('resource_local_states');
@@ -263,7 +292,7 @@ class JoplinDatabase extends Database {
// must be set in the synchronizer too.
// Note: v16 and v17 don't do anything. They were used to debug an issue.
const existingDatabaseVersions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21];
const existingDatabaseVersions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22];
let currentVersionIndex = existingDatabaseVersions.indexOf(fromVersion);
@@ -564,6 +593,21 @@ class JoplinDatabase extends Database {
queries.push('ALTER TABLE sync_items ADD COLUMN item_location INT NOT NULL DEFAULT 1');
}
if (targetVersion == 22) {
const newTableSql = `
CREATE TABLE resources_to_download (
id INTEGER PRIMARY KEY,
resource_id TEXT NOT NULL,
updated_time INT NOT NULL,
created_time INT NOT NULL
);
`;
queries.push(this.sqlStringToLines(newTableSql)[0]);
queries.push('CREATE INDEX resources_to_download_resource_id ON resources_to_download (resource_id)');
queries.push('CREATE INDEX resources_to_download_updated_time ON resources_to_download (updated_time)');
}
queries.push({ sql: 'UPDATE version SET version = ?', params: [targetVersion] });
try {

View File

@@ -458,7 +458,13 @@ class BaseItem extends BaseModel {
const className = classNames[i];
const ItemClass = this.getClass(className);
const whereSql = className === 'Resource' ? ['(encryption_blob_encrypted = 1 OR encryption_applied = 1)'] : ['encryption_applied = 1'];
let whereSql = ['encryption_applied = 1'];
if (className === 'Resource') {
const blobDownloadedButEncryptedSql = 'encryption_blob_encrypted = 1 AND id IN (SELECT resource_id FROM resource_local_states WHERE fetch_status = 2))';
whereSql = ['(encryption_applied = 1 OR (' + blobDownloadedButEncryptedSql + ')'];
}
if (exclusions.length) whereSql.push('id NOT IN ("' + exclusions.join('","') + '")');
const sql = sprintf(`

View File

@@ -32,15 +32,14 @@ class Resource extends BaseItem {
return imageMimeTypes.indexOf(type.toLowerCase()) >= 0;
}
static needToBeFetched(limit = null) {
let sql = 'SELECT * FROM resources WHERE id IN (SELECT resource_id FROM resource_local_states WHERE fetch_status = ?) ORDER BY updated_time DESC';
if (limit !== null) sql += ' LIMIT ' + limit;
return this.modelSelectAll(sql, [Resource.FETCH_STATUS_IDLE]);
}
static async needToBeFetchedCount() {
const r = await this.db().selectOne('SELECT count(*) as total FROM resource_local_states WHERE fetch_status = ?', [Resource.FETCH_STATUS_IDLE]);
return r ? r['total'] : 0;
static needToBeFetched(resourceDownloadMode = null, limit = null) {
let sql = ['SELECT * FROM resources WHERE encryption_applied = 0 AND id IN (SELECT resource_id FROM resource_local_states WHERE fetch_status = ?)'];
if (resourceDownloadMode !== 'always') {
sql.push('AND resources.id IN (SELECT resource_id FROM resources_to_download)');
}
sql.push('ORDER BY updated_time DESC');
if (limit !== null) sql.push('LIMIT ' + limit);
return this.modelSelectAll(sql.join(' '), [Resource.FETCH_STATUS_IDLE]);
}
static async resetStartedFetchStatus() {
@@ -52,13 +51,6 @@ class Resource extends BaseItem {
return Resource.fsDriver_;
}
static filename(resource, encryptedBlob = false) {
let extension = encryptedBlob ? 'crypted' : resource.file_extension;
if (!extension) extension = resource.mime ? mime.toFileExtension(resource.mime) : '';
extension = extension ? ('.' + extension) : '';
return resource.id + extension;
}
static friendlyFilename(resource) {
let output = safeFilename(resource.title); // Make sure not to allow spaces or any special characters as it's not supported in HTTP headers
if (!output) output = resource.id;
@@ -76,6 +68,13 @@ class Resource extends BaseItem {
return Setting.value('resourceDirName');
}
static filename(resource, encryptedBlob = false) {
let extension = encryptedBlob ? 'crypted' : resource.file_extension;
if (!extension) extension = resource.mime ? mime.toFileExtension(resource.mime) : '';
extension = extension ? ('.' + extension) : '';
return resource.id + extension;
}
static relativePath(resource, encryptedBlob = false) {
return Setting.value('resourceDirName') + '/' + this.filename(resource, encryptedBlob);
}
@@ -96,6 +95,13 @@ class Resource extends BaseItem {
const decryptedItem = item.encryption_cipher_text ? await super.decrypt(item) : Object.assign({}, item);
if (!decryptedItem.encryption_blob_encrypted) return decryptedItem;
const localState = await this.localState(item);
if (localState.fetch_status !== Resource.FETCH_STATUS_DONE) {
// Not an error - it means the blob has not been downloaded yet.
// It will be decrypted later on, once downloaded.
return decryptedItem;
}
const plainTextPath = this.fullPath(decryptedItem);
const encryptedPath = this.fullPath(decryptedItem, true);
const noExtPath = pathUtils.dirname(encryptedPath) + '/' + pathUtils.filename(encryptedPath);
@@ -109,12 +115,7 @@ class Resource extends BaseItem {
}
try {
// const stat = await this.fsDriver().stat(encryptedPath);
await this.encryptionService().decryptFile(encryptedPath, plainTextPath, {
// onProgress: (progress) => {
// console.info('Decryption: ', progress.doneSize / stat.size);
// },
});
await this.encryptionService().decryptFile(encryptedPath, plainTextPath);
} catch (error) {
if (error.code === 'invalidIdentifier') {
// As the identifier is invalid it most likely means that this is not encrypted data
@@ -149,12 +150,7 @@ class Resource extends BaseItem {
if (resource.encryption_blob_encrypted) return { path: encryptedPath, resource: resource };
try {
// const stat = await this.fsDriver().stat(plainTextPath);
await this.encryptionService().encryptFile(plainTextPath, encryptedPath, {
// onProgress: (progress) => {
// console.info(progress.doneSize / stat.size);
// },
});
await this.encryptionService().encryptFile(plainTextPath, encryptedPath);
} catch (error) {
if (error.code === 'ENOENT') throw new JoplinError('File not found:' + error.toString(), 'fileNotFound');
throw error;
@@ -244,6 +240,20 @@ class Resource extends BaseItem {
await ResourceLocalState.batchDelete(ids);
}
static async markForDownload(resourceId) {
// Insert the row only if it's not already there
const t = Date.now();
await this.db().exec('INSERT INTO resources_to_download (resource_id, updated_time, created_time) SELECT ?, ?, ? WHERE NOT EXISTS (SELECT 1 FROM resources_to_download WHERE resource_id = ?)', [resourceId, t, t, resourceId]);
}
static async downloadedButEncryptedBlobCount() {
const r = await this.db().selectOne('SELECT count(*) as total FROM resource_local_states WHERE fetch_status = ? AND resource_id IN (SELECT id FROM resources WHERE encryption_blob_encrypted = 1)', [
Resource.FETCH_STATUS_DONE,
]);
return r ? r.total : 0;
}
}
Resource.IMAGE_MAX_DIMENSION = 1920;

View File

@@ -69,6 +69,49 @@ class Revision extends BaseItem {
return output;
}
static patchStats(patch) {
if (typeof patch === 'object') throw new Error('Not implemented');
const countChars = diffLine => {
return unescape(diffLine).length - 1;
}
const lines = patch.split('\n');
let added = 0;
let removed = 0;
for (const line of lines) {
if (line.indexOf('-') === 0) {
removed += countChars(line);
continue;
}
if (line.indexOf('+') === 0) {
added += countChars(line);
continue;
}
}
return {
added: added,
removed: removed,
};
}
static revisionPatchStatsText(rev) {
const titleStats = this.patchStats(rev.title_diff);
const bodyStats = this.patchStats(rev.body_diff);
const total = {
added: titleStats.added + bodyStats.added,
removed: titleStats.removed + bodyStats.removed,
};
const output = [];
if (total.removed) output.push('-' + total.removed);
output.push('+' + total.added);
return output.join(', ');
}
static async countRevisions(itemType, itemId) {
const r = await this.db().selectOne('SELECT count(*) as total FROM revisions WHERE item_type = ? AND item_id = ?', [
itemType,

View File

@@ -82,7 +82,7 @@ class Setting extends BaseModel {
}
return options;
}},
'folders.sortOrder.reverse': { value: true, type: Setting.TYPE_BOOL, public: true, label: () => _('Reverse sort order'), appTypes: ['cli'] },
'folders.sortOrder.reverse': { value: false, type: Setting.TYPE_BOOL, public: true, label: () => _('Reverse sort order'), appTypes: ['cli'] },
'trackLocation': { value: true, type: Setting.TYPE_BOOL, section: 'note', public: true, label: () => _('Save geo-location with notes') },
'newTodoFocus': { value: 'title', type: Setting.TYPE_STRING, section: 'note', isEnum: true, public: true, appTypes: ['desktop'], label: () => _('When creating a new to-do:'), options: () => {
return {
@@ -155,6 +155,14 @@ class Setting extends BaseModel {
return SyncTargetRegistry.idAndLabelPlainObject();
}},
'sync.resourceDownloadMode': { value: 'always', type: Setting.TYPE_STRING, section: 'sync', public: true, isEnum: true, appTypes: ['mobile', 'desktop'], label: () => _('Attachment download behaviour'), description: () => _('In "Manual" mode, attachments are downloaded only when you click on them. In "Auto", they are downloaded when you open the note. In "Always", all the attachments are downloaded whether you open the note or not.'), options: () => {
return {
'always': _('Always'),
'manual': _('Manual'),
'auto': _('Auto'),
};
}},
'sync.2.path': { value: '', type: Setting.TYPE_STRING, section:'sync', show: (settings) => {
try {
return settings['sync.target'] == SyncTargetRegistry.nameToId('filesystem')

View File

@@ -487,7 +487,7 @@ const reducer = (state = defaultState, action) => {
newState = Object.assign({}, state);
newState.collapsedFolderIds = action.ids.slice();
break;
case 'TAG_UPDATE_ALL':
newState = Object.assign({}, state);

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