You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-24 20:19:10 +02:00
Compare commits
106 Commits
ios-v0.10.
...
cli-v0.10.
Author | SHA1 | Date | |
---|---|---|---|
|
2c9feae20b | ||
|
a81788b3fa | ||
|
88cfba53a3 | ||
|
d659d975cd | ||
|
0115e74163 | ||
|
685f541bb4 | ||
|
f9634ea283 | ||
|
6252a4d8c8 | ||
|
d13d7bec45 | ||
|
74e284d795 | ||
|
7b82dacbf2 | ||
|
f82162f94a | ||
|
e2d5128624 | ||
|
9074412472 | ||
|
0db9c66317 | ||
|
b22211fada | ||
|
7efeaa3a22 | ||
|
79efac2f71 | ||
|
9d7b7092f5 | ||
|
71e877d369 | ||
|
7e086a7730 | ||
|
3f810c71b0 | ||
|
500fbc5294 | ||
|
6d0f60d9a1 | ||
|
e19c26fdd1 | ||
|
86b86513d9 | ||
|
6ff19063ef | ||
|
6a75451539 | ||
|
70a33f8533 | ||
|
23722719f0 | ||
|
d499251206 | ||
|
d180e7b5e1 | ||
|
9e869a5b1f | ||
|
ab959623aa | ||
|
08d2655f13 | ||
|
20632ae1c1 | ||
|
bef7c38724 | ||
|
d1abf4971d | ||
|
d13c2cf8d7 | ||
|
3146273409 | ||
|
1891eb4998 | ||
|
70b03971f6 | ||
|
38c050b47e | ||
|
0bf5c9ebdd | ||
|
6683da804b | ||
|
7750b954fc | ||
|
edbff5a26a | ||
|
18846c11ed | ||
|
cc02c1d585 | ||
|
26bf7c4d46 | ||
|
2959fa1080 | ||
|
3f4f154949 | ||
|
4c0b472f67 | ||
|
0926755635 | ||
|
75f8234db5 | ||
|
b8e85e1587 | ||
|
b6add857f9 | ||
|
4e41731c08 | ||
|
6ac3b8a8f9 | ||
|
4756238821 | ||
|
7ab2b11c9d | ||
|
1eb1c5914c | ||
|
5780951f7d | ||
|
67e790e393 | ||
|
0d472486ca | ||
|
f5d26e0d81 | ||
|
e9bb5bee9d | ||
|
2c608bca3c | ||
|
d9c1e30e9b | ||
|
5bc72e2b44 | ||
|
df05d04dad | ||
|
888ac8f4c2 | ||
|
55266e5694 | ||
|
39c73e1649 | ||
|
3bf9d01f0a | ||
|
89ef33f7ca | ||
|
f71fe9a1a6 | ||
|
1008b1835b | ||
|
2ffa5419e2 | ||
|
bd20ecff78 | ||
|
a073514c46 | ||
|
c6ff14226f | ||
|
ee02f8255e | ||
|
5951ed3f55 | ||
|
f6fbf3ba0f | ||
|
9bce52a92a | ||
|
e44975622a | ||
|
92b857d83b | ||
|
671e538740 | ||
|
8a282fd2e1 | ||
|
2d218904d0 | ||
|
c3fbcb8feb | ||
|
64031ac6cf | ||
|
caae7f7cf8 | ||
|
d56b247adf | ||
|
11bdfbde61 | ||
|
a59bf55c16 | ||
|
043be1916c | ||
|
42e34b5c3b | ||
|
931083b2e2 | ||
|
cda623a95c | ||
|
0f343bccda | ||
|
a513f6f3f0 | ||
|
08d9e9b6aa | ||
|
09b9df4228 | ||
|
b9194e94aa |
@@ -44,6 +44,6 @@ before_install:
|
||||
script:
|
||||
- |
|
||||
cd ElectronClient/app
|
||||
rsync -aP ../../ReactNativeClient/lib/ lib/
|
||||
rsync -aP --delete ../../ReactNativeClient/lib/ lib/
|
||||
npm install
|
||||
yarn dist
|
||||
|
21
BUILD.md
21
BUILD.md
@@ -1,6 +1,6 @@
|
||||
# General information
|
||||
|
||||
- All the applications share the same library, which, for historical reasons, is in ReactNativeClient/lib. This library is copied to the relevant directories when builing each app.
|
||||
- All the applications share the same library, which, for historical reasons, is in ReactNativeClient/lib. This library is copied to the relevant directories when building each app.
|
||||
- The translations are built by running CliClient/build-translation.sh. You normally don't need to run this if you haven't updated the translation since the compiled files are on the repository.
|
||||
|
||||
## macOS dependencies
|
||||
@@ -21,7 +21,7 @@ If you get a node-gyp related error you might need to manually install it: `npm
|
||||
|
||||
```
|
||||
cd ElectronClient/app
|
||||
rsync -a ../../ReactNativeClient/lib/ lib/
|
||||
rsync --delete -a ../../ReactNativeClient/lib/ lib/
|
||||
npm install
|
||||
yarn dist
|
||||
```
|
||||
@@ -34,12 +34,17 @@ From `/ElectronClient` you can also run `run.sh` to run the app for testing.
|
||||
|
||||
# Building the Mobile application
|
||||
|
||||
From `/ReactNativeClient`, run `npm install`, then `react-native run-ios` or `react-native run-android`.
|
||||
First you need to setup React Native to build projects with native code. For this, follow the instructions on the [Get Started](https://facebook.github.io/react-native/docs/getting-started.html) tutorial, in the "Building Projects with Native Code" tab.
|
||||
|
||||
Then, from `/ReactNativeClient`, run `npm install`, then `react-native run-ios` or `react-native run-android`.
|
||||
|
||||
# Building the Terminal application
|
||||
|
||||
From `/CliClient`:
|
||||
- Run `npm install`
|
||||
- Then `build.sh`
|
||||
- Copy the translations to the build directory: `rsync -aP ../ReactNativeClient/locales/ build/locales/`
|
||||
- Run `run.sh` to start the application for testing.
|
||||
```
|
||||
cd CliClient
|
||||
npm install
|
||||
./build.sh
|
||||
rsync --delete -aP ../ReactNativeClient/locales/ build/locales/
|
||||
```
|
||||
|
||||
Run `run.sh` to start the application for testing.
|
6
CONTRIBUTING.md
Normal file
6
CONTRIBUTING.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Adding new features
|
||||
If you want to add a new feature, consider asking about it before implementing it to make sure it is within the scope of the project. Of course you are free to create the pull request directly but it is not guaranteed it is going to be accepted.
|
||||
|
||||
# Style
|
||||
- Only use tabs for indentation, not spaces.
|
||||
- Do not remove or add optional characters from other lines (such as colons or new line characters) as it can make the commit needlessly big, and create conflicts with other changes.
|
@@ -1,6 +1,6 @@
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { Logger } = require('lib/logger.js');
|
||||
const { Resource } = require('lib/models/resource.js');
|
||||
const Resource = require('lib/models/Resource.js');
|
||||
const { netUtils } = require('lib/net-utils.js');
|
||||
|
||||
const http = require("http");
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { Logger } = require('lib/logger.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { Resource } = require('lib/models/resource.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Resource = require('lib/models/Resource.js');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
const { reducer, defaultState } = require('lib/reducer.js');
|
||||
const { splitCommandString } = require('lib/string-utils.js');
|
||||
@@ -14,6 +14,7 @@ const chalk = require('chalk');
|
||||
const tk = require('terminal-kit');
|
||||
const TermWrapper = require('tkwidgets/framework/TermWrapper.js');
|
||||
const Renderer = require('tkwidgets/framework/Renderer.js');
|
||||
const DecryptionWorker = require('lib/services/DecryptionWorker');
|
||||
|
||||
const BaseWidget = require('tkwidgets/BaseWidget.js');
|
||||
const ListWidget = require('tkwidgets/ListWidget.js');
|
||||
@@ -65,6 +66,7 @@ class AppGui {
|
||||
// a regular command it's not necessary since the process
|
||||
// exits right away.
|
||||
reg.setupRecurrentSync();
|
||||
DecryptionWorker.instance().scheduleStart();
|
||||
}
|
||||
|
||||
store() {
|
||||
@@ -80,8 +82,16 @@ class AppGui {
|
||||
await this.renderer_.renderRoot();
|
||||
}
|
||||
|
||||
prompt(initialText = '', promptString = ':') {
|
||||
return this.widget('statusBar').prompt(initialText, promptString);
|
||||
termSaveState() {
|
||||
return this.term().saveState();
|
||||
}
|
||||
|
||||
termRestoreState(state) {
|
||||
return this.term().restoreState(state);
|
||||
}
|
||||
|
||||
prompt(initialText = '', promptString = ':', options = null) {
|
||||
return this.widget('statusBar').prompt(initialText, promptString, options);
|
||||
}
|
||||
|
||||
stdoutMaxWidth() {
|
||||
@@ -548,6 +558,10 @@ class AppGui {
|
||||
}
|
||||
|
||||
this.widget('console').scrollBottom();
|
||||
|
||||
// Invalidate so that the screen is redrawn in case inputting a command has moved
|
||||
// the GUI up (in particular due to autocompletion), it's moved back to the right position.
|
||||
this.widget('root').invalidate();
|
||||
}
|
||||
|
||||
async updateFolderList() {
|
||||
@@ -826,4 +840,4 @@ class AppGui {
|
||||
AppGui.INPUT_MODE_NORMAL = 1;
|
||||
AppGui.INPUT_MODE_META = 2;
|
||||
|
||||
module.exports = AppGui;
|
||||
module.exports = AppGui;
|
||||
|
@@ -5,12 +5,12 @@ const { JoplinDatabase } = require('lib/joplin-database.js');
|
||||
const { Database } = require('lib/database.js');
|
||||
const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
|
||||
const { DatabaseDriverNode } = require('lib/database-driver-node.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { BaseItem } = require('lib/models/base-item.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { Logger } = require('lib/logger.js');
|
||||
const { sprintf } = require('sprintf-js');
|
||||
const { reg } = require('lib/registry.js');
|
||||
@@ -144,13 +144,15 @@ class Application extends BaseApplication {
|
||||
message += ' (' + options.answers.join('/') + ')';
|
||||
}
|
||||
|
||||
let answer = await this.gui().prompt('', message + ' ');
|
||||
let answer = await this.gui().prompt('', message + ' ', options);
|
||||
|
||||
if (options.type === 'boolean') {
|
||||
if (answer === null) return false; // Pressed ESCAPE
|
||||
if (!answer) answer = options.answers[0];
|
||||
let positiveIndex = options.booleanAnswerDefault == 'y' ? 0 : 1;
|
||||
return answer.toLowerCase() === options.answers[positiveIndex].toLowerCase();
|
||||
} else {
|
||||
return answer;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -275,7 +277,7 @@ class Application extends BaseApplication {
|
||||
dummyGui() {
|
||||
return {
|
||||
isDummy: () => { return true; },
|
||||
prompt: (initialText = '', promptString = '') => { return cliUtils.prompt(initialText, promptString); },
|
||||
prompt: (initialText = '', promptString = '', options = null) => { return cliUtils.prompt(initialText, promptString, options); },
|
||||
showConsole: () => {},
|
||||
maximizeConsole: () => {},
|
||||
stdout: (text) => { console.info(text); },
|
||||
@@ -283,7 +285,10 @@ class Application extends BaseApplication {
|
||||
exit: () => {},
|
||||
showModalOverlay: (text) => {},
|
||||
hideModalOverlay: () => {},
|
||||
stdoutMaxWidth: () => { return 78; }
|
||||
stdoutMaxWidth: () => { return 78; },
|
||||
forceRender: () => {},
|
||||
termSaveState: () => {},
|
||||
termRestoreState: (state) => {},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -351,7 +356,7 @@ class Application extends BaseApplication {
|
||||
|
||||
this.dispatch({
|
||||
type: 'TAG_UPDATE_ALL',
|
||||
tags: tags,
|
||||
items: tags,
|
||||
});
|
||||
|
||||
this.store().dispatch({
|
||||
|
185
CliClient/app/autocompletion.js
Normal file
185
CliClient/app/autocompletion.js
Normal file
@@ -0,0 +1,185 @@
|
||||
var { app } = require('./app.js');
|
||||
var Note = require('lib/models/Note.js');
|
||||
var Folder = require('lib/models/Folder.js');
|
||||
var Tag = require('lib/models/Tag.js');
|
||||
var { cliUtils } = require('./cli-utils.js');
|
||||
var yargParser = require('yargs-parser');
|
||||
|
||||
async function handleAutocompletionPromise(line) {
|
||||
// Auto-complete the command name
|
||||
const names = await app().commandNames();
|
||||
let words = getArguments(line);
|
||||
//If there is only one word and it is not already a command name then you
|
||||
//should look for commmands it could be
|
||||
if (words.length == 1) {
|
||||
if (names.indexOf(words[0]) === -1) {
|
||||
let x = names.filter((n) => n.indexOf(words[0]) === 0);
|
||||
if (x.length === 1) {
|
||||
return x[0] + ' ';
|
||||
}
|
||||
return x.length > 0 ? x.map((a) => a + ' ') : line;
|
||||
} else {
|
||||
return line;
|
||||
}
|
||||
}
|
||||
//There is more than one word and it is a command
|
||||
const metadata = (await app().commandMetadata())[words[0]];
|
||||
//If for some reason this command does not have any associated metadata
|
||||
//just don't autocomplete. However, this should not happen.
|
||||
if (metadata === undefined) {
|
||||
return line;
|
||||
}
|
||||
//complete an option
|
||||
let next = words.length > 1 ? words[words.length - 1] : '';
|
||||
let l = [];
|
||||
if (next[0] === '-') {
|
||||
for (let i = 0; i<metadata.options.length; i++) {
|
||||
const options = metadata.options[i][0].split(' ');
|
||||
//if there are multiple options then they will be seperated by comma and
|
||||
//space. The comma should be removed
|
||||
if (options[0][options[0].length - 1] === ',') {
|
||||
options[0] = options[0].slice(0, -1);
|
||||
}
|
||||
if (words.includes(options[0]) || words.includes(options[1])) {
|
||||
continue;
|
||||
}
|
||||
//First two elements are the flag and the third is the description
|
||||
//Only autocomplete long
|
||||
if (options.length > 1 && options[1].indexOf(next) === 0) {
|
||||
l.push(options[1]);
|
||||
} else if (options[0].indexOf(next) === 0) {
|
||||
l.push(options[2]);
|
||||
}
|
||||
}
|
||||
if (l.length === 0) {
|
||||
return line;
|
||||
}
|
||||
let ret = l.map(a=>toCommandLine(a));
|
||||
ret.prefix = toCommandLine(words.slice(0, -1)) + ' ';
|
||||
return ret;
|
||||
}
|
||||
//Complete an argument
|
||||
//Determine the number of positional arguments by counting the number of
|
||||
//words that don't start with a - less one for the command name
|
||||
const positionalArgs = words.filter((a)=>a.indexOf('-') !== 0).length - 1;
|
||||
|
||||
let cmdUsage = yargParser(metadata.usage)['_'];
|
||||
cmdUsage.splice(0, 1);
|
||||
|
||||
if (cmdUsage.length >= positionalArgs) {
|
||||
|
||||
let argName = cmdUsage[positionalArgs - 1];
|
||||
argName = cliUtils.parseCommandArg(argName).name;
|
||||
|
||||
if (argName == 'note' || argName == 'note-pattern' && app().currentFolder()) {
|
||||
const notes = await Note.previews(app().currentFolder().id, { titlePattern: next + '*' });
|
||||
l.push(...notes.map((n) => n.title));
|
||||
}
|
||||
|
||||
if (argName == 'notebook') {
|
||||
const folders = await Folder.search({ titlePattern: next + '*' });
|
||||
l.push(...folders.map((n) => n.title));
|
||||
}
|
||||
|
||||
if (argName == 'tag') {
|
||||
let tags = await Tag.search({ titlePattern: next + '*' });
|
||||
l.push(...tags.map((n) => n.title));
|
||||
}
|
||||
|
||||
if (argName == 'tag-command') {
|
||||
let c = filterList(['add', 'remove', 'list'], next);
|
||||
l.push(...c);
|
||||
}
|
||||
|
||||
if (argName == 'todo-command') {
|
||||
let c = filterList(['toggle', 'clear'], next);
|
||||
l.push(...c);
|
||||
}
|
||||
}
|
||||
if (l.length === 1) {
|
||||
return toCommandLine([...words.slice(0, -1), l[0]]);
|
||||
} else if (l.length > 1) {
|
||||
let ret = l.map(a=>toCommandLine(a));
|
||||
ret.prefix = toCommandLine(words.slice(0, -1)) + ' ';
|
||||
return ret;
|
||||
}
|
||||
return line;
|
||||
|
||||
}
|
||||
function handleAutocompletion(str, callback) {
|
||||
handleAutocompletionPromise(str).then(function(res) {
|
||||
callback(undefined, res);
|
||||
});
|
||||
}
|
||||
function toCommandLine(args) {
|
||||
if (Array.isArray(args)) {
|
||||
return args.map(function(a) {
|
||||
if(a.indexOf('"') !== -1 || a.indexOf(' ') !== -1) {
|
||||
return "'" + a + "'";
|
||||
} else if (a.indexOf("'") !== -1) {
|
||||
return '"' + a + '"';
|
||||
} else {
|
||||
return a;
|
||||
}
|
||||
}).join(' ');
|
||||
} else {
|
||||
if(args.indexOf('"') !== -1 || args.indexOf(' ') !== -1) {
|
||||
return "'" + args + "' ";
|
||||
} else if (args.indexOf("'") !== -1) {
|
||||
return '"' + args + '" ';
|
||||
} else {
|
||||
return args + ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
function getArguments(line) {
|
||||
let inSingleQuotes = false;
|
||||
let inDoubleQuotes = false;
|
||||
let currentWord = '';
|
||||
let parsed = [];
|
||||
for(let i = 0; i<line.length; i++) {
|
||||
if(line[i] === '"') {
|
||||
if(inDoubleQuotes) {
|
||||
inDoubleQuotes = false;
|
||||
//maybe push word to parsed?
|
||||
//currentWord += '"';
|
||||
} else {
|
||||
inDoubleQuotes = true;
|
||||
//currentWord += '"';
|
||||
}
|
||||
} else if(line[i] === "'") {
|
||||
if(inSingleQuotes) {
|
||||
inSingleQuotes = false;
|
||||
//maybe push word to parsed?
|
||||
//currentWord += "'";
|
||||
} else {
|
||||
inSingleQuotes = true;
|
||||
//currentWord += "'";
|
||||
}
|
||||
} else if (/\s/.test(line[i]) &&
|
||||
!(inDoubleQuotes || inSingleQuotes)) {
|
||||
if (currentWord !== '') {
|
||||
parsed.push(currentWord);
|
||||
currentWord = '';
|
||||
}
|
||||
} else {
|
||||
currentWord += line[i];
|
||||
}
|
||||
}
|
||||
if (!(inSingleQuotes || inDoubleQuotes) && /\s/.test(line[line.length - 1])) {
|
||||
parsed.push('');
|
||||
} else {
|
||||
parsed.push(currentWord);
|
||||
}
|
||||
return parsed;
|
||||
}
|
||||
function filterList(list, next) {
|
||||
let output = [];
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].indexOf(next) !== 0) continue;
|
||||
output.push(list[i]);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
module.exports = { handleAutocompletion };
|
@@ -12,6 +12,10 @@ class BaseCommand {
|
||||
throw new Error('Usage not defined');
|
||||
}
|
||||
|
||||
encryptionCheck(item) {
|
||||
if (item && item.encryption_applied) throw new Error(_('Cannot change encrypted item'));
|
||||
}
|
||||
|
||||
description() {
|
||||
throw new Error('Description not defined');
|
||||
}
|
||||
|
@@ -5,10 +5,10 @@ const { Logger } = require('lib/logger.js');
|
||||
const { dirname } = require('lib/path-utils.js');
|
||||
const { DatabaseDriverNode } = require('lib/database-driver-node.js');
|
||||
const { JoplinDatabase } = require('lib/joplin-database.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { sprintf } = require('sprintf-js');
|
||||
const exec = require('child_process').exec
|
||||
|
||||
|
@@ -178,38 +178,39 @@ cliUtils.promptConfirm = function(message, answers = null) {
|
||||
});
|
||||
}
|
||||
|
||||
cliUtils.promptInput = function(message) {
|
||||
const readline = require('readline');
|
||||
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
rl.question(message + ' ', (answer) => {
|
||||
rl.close();
|
||||
resolve(answer);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Note: initialText is there to have the same signature as statusBar.prompt() so that
|
||||
// it can be a drop-in replacement, however initialText is not used (and cannot be
|
||||
// with readline.question?).
|
||||
cliUtils.prompt = function(initialText = '', promptString = ':') {
|
||||
cliUtils.prompt = function(initialText = '', promptString = ':', options = null) {
|
||||
if (!options) options = {};
|
||||
|
||||
const readline = require('readline');
|
||||
const Writable = require('stream').Writable;
|
||||
|
||||
const mutableStdout = new Writable({
|
||||
write: function(chunk, encoding, callback) {
|
||||
if (!this.muted)
|
||||
process.stdout.write(chunk, encoding);
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
output: mutableStdout,
|
||||
terminal: true,
|
||||
});
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
mutableStdout.muted = false;
|
||||
|
||||
rl.question(promptString, (answer) => {
|
||||
rl.close();
|
||||
if (!!options.secure) this.stdout_('');
|
||||
resolve(answer);
|
||||
});
|
||||
|
||||
mutableStdout.muted = !!options.secure;
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const { shim } = require('lib/shim.js');
|
||||
const fs = require('fs-extra');
|
||||
|
||||
@@ -19,6 +19,7 @@ class Command extends BaseCommand {
|
||||
let title = args['note'];
|
||||
|
||||
let note = await app().loadItem(BaseModel.TYPE_NOTE, title, { parent: app().currentFolder() });
|
||||
this.encryptionCheck(note);
|
||||
if (!note) throw new Error(_('Cannot find "%s".', title));
|
||||
|
||||
const localFilePath = args['file'];
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
@@ -21,10 +21,6 @@ class Command extends BaseCommand {
|
||||
];
|
||||
}
|
||||
|
||||
enabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
async action(args) {
|
||||
let title = args['note'];
|
||||
|
||||
@@ -33,6 +29,9 @@ class Command extends BaseCommand {
|
||||
|
||||
const content = args.options.verbose ? await Note.serialize(item) : await Note.serializeForEdit(item);
|
||||
this.stdout(content);
|
||||
|
||||
app().gui().showConsole();
|
||||
app().gui().maximizeConsole();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { _, setLocale } = require('lib/locale.js');
|
||||
const { app } = require('./app.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
@@ -16,8 +16,9 @@ class Command extends BaseCommand {
|
||||
return _('Marks a to-do as done.');
|
||||
}
|
||||
|
||||
static async handleAction(args, isCompleted) {
|
||||
static async handleAction(commandInstance, args, isCompleted) {
|
||||
const note = await app().loadItem(BaseModel.TYPE_NOTE, args.note);
|
||||
commandInstance.encryptionCheck(note);
|
||||
if (!note) throw new Error(_('Cannot find "%s".', args.note));
|
||||
if (!note.is_todo) throw new Error(_('Note is not a to-do: "%s"', args.note));
|
||||
|
||||
@@ -32,7 +33,7 @@ class Command extends BaseCommand {
|
||||
}
|
||||
|
||||
async action(args) {
|
||||
await Command.handleAction(args, true);
|
||||
await Command.handleAction(this, args, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
|
183
CliClient/app/command-e2ee.js
Normal file
183
CliClient/app/command-e2ee.js
Normal file
@@ -0,0 +1,183 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
const EncryptionService = require('lib/services/EncryptionService');
|
||||
const DecryptionWorker = require('lib/services/DecryptionWorker');
|
||||
const MasterKey = require('lib/models/MasterKey');
|
||||
const BaseItem = require('lib/models/BaseItem');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
usage() {
|
||||
return 'e2ee <command> [path]';
|
||||
}
|
||||
|
||||
description() {
|
||||
return _('Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, `status` and `target-status`.');
|
||||
}
|
||||
|
||||
options() {
|
||||
return [
|
||||
// This is here mostly for testing - shouldn't be used
|
||||
['-p, --password <password>', 'Use this password as master password (For security reasons, it is not recommended to use this option).'],
|
||||
['-v, --verbose', 'More verbose output for the `target-status` command'],
|
||||
];
|
||||
}
|
||||
|
||||
async action(args) {
|
||||
// change-password
|
||||
|
||||
const options = args.options;
|
||||
|
||||
if (args.command === 'enable') {
|
||||
const password = options.password ? options.password.toString() : await this.prompt(_('Enter master password:'), { type: 'string', secure: true });
|
||||
if (!password) {
|
||||
this.stdout(_('Operation cancelled'));
|
||||
return;
|
||||
}
|
||||
|
||||
await EncryptionService.instance().generateMasterKeyAndEnableEncryption(password);
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.command === 'disable') {
|
||||
await EncryptionService.instance().disableEncryption();
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.command === 'decrypt') {
|
||||
this.stdout(_('Starting decryption... Please wait as it may take several minutes depending on how much there is to decrypt.'));
|
||||
|
||||
while (true) {
|
||||
try {
|
||||
await DecryptionWorker.instance().start();
|
||||
break;
|
||||
} catch (error) {
|
||||
if (error.code === 'masterKeyNotLoaded') {
|
||||
const masterKeyId = error.masterKeyId;
|
||||
const password = await this.prompt(_('Enter master password:'), { type: 'string', secure: true });
|
||||
if (!password) {
|
||||
this.stdout(_('Operation cancelled'));
|
||||
return;
|
||||
}
|
||||
Setting.setObjectKey('encryption.passwordCache', masterKeyId, password);
|
||||
await EncryptionService.instance().loadMasterKeysFromSettings();
|
||||
continue;
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
this.stdout(_('Completed decryption.'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.command === 'status') {
|
||||
this.stdout(_('Encryption is: %s', Setting.value('encryption.enabled') ? _('Enabled') : _('Disabled')));
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.command === 'target-status') {
|
||||
const fs = require('fs-extra');
|
||||
const pathUtils = require('lib/path-utils.js');
|
||||
const fsDriver = new (require('lib/fs-driver-node.js').FsDriverNode)();
|
||||
|
||||
const targetPath = args.path;
|
||||
if (!targetPath) throw new Error('Please specify the sync target path.');
|
||||
|
||||
const dirPaths = function(targetPath) {
|
||||
let paths = [];
|
||||
fs.readdirSync(targetPath).forEach((path) => {
|
||||
paths.push(path);
|
||||
});
|
||||
return paths;
|
||||
}
|
||||
|
||||
let itemCount = 0;
|
||||
let resourceCount = 0;
|
||||
let encryptedItemCount = 0;
|
||||
let encryptedResourceCount = 0;
|
||||
let otherItemCount = 0;
|
||||
|
||||
let encryptedPaths = [];
|
||||
let decryptedPaths = [];
|
||||
|
||||
let paths = dirPaths(targetPath);
|
||||
|
||||
for (let i = 0; i < paths.length; i++) {
|
||||
const path = paths[i];
|
||||
const fullPath = targetPath + '/' + path;
|
||||
const stat = await fs.stat(fullPath);
|
||||
|
||||
// this.stdout(fullPath);
|
||||
|
||||
if (path === '.resource') {
|
||||
let resourcePaths = dirPaths(fullPath);
|
||||
for (let j = 0; j < resourcePaths.length; j++) {
|
||||
const resourcePath = resourcePaths[j];
|
||||
resourceCount++;
|
||||
const fullResourcePath = fullPath + '/' + resourcePath;
|
||||
const isEncrypted = await EncryptionService.instance().fileIsEncrypted(fullResourcePath);
|
||||
if (isEncrypted) {
|
||||
encryptedResourceCount++;
|
||||
encryptedPaths.push(fullResourcePath);
|
||||
} else {
|
||||
decryptedPaths.push(fullResourcePath);
|
||||
}
|
||||
}
|
||||
} else if (stat.isDirectory()) {
|
||||
continue;
|
||||
} else {
|
||||
itemCount++;
|
||||
const content = await fs.readFile(fullPath, 'utf8');
|
||||
const item = await BaseItem.unserialize(content);
|
||||
const ItemClass = BaseItem.itemClass(item);
|
||||
|
||||
if (!ItemClass.encryptionSupported()) {
|
||||
otherItemCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
const isEncrypted = await EncryptionService.instance().itemIsEncrypted(item);
|
||||
|
||||
if (isEncrypted) {
|
||||
encryptedItemCount++;
|
||||
encryptedPaths.push(fullPath);
|
||||
} else {
|
||||
decryptedPaths.push(fullPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.stdout('Encrypted items: ' + encryptedItemCount + '/' + itemCount);
|
||||
this.stdout('Encrypted resources: ' + encryptedResourceCount + '/' + resourceCount);
|
||||
this.stdout('Other items (never encrypted): ' + otherItemCount);
|
||||
|
||||
if (options.verbose) {
|
||||
this.stdout('');
|
||||
this.stdout('# Encrypted paths');
|
||||
this.stdout('');
|
||||
for (let i = 0; i < encryptedPaths.length; i++) {
|
||||
const path = encryptedPaths[i];
|
||||
this.stdout(path);
|
||||
}
|
||||
|
||||
this.stdout('');
|
||||
this.stdout('# Decrypted paths');
|
||||
this.stdout('');
|
||||
for (let i = 0; i < decryptedPaths.length; i++) {
|
||||
const path = decryptedPaths[i];
|
||||
this.stdout(path);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Command;
|
@@ -3,10 +3,10 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { uuid } = require('lib/uuid.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
|
||||
@@ -44,6 +44,8 @@ class Command extends BaseCommand {
|
||||
if (!app().currentFolder()) throw new Error(_('No active notebook.'));
|
||||
let note = await app().loadItem(BaseModel.TYPE_NOTE, title);
|
||||
|
||||
this.encryptionCheck(note);
|
||||
|
||||
if (!note) {
|
||||
const ok = await this.prompt(_('Note does not exist: "%s". Create it?', title));
|
||||
if (!ok) return;
|
||||
@@ -76,12 +78,12 @@ class Command extends BaseCommand {
|
||||
|
||||
app().gui().showModalOverlay(_('Starting to edit note. Close the editor to get back to the prompt.'));
|
||||
await app().gui().forceRender();
|
||||
const termState = app().gui().term().saveState();
|
||||
const termState = app().gui().termSaveState();
|
||||
|
||||
const spawnSync = require('child_process').spawnSync;
|
||||
spawnSync(editorPath, editorArgs, { stdio: 'inherit' });
|
||||
|
||||
app().gui().term().restoreState(termState);
|
||||
app().gui().termRestoreState(termState);
|
||||
app().gui().hideModalOverlay();
|
||||
app().gui().forceRender();
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { Database } = require('lib/database.js');
|
||||
const { app } = require('./app.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { ReportService } = require('lib/services/report.js');
|
||||
const fs = require('fs-extra');
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { Exporter } = require('lib/services/exporter.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const { reg } = require('lib/registry.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
|
@@ -2,7 +2,7 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { renderCommandHelp } = require('./help-utils.js');
|
||||
const { Database } = require('lib/database.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { wrap } = require('lib/string-utils.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
@@ -65,12 +65,10 @@ class Command extends BaseCommand {
|
||||
} else {
|
||||
const commandNames = this.allCommands().map((a) => a.name());
|
||||
|
||||
this.stdout(_('Type `help [command]` for more information about a command.'));
|
||||
this.stdout(_('Type `help [command]` for more information about a command; or type `help all` for the complete usage information.'));
|
||||
this.stdout('');
|
||||
this.stdout(_('The possible commands are:'));
|
||||
this.stdout('');
|
||||
this.stdout(_('Type `help all` for the complete help of all the commands.'));
|
||||
this.stdout('');
|
||||
this.stdout(commandNames.join(', '));
|
||||
this.stdout('');
|
||||
this.stdout(_('In any command, a note or notebook can be refered to by title or ID, or using the shortcuts `$n` or `$b` for, respectively, the currently selected note or notebook. `$c` can be used to refer to the currently selected item.'));
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const { importEnex } = require('lib/import-enex');
|
||||
const { filename, basename } = require('lib/path-utils.js');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
|
@@ -1,10 +1,10 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const { sprintf } = require('sprintf-js');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const { reg } = require('lib/registry.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
@@ -20,6 +20,7 @@ class Command extends BaseCommand {
|
||||
const name = args['name'];
|
||||
|
||||
const item = await app().loadItem('folderOrNote', pattern);
|
||||
this.encryptionCheck(item);
|
||||
if (!item) throw new Error(_('Cannot find "%s".', pattern));
|
||||
|
||||
const newItem = {
|
||||
|
@@ -1,10 +1,10 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseItem } = require('lib/models/base-item.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
@@ -29,7 +29,7 @@ class Command extends BaseCommand {
|
||||
|
||||
const folder = await app().loadItem(BaseModel.TYPE_FOLDER, pattern);
|
||||
if (!folder) throw new Error(_('Cannot find "%s".', pattern));
|
||||
const ok = force ? true : await this.prompt(_('Delete notebook "%s"?', folder.title), { booleanAnswerDefault: 'n' });
|
||||
const ok = force ? true : await this.prompt(_('Delete notebook? All notes within this notebook will also be deleted.'), { booleanAnswerDefault: 'n' });
|
||||
if (!ok) return;
|
||||
|
||||
await Folder.delete(folder.id);
|
||||
|
@@ -1,10 +1,10 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseItem } = require('lib/models/base-item.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const { sprintf } = require('sprintf-js');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const { uuid } = require('lib/uuid.js');
|
||||
|
@@ -1,11 +1,11 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const { Database } = require('lib/database.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { BaseItem } = require('lib/models/base-item.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
@@ -35,6 +35,8 @@ class Command extends BaseCommand {
|
||||
if (!notes.length) throw new Error(_('Cannot find "%s".', title));
|
||||
|
||||
for (let i = 0; i < notes.length; i++) {
|
||||
this.encryptionCheck(notes[i]);
|
||||
|
||||
let newNote = {
|
||||
id: notes[i].id,
|
||||
type_: notes[i].type_,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { Database } = require('lib/database.js');
|
||||
const { app } = require('./app.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { ReportService } = require('lib/services/report.js');
|
||||
|
||||
|
@@ -2,8 +2,8 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { OneDriveApiNodeUtils } = require('./onedrive-api-node-utils.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const { BaseItem } = require('lib/models/base-item.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
const { Synchronizer } = require('lib/synchronizer.js');
|
||||
const { reg } = require('lib/registry.js');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
|
@@ -1,8 +1,8 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
@@ -25,6 +25,8 @@ class Command extends BaseCommand {
|
||||
for (let i = 0; i < notes.length; i++) {
|
||||
const note = notes[i];
|
||||
|
||||
this.encryptionCheck(note);
|
||||
|
||||
let toSave = {
|
||||
id: note.id,
|
||||
};
|
||||
|
@@ -1,9 +1,9 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
|
||||
const CommandDone = require('./command-done.js');
|
||||
@@ -19,7 +19,7 @@ class Command extends BaseCommand {
|
||||
}
|
||||
|
||||
async action(args) {
|
||||
await CommandDone.handleAction(args, false);
|
||||
await CommandDone.handleAction(this, args, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const { Logger } = require('lib/logger.js');
|
||||
const { Resource } = require('lib/models/resource.js');
|
||||
const Resource = require('lib/models/Resource.js');
|
||||
const { dirname } = require('lib/path-utils.js');
|
||||
const { FsDriverNode } = require('./fs-driver-node.js');
|
||||
const lodash = require('lodash');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
const Folder = require('lib/models/folder.js').Folder;
|
||||
const Tag = require('lib/models/tag.js').Tag;
|
||||
const BaseModel = require('lib/base-model.js').BaseModel;
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const ListWidget = require('tkwidgets/ListWidget.js');
|
||||
const _ = require('lib/locale.js')._;
|
||||
|
||||
@@ -24,9 +24,9 @@ class FolderListWidget extends ListWidget {
|
||||
if (item === '-') {
|
||||
output.push('-'.repeat(this.innerWidth));
|
||||
} else if (item.type_ === Folder.modelType()) {
|
||||
output.push(item.title);
|
||||
output.push(Folder.displayTitle(item));
|
||||
} else if (item.type_ === Tag.modelType()) {
|
||||
output.push('[' + item.title + ']');
|
||||
output.push('[' + Folder.displayTitle(item) + ']');
|
||||
} else if (item.type_ === BaseModel.TYPE_SEARCH) {
|
||||
output.push(_('Search:'));
|
||||
output.push(item.title);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
const Note = require('lib/models/note.js').Note;
|
||||
const Note = require('lib/models/Note.js');
|
||||
const ListWidget = require('tkwidgets/ListWidget.js');
|
||||
|
||||
class NoteListWidget extends ListWidget {
|
||||
@@ -10,7 +10,7 @@ class NoteListWidget extends ListWidget {
|
||||
this.updateIndexFromSelectedNoteId_ = false;
|
||||
|
||||
this.itemRenderer = (note) => {
|
||||
let label = note.title; // + ' ' + note.id;
|
||||
let label = Note.displayTitle(note); // + ' ' + note.id;
|
||||
if (note.is_todo) {
|
||||
label = '[' + (note.todo_completed ? 'X' : ' ') + '] ' + label;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
const Note = require('lib/models/note.js').Note;
|
||||
const Note = require('lib/models/Note.js');
|
||||
const TextWidget = require('tkwidgets/TextWidget.js');
|
||||
|
||||
class NoteMetadataWidget extends TextWidget {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
const Note = require('lib/models/note.js').Note;
|
||||
const Note = require('lib/models/Note.js');
|
||||
const TextWidget = require('tkwidgets/TextWidget.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
|
||||
class NoteWidget extends TextWidget {
|
||||
|
||||
@@ -32,11 +33,24 @@ class NoteWidget extends TextWidget {
|
||||
this.reloadNote();
|
||||
}
|
||||
|
||||
welcomeText() {
|
||||
return _('Welcome to Joplin!\n\nType `:help shortcuts` for the list of keyboard shortcuts, or just `:help` for usage information.\n\nFor example, to create a notebook press `mb`; to create a note press `mn`.');
|
||||
}
|
||||
|
||||
reloadNote() {
|
||||
if (this.noteId_) {
|
||||
if (!this.noteId_ && !this.notes.length) {
|
||||
this.text = this.welcomeText();
|
||||
this.scrollTop = 0;
|
||||
} else if (this.noteId_) {
|
||||
this.doAsync('loadNote', async () => {
|
||||
this.note_ = await Note.load(this.noteId_);
|
||||
this.text = this.note_ ? this.note_.title + "\n\n" + this.note_.body : '';
|
||||
|
||||
if (this.note_ && this.note_.encryption_applied) {
|
||||
this.text = _('One or more items are currently encrypted and you may need to supply a master password. To do so please type `e2ee decrypt`. If you have already supplied the password, the encrypted items are being decrypted in the background and will be available soon.');
|
||||
} else {
|
||||
this.text = this.note_ ? this.note_.title + "\n\n" + this.note_.body : '';
|
||||
}
|
||||
|
||||
if (this.lastLoadedNoteId_ !== this.noteId_) this.scrollTop = 0;
|
||||
this.lastLoadedNoteId_ = this.noteId_;
|
||||
});
|
||||
|
@@ -2,6 +2,7 @@ const BaseWidget = require('tkwidgets/BaseWidget.js');
|
||||
const chalk = require('chalk');
|
||||
const termutils = require('tkwidgets/framework/termutils.js');
|
||||
const stripAnsi = require('strip-ansi');
|
||||
const { handleAutocompletion } = require('../autocompletion.js');
|
||||
|
||||
class StatusBarWidget extends BaseWidget {
|
||||
|
||||
@@ -41,6 +42,7 @@ class StatusBarWidget extends BaseWidget {
|
||||
};
|
||||
|
||||
if ('cursorPosition' in options) this.promptState_.cursorPosition = options.cursorPosition;
|
||||
if ('secure' in options) this.promptState_.secure = options.secure;
|
||||
|
||||
this.promptState_.promise = new Promise((resolve, reject) => {
|
||||
this.promptState_.resolve = resolve;
|
||||
@@ -104,13 +106,19 @@ class StatusBarWidget extends BaseWidget {
|
||||
|
||||
this.term.showCursor(true);
|
||||
|
||||
const isSecurePrompt = !!this.promptState_.secure;
|
||||
|
||||
let options = {
|
||||
cancelable: true,
|
||||
history: this.history,
|
||||
default: this.promptState_.initialText,
|
||||
autoComplete: handleAutocompletion,
|
||||
autoCompleteHint : true,
|
||||
autoCompleteMenu : true,
|
||||
};
|
||||
|
||||
if ('cursorPosition' in this.promptState_) options.cursorPosition = this.promptState_.cursorPosition;
|
||||
if (isSecurePrompt) options.echoChar = true;
|
||||
|
||||
this.inputEventEmitter_ = this.term.inputField(options, (error, input) => {
|
||||
let resolveResult = null;
|
||||
@@ -125,7 +133,7 @@ class StatusBarWidget extends BaseWidget {
|
||||
resolveResult = input ? input.trim() : input;
|
||||
// Add the command to history but only if it's longer than one character.
|
||||
// Below that it's usually an answer like "y"/"n", etc.
|
||||
if (input && input.length > 1) this.history_.push(input);
|
||||
if (!isSecurePrompt && input && input.length > 1) this.history_.push(input);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,4 +167,4 @@ class StatusBarWidget extends BaseWidget {
|
||||
|
||||
}
|
||||
|
||||
module.exports = StatusBarWidget;
|
||||
module.exports = StatusBarWidget;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
const fs = require('fs-extra');
|
||||
const { wrap } = require('lib/string-utils.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { fileExtension, basename, dirname } = require('lib/path-utils.js');
|
||||
const { _, setLocale, languageCode } = require('lib/locale.js');
|
||||
|
||||
|
@@ -1,26 +1,27 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// Loading time: 20170803: 1.5s with no commands
|
||||
|
||||
// Make it possible to require("/lib/...") without specifying full path
|
||||
require('app-module-path').addPath(__dirname);
|
||||
|
||||
const { app } = require('./app.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Resource } = require('lib/models/resource.js');
|
||||
const { BaseItem } = require('lib/models/base-item.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const { NoteTag } = require('lib/models/note-tag.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Resource = require('lib/models/Resource.js');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const NoteTag = require('lib/models/NoteTag.js');
|
||||
const MasterKey = require('lib/models/MasterKey');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { Logger } = require('lib/logger.js');
|
||||
const { FsDriverNode } = require('lib/fs-driver-node.js');
|
||||
const { shimInit } = require('lib/shim-init-node.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const EncryptionService = require('lib/services/EncryptionService');
|
||||
|
||||
const fsDriver = new FsDriverNode();
|
||||
Logger.fsDriver_ = fsDriver;
|
||||
Resource.fsDriver_ = fsDriver;
|
||||
EncryptionService.fsDriver_ = fsDriver;
|
||||
|
||||
// That's not good, but it's to avoid circular dependency issues
|
||||
// in the BaseItem class.
|
||||
@@ -29,6 +30,7 @@ BaseItem.loadClass('Folder', Folder);
|
||||
BaseItem.loadClass('Resource', Resource);
|
||||
BaseItem.loadClass('Tag', Tag);
|
||||
BaseItem.loadClass('NoteTag', NoteTag);
|
||||
BaseItem.loadClass('MasterKey', MasterKey);
|
||||
|
||||
Setting.setConstant('appId', 'net.cozic.joplin-cli');
|
||||
Setting.setConstant('appType', 'cli');
|
||||
|
@@ -4,6 +4,6 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
BUILD_DIR="$ROOT_DIR/build"
|
||||
|
||||
rsync -a --exclude "node_modules/" "$ROOT_DIR/app/" "$BUILD_DIR/"
|
||||
rsync -a "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
|
||||
rsync -a --delete "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
|
||||
cp "$ROOT_DIR/package.json" "$BUILD_DIR"
|
||||
chmod 755 "$BUILD_DIR/main.js"
|
@@ -2,86 +2,84 @@
|
||||
# Copyright (C) YEAR Laurent Cozic
|
||||
# This file is distributed under the same license as the Joplin-CLI package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Joplin-CLI 1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Last-Translator: Samuel Blickle <blickle.samuel@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: de_DE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.0.4\n"
|
||||
"X-Generator: Poedit 2.0.5\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
msgid "Give focus to next pane"
|
||||
msgstr "Fokussiere das nächste Fenster"
|
||||
msgstr "Das nächste Fenster fokussieren"
|
||||
|
||||
msgid "Give focus to previous pane"
|
||||
msgstr "Fokussiere das vorherige Fenster"
|
||||
msgstr "Das vorherige Fenster fokussieren"
|
||||
|
||||
msgid "Enter command line mode"
|
||||
msgstr "Wechsle zum Terminal-Modus"
|
||||
msgstr "Zum Terminal-Modus wechseln"
|
||||
|
||||
msgid "Exit command line mode"
|
||||
msgstr "Verlasse den Terminal-Modus"
|
||||
msgstr "Den Terminal-Modus verlassen"
|
||||
|
||||
msgid "Edit the selected note"
|
||||
msgstr "Bearbeite die ausgewählte Notiz"
|
||||
msgstr "Die ausgewählte Notiz bearbeiten"
|
||||
|
||||
msgid "Cancel the current command."
|
||||
msgstr "Breche den momentanen Befehl ab."
|
||||
msgstr "Den momentanen Befehl abbrechen."
|
||||
|
||||
msgid "Exit the application."
|
||||
msgstr "Verlasse das Programm."
|
||||
msgstr "Das Programm verlassen."
|
||||
|
||||
msgid "Delete the currently selected note or notebook."
|
||||
msgstr ""
|
||||
"Lösche die momentan ausgewählte Notiz oder das momentan ausgewählte "
|
||||
"Notizbuch."
|
||||
msgstr "Die/das momentan ausgewählte Notiz(-buch) löschen."
|
||||
|
||||
msgid "To delete a tag, untag the associated notes."
|
||||
msgstr ""
|
||||
"Um eine Markierung zu löschen, habe die Markierungen zugehöriger Notizen auf."
|
||||
"Hebe die Markierungen zugehöriger Notizen auf, um eine Markierung zu löschen."
|
||||
|
||||
msgid "Please select the note or notebook to be deleted first."
|
||||
msgstr ""
|
||||
"Bitte wählen Sie zuert eine Notiz oder ein Notizbuch aus, das gelöscht "
|
||||
"werden soll."
|
||||
"Wähle bitte zuerst eine Notiz oder ein Notizbuch aus, das gelöscht werden "
|
||||
"soll."
|
||||
|
||||
msgid "Set a to-do as completed / not completed"
|
||||
msgstr "Markiere ein ToDo as abgeschlossen / nicht abgeschlossen"
|
||||
msgstr "Ein To-Do as abgeschlossen / nicht abgeschlossen markieren"
|
||||
|
||||
#, fuzzy
|
||||
msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
|
||||
msgstr ""
|
||||
"Schal[t]e das Terminal zwischen maximiert/minimiert/versteckt/sichtbar um."
|
||||
|
||||
msgid "Search"
|
||||
msgstr "Suche"
|
||||
msgstr "Suchen"
|
||||
|
||||
msgid "[t]oggle note [m]etadata."
|
||||
msgstr "Schal[t]e Notiz-[M]etadata ein."
|
||||
msgstr "Notiz-[M]etadata einschal[t]en."
|
||||
|
||||
msgid "[M]ake a new [n]ote"
|
||||
msgstr "Erstelle eine neue Notiz"
|
||||
msgstr "Eine neue [N]otiz [m]achen"
|
||||
|
||||
msgid "[M]ake a new [t]odo"
|
||||
msgstr "Erstelle ein neues To-Do"
|
||||
msgstr "Ein neues [T]o-Do [m]achen"
|
||||
|
||||
msgid "[M]ake a new note[b]ook"
|
||||
msgstr "Erstelle ein neues Notiz[b]uch"
|
||||
msgstr "Ein neues Notiz[b]uch [m]achen"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Copy ([Y]ank) the [n]ote to a notebook."
|
||||
msgstr "Kopiere die Notiz zu einem Notizbuch."
|
||||
msgstr "Die Notiz zu einem Notizbuch kopieren."
|
||||
|
||||
msgid "Move the note to a notebook."
|
||||
msgstr "Verschiebe die Notiz zu einem Notizbuch."
|
||||
msgstr "Die Notiz zu einem Notizbuch verschieben."
|
||||
|
||||
msgid "Press Ctrl+D or type \"exit\" to exit the application"
|
||||
msgstr "Drücke Strg+D oder schreibe \"exit\", um das Programm zu verlassen"
|
||||
msgstr "Drücke Strg+D oder tippe \"exit\", um das Programm zu verlassen"
|
||||
|
||||
#, javascript-format
|
||||
msgid "More than one item match \"%s\". Please narrow down your query."
|
||||
@@ -108,11 +106,11 @@ msgid "y"
|
||||
msgstr "j"
|
||||
|
||||
msgid "Cancelling background synchronisation... Please wait."
|
||||
msgstr "Breche Hintergrund-Synchronisations ab....Bitte warten."
|
||||
msgstr "Breche Hintergrund-Synchronisation ab... Bitte warten."
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
#, javascript-format
|
||||
msgid "No such command: %s"
|
||||
msgstr "Ungültiger Befehl: \"%s\""
|
||||
msgstr "Ungültiger Befehl: %s"
|
||||
|
||||
#, javascript-format
|
||||
msgid "The command \"%s\" is only available in GUI mode"
|
||||
@@ -120,7 +118,7 @@ msgstr "Der Befehl \"%s\" ist nur im GUI Modus verfügbar"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Missing required argument: %s"
|
||||
msgstr "Fehlender benötigtes Argument: %s"
|
||||
msgstr "Fehlendes benötigtes Argument: %s"
|
||||
|
||||
#, javascript-format
|
||||
msgid "%s: %s"
|
||||
@@ -152,12 +150,12 @@ msgid ""
|
||||
"current configuration."
|
||||
msgstr ""
|
||||
"Zeigt an oder stellt einen Optionswert. Wenn kein [Wert] angegeben ist, wird "
|
||||
"der Wert vom gegebenenen [Namen] angezeigt. Wenn weder [Name] noch [Wert] "
|
||||
"der Wert vom gegebenen [Namen] angezeigt. Wenn weder [Name] noch [Wert] "
|
||||
"gegeben sind, wird eine Liste der momentanen Konfiguration angezeigt."
|
||||
|
||||
msgid "Also displays unset and hidden config variables."
|
||||
msgstr ""
|
||||
"Zeige auch nicht angegebene oder versteckte Konfigurationsvariablen an."
|
||||
"Zeigt auch nicht angegebene oder versteckte Konfigurationsvariablen an."
|
||||
|
||||
#, javascript-format
|
||||
msgid "%s = %s (%s)"
|
||||
@@ -171,25 +169,25 @@ msgid ""
|
||||
"Duplicates the notes matching <note> to [notebook]. If no notebook is "
|
||||
"specified the note is duplicated in the current notebook."
|
||||
msgstr ""
|
||||
"Vervielfältigt die Notizen die mit <note> übereinstimmen zu [Notizbuch]. "
|
||||
"Wenn kein Notizbuch angegeben ist, wird die Notiz in das momentane Notizbuch "
|
||||
"Dupliziert die Notizen die mit <note> übereinstimmen zu [Notizbuch]. Wenn "
|
||||
"kein Notizbuch angegeben ist, wird die Notiz in das momentane Notizbuch "
|
||||
"kopiert."
|
||||
|
||||
msgid "Marks a to-do as done."
|
||||
msgstr "Markiert ein ToDo als abgeschlossen."
|
||||
msgstr "Markiert ein To-Do als abgeschlossen."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Note is not a to-do: \"%s\""
|
||||
msgstr "Notiz ist kein Todo: \"%s\""
|
||||
msgstr "Notiz ist kein To-Do: \"%s\""
|
||||
|
||||
msgid "Edit note."
|
||||
msgstr "Bearbeite Notiz."
|
||||
msgstr "Notiz bearbeiten."
|
||||
|
||||
msgid ""
|
||||
"No text editor is defined. Please set it using `config editor <editor-path>`"
|
||||
msgstr ""
|
||||
"Kein Textbearbeitungsprogramm angegeben. Bitte lege eines mit `config editor "
|
||||
"<Pfad-Zum-Textbearbeitungsprogramm>` fest"
|
||||
"Kein Textverarbeitungsprogramm angegeben. Bitte lege eines mit `config "
|
||||
"editor <Pfad-Zum-Textverarbeitungsprogramm>` fest"
|
||||
|
||||
msgid "No active notebook."
|
||||
msgstr "Kein aktives Notizbuch."
|
||||
@@ -200,8 +198,8 @@ msgstr "Notiz \"%s\" existiert nicht. Soll sie erstellt werden?"
|
||||
|
||||
msgid "Starting to edit note. Close the editor to get back to the prompt."
|
||||
msgstr ""
|
||||
"Beginne die Notiz zu bearbeiten. Schließ das Textbearbeitungsprogramm um "
|
||||
"zurück zum Terminal zu kommen."
|
||||
"Beginne die Notiz zu bearbeiten. Schließe das Textverarbeitungsprogramm, um "
|
||||
"zurück zum Terminal zu gelangen."
|
||||
|
||||
msgid "Note has been saved."
|
||||
msgstr "Die Notiz wurde gespeichert."
|
||||
@@ -213,9 +211,9 @@ msgid ""
|
||||
"Exports Joplin data to the given directory. By default, it will export the "
|
||||
"complete database including notebooks, notes, tags and resources."
|
||||
msgstr ""
|
||||
"Exportiert Joplins Datein zu dem angegebenen Pfad. Standardmäßig wird die "
|
||||
"komplette Datenbank inklusive Notizbüchern, Notizen, Markierungen usw. "
|
||||
"exportiert."
|
||||
"Exportiert Joplins Dateien zu dem angegebenen Pfad. Standardmäßig wird die "
|
||||
"komplette Datenbank inklusive Notizbüchern, Notizen, Markierungen und "
|
||||
"Anhängen exportiert."
|
||||
|
||||
msgid "Exports only the given note."
|
||||
msgstr "Exportiert nur die angegebene Notiz."
|
||||
@@ -227,12 +225,15 @@ msgid "Displays a geolocation URL for the note."
|
||||
msgstr "Zeigt die Standort-URL der Notiz an."
|
||||
|
||||
msgid "Displays usage information."
|
||||
msgstr "Zeigt die Benutzungsstatistik an."
|
||||
msgstr "Zeigt die Nutzungsstatistik an."
|
||||
|
||||
msgid "Shortcuts are not available in CLI mode."
|
||||
msgstr ""
|
||||
msgstr "Tastenkürzel sind im CLI Modus nicht verfügbar."
|
||||
|
||||
msgid "Type `help [command]` for more information about a command."
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Type `help [command]` for more information about a command; or type `help "
|
||||
"all` for the complete usage information."
|
||||
msgstr ""
|
||||
"Tippe `help [Befehl]` ein, um mehr Informationen über einen Befehl zu "
|
||||
"erhalten."
|
||||
@@ -247,8 +248,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"In jedem Befehl können Notizen oder Notizbücher durch ihren Titel oder ihre "
|
||||
"ID spezifiziert werden, oder durch die Abkürzung `$n` oder `$b` um entweder "
|
||||
"das momentan augewählte Notizbuch oder die momentan ausgewählte Notiz zu "
|
||||
"wählen. `$c` kann benutzt werden, um die momentane Auswahl zu verweisen."
|
||||
"das momentan ausgewählte Notizbuch oder die momentan ausgewählte Notiz zu "
|
||||
"wählen. `$c` kann benutzt werden, um auf die momentane Auswahl zu verweisen."
|
||||
|
||||
msgid "To move from one pane to another, press Tab or Shift+Tab."
|
||||
msgstr ""
|
||||
@@ -260,16 +261,16 @@ msgid ""
|
||||
"(including this console)."
|
||||
msgstr ""
|
||||
"Benutze die Pfeiltasten und Bild hoch/runter um durch Listen und Texte zu "
|
||||
"scrollen ( inklusive diesem Terminal )."
|
||||
"scrollen (inklusive diesem Terminal)."
|
||||
|
||||
msgid "To maximise/minimise the console, press \"TC\"."
|
||||
msgstr "Um das Terminal zu maximieren/minimieren, drücke \"TC\"."
|
||||
|
||||
msgid "To enter command line mode, press \":\""
|
||||
msgstr ""
|
||||
msgstr "Um den Kommandozeilen Modus aufzurufen, drücke \":\""
|
||||
|
||||
msgid "To exit command line mode, press ESCAPE"
|
||||
msgstr ""
|
||||
msgstr "Um den Kommandozeilen Modus zu beenden, drücke ESCAPE"
|
||||
|
||||
msgid ""
|
||||
"For the complete list of available keyboard shortcuts, type `help shortcuts`"
|
||||
@@ -286,7 +287,7 @@ msgstr "Nicht nach einer Bestätigung fragen."
|
||||
#, javascript-format
|
||||
msgid "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
|
||||
msgstr ""
|
||||
"Datei \"%s\" wird importiert in das existierende Notizbuch \"%s\". "
|
||||
"Datei \"%s\" wird in das existierende Notizbuch \"%s\" importiert. "
|
||||
"Fortfahren?"
|
||||
|
||||
#, javascript-format
|
||||
@@ -294,7 +295,7 @@ msgid ""
|
||||
"New notebook \"%s\" will be created and file \"%s\" will be imported into "
|
||||
"it. Continue?"
|
||||
msgstr ""
|
||||
"Ein neues Notizbuch \"%s\" wird erstellt und die Datei \"%s\" wird in es "
|
||||
"Neues Notizbuch \"%s\" wird erstellt und die Datei \"%s\" wird hinein "
|
||||
"importiert. Fortfahren?"
|
||||
|
||||
#, javascript-format
|
||||
@@ -315,7 +316,7 @@ msgstr "Übersprungen: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Resources: %d."
|
||||
msgstr ""
|
||||
msgstr "Anhänge: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Tagged: %d."
|
||||
@@ -336,11 +337,12 @@ msgstr ""
|
||||
"aller Notizbücher anzuzeigen."
|
||||
|
||||
msgid "Displays only the first top <num> notes."
|
||||
msgstr "Zeigt nur die Top-<num> Notizen an."
|
||||
msgstr "Zeigt nur die ersten <num> Notizen an."
|
||||
|
||||
#, fuzzy
|
||||
msgid "Sorts the item by <field> (eg. title, updated_time, created_time)."
|
||||
msgstr "Sortiert nach <field> ( z.B. Titel,"
|
||||
msgstr ""
|
||||
"Sortiert nach <field> ( z.B. Titel, Bearbeitungszeitpunkt, "
|
||||
"Erstellungszeitpunkt)"
|
||||
|
||||
msgid "Reverses the sorting order."
|
||||
msgstr "Dreht die Sortierreihenfolge um."
|
||||
@@ -350,9 +352,9 @@ msgid ""
|
||||
"for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the "
|
||||
"to-dos, while `-ttd` would display notes and to-dos."
|
||||
msgstr ""
|
||||
"Zeige nur bestimmt Typen an. Kann `n` für Notizen sein, `t` für To-Dos, oder "
|
||||
"`nt` für Notizen und To-Dos ( z.B. würde `-tt` nur To-Dos anzeigen, während "
|
||||
"`-ttd` Notizen und To-Dos anzeigen würde )."
|
||||
"Zeigt nur bestimmte Item Typen an. Kann `n` für Notizen sein, `t` für To-"
|
||||
"Dos, oder `nt` für Notizen und To-Dos ( z.B. zeigt `-tt` nur To-Dos an, "
|
||||
"während `-ttd` Notizen und To-Dos anzeigt)."
|
||||
|
||||
msgid "Either \"text\" or \"json\""
|
||||
msgstr "Entweder \"text\" oder \"json\""
|
||||
@@ -361,6 +363,8 @@ msgid ""
|
||||
"Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, "
|
||||
"TODO_CHECKED (for to-dos), TITLE"
|
||||
msgstr ""
|
||||
"Verwende ausführliches Listen Format. Das Format lautet: ID, NOTIZEN_ANZAHL "
|
||||
"(für Notizbuch), DATUM, TODO_BEARBEITET (für To-Dos), TITEL"
|
||||
|
||||
msgid "Please select a notebook first."
|
||||
msgstr "Bitte wähle erst ein Notizbuch aus."
|
||||
@@ -381,17 +385,17 @@ msgid "Moves the notes matching <note> to [notebook]."
|
||||
msgstr "Verschiebt die Notizen, die mit <note> übereinstimmen, zu [Notizbuch]"
|
||||
|
||||
msgid "Renames the given <item> (note or notebook) to <name>."
|
||||
msgstr "Benennt das gegebene <item> ( Notiz oder Notizbuch ) zu <name> um."
|
||||
msgstr "Benennt das angegebene <item> ( Notiz oder Notizbuch ) zu <name> um."
|
||||
|
||||
msgid "Deletes the given notebook."
|
||||
msgstr "Löscht das gegebene Notizbuch."
|
||||
msgstr "Löscht das ausgewählte Notizbuch."
|
||||
|
||||
msgid "Deletes the notebook without asking for confirmation."
|
||||
msgstr "Löscht das Notizbuch, ohne nach einer Bestätigung zu fragen."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Delete notebook \"%s\"?"
|
||||
msgstr "Notizbuch \"%s\" löschen?"
|
||||
msgid "Delete notebook? All notes within this notebook will also be deleted."
|
||||
msgstr ""
|
||||
"Notizbuch wirklich löschen? Alle Notizen darin werden ebenfalls gelöscht."
|
||||
|
||||
msgid "Deletes the notes matching <note-pattern>."
|
||||
msgstr "Löscht die Notizen, die mit <note-pattern> übereinstimmen."
|
||||
@@ -405,25 +409,32 @@ msgstr ""
|
||||
"%d Notizen stimmen mit diesem Muster überein. Sollen sie gelöscht werden?"
|
||||
|
||||
msgid "Delete note?"
|
||||
msgstr "Lösche Notiz?"
|
||||
msgstr "Notiz löschen?"
|
||||
|
||||
msgid "Searches for the given <pattern> in all the notes."
|
||||
msgstr "Sucht nach dem gegebenen <pattern> in allen Notizen."
|
||||
msgstr "Sucht nach dem angegebenen <pattern> in allen Notizen."
|
||||
|
||||
msgid "Sets the property <name> of the given <note> to the given [value]."
|
||||
#, javascript-format
|
||||
msgid ""
|
||||
"Sets the property <name> of the given <note> to the given [value]. Possible "
|
||||
"properties are:\n"
|
||||
"\n"
|
||||
"%s"
|
||||
msgstr ""
|
||||
"Setzt die Eigenschaft <name> der gegebenen <note> zu dem gegebenen [Wert]."
|
||||
"Setzt die Eigenschaft <name> der gegebenen <note> auf den gegebenen [Wert]. "
|
||||
"Mögliche Werte sind:\n"
|
||||
"\n"
|
||||
"%s"
|
||||
|
||||
msgid "Displays summary about the notes and notebooks."
|
||||
msgstr "Zeigt eine Zusammenfassung über die Notizen und Notizbücher an."
|
||||
msgstr "Zeigt eine Zusammenfassung der Notizen und Notizbücher an."
|
||||
|
||||
#, fuzzy
|
||||
msgid "Synchronises with remote storage."
|
||||
msgstr "Synchronisiert mit "
|
||||
msgstr "Synchronisiert mit Remotespeicher."
|
||||
|
||||
msgid "Sync to provided target (defaults to sync.target config value)"
|
||||
msgstr ""
|
||||
"Synchronisiere mit dem gegebenen Ziel ( voreingestellt auf den sync.target "
|
||||
"Mit dem angegebenen Ziel synchronisieren (voreingestellt auf den sync.target "
|
||||
"Optionswert)"
|
||||
|
||||
msgid "Synchronisation is already in progress."
|
||||
@@ -437,12 +448,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"Eine Sperrdatei ist vorhanden. Wenn du dir sicher bist, dass keine "
|
||||
"Synchronisation im Gange ist, kannst du die Sperrdatei \"%s\" löschen und "
|
||||
"vortfahren."
|
||||
"fortfahren."
|
||||
|
||||
msgid ""
|
||||
"Authentication was not completed (did not receive an authentication token)."
|
||||
msgstr ""
|
||||
"Authentikation wurde nicht abgeschlossen (keinen Authentikations-Token "
|
||||
"Authentifizierung wurde nicht abgeschlossen (keinen Authentifizierung-Token "
|
||||
"erhalten)."
|
||||
|
||||
#, javascript-format
|
||||
@@ -473,7 +484,6 @@ msgstr ""
|
||||
msgid "Invalid command: \"%s\""
|
||||
msgstr "Ungültiger Befehl: \"%s\""
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"<todo-command> can either be \"toggle\" or \"clear\". Use \"toggle\" to "
|
||||
"toggle the given to-do between completed and uncompleted state (If the "
|
||||
@@ -482,8 +492,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"<todo-command> kann entweder \"toggle\" oder \"clear\" sein. Benutze \"toggle"
|
||||
"\", um ein To-Do abzuschließen, oder es zu beginnen (Wenn das Ziel eine "
|
||||
"normale Notiz ist, wird es zu einem To-Do umgewandelt). Benutze \"clear\", "
|
||||
"um es zurück zu einem To-Do zu verwandeln."
|
||||
"normale Notiz ist, wird diese in ein To-Do umgewandelt). Benutze \"clear\", "
|
||||
"um es zurück in ein To-Do zu verwandeln."
|
||||
|
||||
msgid "Marks a to-do as non-completed."
|
||||
msgstr "Makiert ein To-Do als nicht-abgeschlossen."
|
||||
@@ -492,11 +502,11 @@ msgid ""
|
||||
"Switches to [notebook] - all further operations will happen within this "
|
||||
"notebook."
|
||||
msgstr ""
|
||||
"Wechselt zu [Notizbuch] - alle weiteren Tätigkeiten werden in diesem "
|
||||
"Notizbuch verrichtet."
|
||||
"Wechselt zu [Notizbuch] - alle weiteren Aktionen werden in diesem Notizbuch "
|
||||
"ausgeführt."
|
||||
|
||||
msgid "Displays version information"
|
||||
msgstr ""
|
||||
msgstr "Zeigt die Versionsnummer an"
|
||||
|
||||
#, javascript-format
|
||||
msgid "%s %s (%s)"
|
||||
@@ -526,10 +536,10 @@ msgstr "Schwerwiegender Fehler:"
|
||||
msgid ""
|
||||
"The application has been authorised - you may now close this browser tab."
|
||||
msgstr ""
|
||||
"Das Programm wurde authorisiert - Du kannst nun diesen Browsertab schließen."
|
||||
"Das Programm wurde autorisiert - Du kannst diesen Browsertab nun schließen."
|
||||
|
||||
msgid "The application has been successfully authorised."
|
||||
msgstr "Das Programm wurde erfolgreich authorisiert."
|
||||
msgstr "Das Programm wurde erfolgreich autorisiert."
|
||||
|
||||
msgid ""
|
||||
"Please open the following URL in your browser to authenticate the "
|
||||
@@ -540,13 +550,29 @@ msgid ""
|
||||
msgstr ""
|
||||
"Bitte öffne die folgende URL in deinem Browser, um das Programm zu "
|
||||
"authentifizieren. Das Programm wird einen Ordner in \"Apps/Joplin\" "
|
||||
"erstellen und wird nur in diesem Ordner schreiben und lesen. Es wird keinen "
|
||||
"Zugriff auf Dateien außerhalb dieses Ordners haben, noch auf persönliche "
|
||||
"Daten. Es werden keine Daten mit Dritten geteilt."
|
||||
"erstellen und wird nur in diesem Ordner schreiben und lesen. Es wird weder "
|
||||
"Zugriff auf Dateien außerhalb dieses Ordners haben, noch auf andere "
|
||||
"persönliche Daten. Es werden keine Daten mit Dritten geteilt."
|
||||
|
||||
msgid "Search:"
|
||||
msgstr "Suchen:"
|
||||
|
||||
msgid ""
|
||||
"Welcome to Joplin!\n"
|
||||
"\n"
|
||||
"Type `:help shortcuts` for the list of keyboard shortcuts, or just `:help` "
|
||||
"for usage information.\n"
|
||||
"\n"
|
||||
"For example, to create a notebook press `mb`; to create a note press `mn`."
|
||||
msgstr ""
|
||||
"Willkommen bei Joplin!\n"
|
||||
"\n"
|
||||
"Tippe `:help shortcuts` für eine Liste der Shortcuts oder `:help` für "
|
||||
"Nutzungsinformationen ein.\n"
|
||||
"\n"
|
||||
"Um zum Beispiel ein Notizbuch zu erstellen, drücke `mb`; um eine Notiz zu "
|
||||
"erstellen drücke `mn`."
|
||||
|
||||
msgid "File"
|
||||
msgstr "Datei"
|
||||
|
||||
@@ -560,10 +586,10 @@ msgid "New notebook"
|
||||
msgstr "Neues Notizbuch"
|
||||
|
||||
msgid "Import Evernote notes"
|
||||
msgstr "Importiere Evernote Notizen"
|
||||
msgstr "Evernote Notizen importieren"
|
||||
|
||||
msgid "Evernote Export Files"
|
||||
msgstr ""
|
||||
msgstr "Evernote Export Dateien"
|
||||
|
||||
msgid "Quit"
|
||||
msgstr "Verlassen"
|
||||
@@ -586,9 +612,8 @@ msgstr "Alle Notizen durchsuchen"
|
||||
msgid "Tools"
|
||||
msgstr "Werkzeuge"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Synchronisation status"
|
||||
msgstr "Synchronisationsziel"
|
||||
msgstr "Status der Synchronisation"
|
||||
|
||||
msgid "Options"
|
||||
msgstr "Optionen"
|
||||
@@ -612,6 +637,79 @@ msgstr "OK"
|
||||
msgid "Cancel"
|
||||
msgstr "Abbrechen"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Notes and settings are stored in: %s"
|
||||
msgstr "Notizen und Einstellungen gespeichert in: %s"
|
||||
|
||||
msgid "Save"
|
||||
msgstr "Speichern"
|
||||
|
||||
msgid ""
|
||||
"Disabling encryption means *all* your notes and attachments are going to be "
|
||||
"re-synchronised and sent unencrypted to the sync target. Do you wish to "
|
||||
"continue?"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Enabling encryption means *all* your notes and attachments are going to be "
|
||||
"re-synchronised and sent encrypted to the sync target. Do not lose the "
|
||||
"password as, for security purposes, this will be the *only* way to decrypt "
|
||||
"the data! To enable encryption, please enter your password below."
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable encryption"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable encryption"
|
||||
msgstr ""
|
||||
|
||||
msgid "Master Keys"
|
||||
msgstr ""
|
||||
|
||||
msgid "Active"
|
||||
msgstr "Aktiv"
|
||||
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgid "Source"
|
||||
msgstr "Quelle"
|
||||
|
||||
msgid "Created"
|
||||
msgstr "Erstellt"
|
||||
|
||||
msgid "Updated"
|
||||
msgstr "Aktualisiert"
|
||||
|
||||
msgid "Password"
|
||||
msgstr "Passwort"
|
||||
|
||||
msgid "Password OK"
|
||||
msgstr "Passwort OK"
|
||||
|
||||
msgid ""
|
||||
"Note: Only one master key is going to be used for encryption (the one marked "
|
||||
"as \"active\"). Any of the keys might be used for decryption, depending on "
|
||||
"how the notes or notebooks were originally encrypted."
|
||||
msgstr ""
|
||||
"Hinweis: Nur ein Hauptschlüssel wird für die Verschlüsselung verwendet (der "
|
||||
"als \"aktiv\" markierte). Jeder der Schlüssel kann für die Entschlüsselung "
|
||||
"verwendet werden, abhängig davon, wie die jeweiligen Notizen oder "
|
||||
"Notizbücher ursprünglich verschlüsselt wurden."
|
||||
|
||||
msgid "Status"
|
||||
msgstr "Status"
|
||||
|
||||
msgid "Encryption is:"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Enabled"
|
||||
msgstr "Deaktiviert"
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr "Deaktiviert"
|
||||
|
||||
msgid "Back"
|
||||
msgstr "Zurück"
|
||||
|
||||
@@ -619,14 +717,14 @@ msgstr "Zurück"
|
||||
msgid ""
|
||||
"New notebook \"%s\" will be created and file \"%s\" will be imported into it"
|
||||
msgstr ""
|
||||
"Ein neues Notizbuch \"%s\" wird erstellt und die Datei \"%s\" wird in es "
|
||||
"Neues Notizbuch \"%s\" wird erstellt und die Datei \"%s\" wird hinein "
|
||||
"importiert"
|
||||
|
||||
msgid "Please create a notebook first."
|
||||
msgstr "Bitte erstelle zuerst ein Notizbuch."
|
||||
|
||||
msgid "Note title:"
|
||||
msgstr "Notiz titel:"
|
||||
msgstr "Notizen Titel:"
|
||||
|
||||
msgid "Please create a notebook first"
|
||||
msgstr "Bitte erstelle zuerst ein Notizbuch"
|
||||
@@ -646,25 +744,30 @@ msgstr "Trenne jede Markierung mit einem Komma."
|
||||
msgid "Rename notebook:"
|
||||
msgstr "Benne Notizbuch um:"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Set alarm:"
|
||||
msgstr "Erstelle Alarm"
|
||||
msgstr "Alarm erstellen:"
|
||||
|
||||
msgid "Layout"
|
||||
msgstr "Layout"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Some items cannot be synchronised."
|
||||
msgstr "Kann Synchronisierer nicht initialisieren."
|
||||
msgstr "Manche Objekte können nicht synchronisiert werden."
|
||||
|
||||
msgid "View them now"
|
||||
msgstr "Zeige sie jetzt an"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Some items cannot be decrypted."
|
||||
msgstr "Kann Synchronisierer nicht initialisieren."
|
||||
|
||||
msgid "Set the password"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add or remove tags"
|
||||
msgstr "Füge hinzu oder entferne Markierungen"
|
||||
msgstr "Markierungen hinzufügen oder entfernen"
|
||||
|
||||
msgid "Switch between note and to-do type"
|
||||
msgstr "Wechsel zwischen Notiz und To-Do Typ"
|
||||
msgstr "Zwischen Notiz und To-Do Typ wechseln"
|
||||
|
||||
msgid "Delete"
|
||||
msgstr "Löschen"
|
||||
@@ -674,17 +777,24 @@ msgstr "Notizen löschen?"
|
||||
|
||||
msgid "No notes in here. Create one by clicking on \"New note\"."
|
||||
msgstr ""
|
||||
"Hier sind keine Notizen. Erstelle eine indem zu auf \"Neue Notiz\" drückst."
|
||||
"Hier sind noch keine Notizen. Erstelle eine, indem du auf \"Neue Notiz\" "
|
||||
"drückst."
|
||||
|
||||
msgid ""
|
||||
"There is currently no notebook. Create one by clicking on \"New notebook\"."
|
||||
msgstr ""
|
||||
"Momentan existieren noch keine Notizbücher. Erstelle eines, indem du auf den "
|
||||
"(+) Knopf drückst."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Unsupported link or message: %s"
|
||||
msgstr "Nicht unterstützter Link oder Nachricht: %s"
|
||||
|
||||
msgid "Attach file"
|
||||
msgstr "Hänge Datei an"
|
||||
msgstr "Datei anhängen"
|
||||
|
||||
msgid "Set alarm"
|
||||
msgstr "Erstelle Alarm"
|
||||
msgstr "Alarm erstellen"
|
||||
|
||||
msgid "Refresh"
|
||||
msgstr "Aktualisieren"
|
||||
@@ -693,20 +803,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
msgid "OneDrive Login"
|
||||
msgstr "OneDrive login"
|
||||
msgstr "OneDrive Login"
|
||||
|
||||
msgid "Import"
|
||||
msgstr "Importieren"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Synchronisation Status"
|
||||
msgstr "Synchronisationsziel"
|
||||
msgstr "Synchronisations Status"
|
||||
|
||||
msgid "Delete notebook?"
|
||||
msgstr "Notizbuch löschen?"
|
||||
msgid "Encryption Options"
|
||||
msgstr ""
|
||||
|
||||
msgid "Remove this tag from all the notes?"
|
||||
msgstr "Diese Markierung von allen Notizen löschen?"
|
||||
msgstr "Diese Markierung von allen Notizen entfernen?"
|
||||
|
||||
msgid "Remove this search from the sidebar?"
|
||||
msgstr "Diese Suche von der Seitenleiste entfernen?"
|
||||
@@ -724,15 +833,19 @@ msgid "Tags"
|
||||
msgstr "Markierungen"
|
||||
|
||||
msgid "Searches"
|
||||
msgstr "Sucht"
|
||||
msgstr "Suchen"
|
||||
|
||||
msgid "Please select where the sync status should be exported to"
|
||||
msgstr ""
|
||||
"Bitte wähle aus, wohin der Synchronisations Status exportiert werden soll"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Usage: %s"
|
||||
msgstr ""
|
||||
msgstr "Nutzung: %s"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Unknown flag: %s"
|
||||
msgstr ""
|
||||
msgstr "Unbekanntes Argument: %s"
|
||||
|
||||
msgid "File system"
|
||||
msgstr "Dateisystem"
|
||||
@@ -741,22 +854,22 @@ msgid "OneDrive"
|
||||
msgstr "OneDrive"
|
||||
|
||||
msgid "OneDrive Dev (For testing only)"
|
||||
msgstr "OneDrive Dev ( Nur für Tests )"
|
||||
msgstr "OneDrive Dev (Nur für Tests)"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Unknown log level: %s"
|
||||
msgstr "Unbekanntes Loglevel: %s"
|
||||
msgstr "Unbekanntes Log Level: %s"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Unknown level ID: %s"
|
||||
msgstr "Unbekannte Level-ID: %s"
|
||||
msgstr "Unbekannte Level ID: %s"
|
||||
|
||||
msgid ""
|
||||
"Cannot refresh token: authentication data is missing. Starting the "
|
||||
"synchronisation again may fix the problem."
|
||||
msgstr ""
|
||||
"Kann Token nicht erneuern: Authentikationsdaten nicht vorhanden. Ein "
|
||||
"Neustart der Synchronisation behebt das Problem vielleicht."
|
||||
"Kann Token nicht erneuern: Authentifikationsdaten nicht vorhanden. Ein "
|
||||
"Neustart der Synchronisation könnte das Problem beheben."
|
||||
|
||||
msgid ""
|
||||
"Could not synchronize with OneDrive.\n"
|
||||
@@ -766,6 +879,12 @@ msgid ""
|
||||
"\n"
|
||||
"Please consider using a regular OneDrive account."
|
||||
msgstr ""
|
||||
"Konnte nicht mit OneDrive synchronisieren.\n"
|
||||
"\n"
|
||||
"Dieser Fehler kommt oft vor, wenn OneDrive Business benutzt wird, das leider "
|
||||
"nicht unterstützt wird.\n"
|
||||
"\n"
|
||||
"Bitte benutze stattdessen einen normalen OneDrive Account."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Cannot access %s"
|
||||
@@ -773,27 +892,27 @@ msgstr "Kann nicht auf %s zugreifen"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Created local items: %d."
|
||||
msgstr ""
|
||||
msgstr "Lokale Objekte erstellt: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Updated local items: %d."
|
||||
msgstr ""
|
||||
msgstr "Lokale Objekte aktualisiert: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Created remote items: %d."
|
||||
msgstr ""
|
||||
msgstr "Remote Objekte erstellt: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Updated remote items: %d."
|
||||
msgstr ""
|
||||
msgstr "Remote Objekte aktualisiert: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Deleted local items: %d."
|
||||
msgstr ""
|
||||
msgstr "Lokale Objekte gelöscht: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Deleted remote items: %d."
|
||||
msgstr ""
|
||||
msgstr "Remote Objekte gelöscht: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "State: \"%s\"."
|
||||
@@ -836,26 +955,16 @@ msgstr "Kann Notiz nicht zu Notizbuch \"%s\" kopieren"
|
||||
msgid "Cannot move note to \"%s\" notebook"
|
||||
msgstr "Kann Notiz nicht zu Notizbuch \"%s\" verschieben"
|
||||
|
||||
msgid "File system synchronisation target directory"
|
||||
msgstr "Dateisystem-Synchronisation Zielpfad"
|
||||
|
||||
msgid ""
|
||||
"The path to synchronise with when file system synchronisation is enabled. "
|
||||
"See `sync.target`."
|
||||
msgstr ""
|
||||
"Der Pfad, mit dem synchronisiert wird, wenn Dateisystem-Synchronisation "
|
||||
"aktiviert ist. Siehe `sync.target`."
|
||||
|
||||
msgid "Text editor"
|
||||
msgstr "Textbearbeitungsprogramm"
|
||||
msgstr "Textverarbeitungsprogramm"
|
||||
|
||||
msgid ""
|
||||
"The editor that will be used to open a note. If none is provided it will try "
|
||||
"to auto-detect the default editor."
|
||||
msgstr ""
|
||||
"Das Textbearbeitungsprogramm, mit dem Notizen geöffnet werden. Wenn keines "
|
||||
"Das Textverarbeitungsprogramm, mit dem Notizen geöffnet werden. Wenn keines "
|
||||
"ausgewählt wurde, wird Joplin versuchen das standard-"
|
||||
"Textbearbeitungsprogramm zu erkennen."
|
||||
"Textverarbeitungsprogramm zu erkennen."
|
||||
|
||||
msgid "Language"
|
||||
msgstr "Sprache"
|
||||
@@ -876,17 +985,14 @@ msgid "Dark"
|
||||
msgstr "Dunkel"
|
||||
|
||||
msgid "Show uncompleted todos on top of the lists"
|
||||
msgstr "Zeige unvollständige ToDos oben in der Liste an"
|
||||
msgstr "Zeige unvollständige To-Dos oben in der Liste"
|
||||
|
||||
msgid "Save geo-location with notes"
|
||||
msgstr "Speicher momentanen Standort zusammen mit Notizen"
|
||||
msgstr "Momentanen Standort zusammen mit Notizen speichern"
|
||||
|
||||
msgid "Synchronisation interval"
|
||||
msgstr "Synchronisationsinterval"
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr "Deaktiviert"
|
||||
|
||||
#, javascript-format
|
||||
msgid "%d minutes"
|
||||
msgstr "%d Minuten"
|
||||
@@ -900,10 +1006,10 @@ msgid "%d hours"
|
||||
msgstr "%d Stunden"
|
||||
|
||||
msgid "Automatically update the application"
|
||||
msgstr "Halte die Applikation automatisch auf den neusten Stand"
|
||||
msgstr "Die Applikation automatisch aktualisieren"
|
||||
|
||||
msgid "Show advanced options"
|
||||
msgstr "Zeige erweiterte Optionen an"
|
||||
msgstr "Erweiterte Optionen anzeigen"
|
||||
|
||||
msgid "Synchronisation target"
|
||||
msgstr "Synchronisationsziel"
|
||||
@@ -913,22 +1019,32 @@ msgid ""
|
||||
"`sync.2.path` to specify the target directory."
|
||||
msgstr ""
|
||||
"Das Synchronisationsziel, mit dem synchronisiert werden soll. Wenn mit dem "
|
||||
"Dateisystem synchronisiert werden soll, setzen Sie den Wert zu `sync.2."
|
||||
"path`, um den Zielpfad zu spezifizieren."
|
||||
"Dateisystem synchronisiert werden soll, setze den Wert zu `sync.2.path`, um "
|
||||
"den Zielpfad zu spezifizieren."
|
||||
|
||||
msgid "Directory to synchronise with (absolute path)"
|
||||
msgstr "Verzeichnis zum synchronisieren (absoluter Pfad)"
|
||||
|
||||
msgid ""
|
||||
"The path to synchronise with when file system synchronisation is enabled. "
|
||||
"See `sync.target`."
|
||||
msgstr ""
|
||||
"Der Pfad, mit dem synchronisiert wird, wenn Dateisystem-Synchronisation "
|
||||
"aktiviert ist. Siehe `sync.target`."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Invalid option value: \"%s\". Possible values are: %s."
|
||||
msgstr "Ungültiger Optionswert: \"%s\". Mögliche Werte sind: %s."
|
||||
|
||||
msgid "Items that cannot be synchronised"
|
||||
msgstr ""
|
||||
msgstr "Objekte können nicht synchronisiert werden"
|
||||
|
||||
#, javascript-format
|
||||
msgid "\"%s\": \"%s\""
|
||||
msgstr ""
|
||||
msgstr "\"%s\": \"%s\""
|
||||
|
||||
msgid "Sync status (synced items / total items)"
|
||||
msgstr "Synchronisations status (synchronisierte Notizen / insgesamt )"
|
||||
msgstr "Synchronisationsstatus (synchronisierte Objekte / gesamte Objekte)"
|
||||
|
||||
#, javascript-format
|
||||
msgid "%s: %d/%d"
|
||||
@@ -940,11 +1056,11 @@ msgstr "Insgesamt: %d/%d"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Conflicted: %d"
|
||||
msgstr ""
|
||||
msgstr "In Konflikt %d"
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
#, javascript-format
|
||||
msgid "To delete: %d"
|
||||
msgstr "Zu löschende Notizen: %d"
|
||||
msgstr "Zu löschen: %d"
|
||||
|
||||
msgid "Folders"
|
||||
msgstr "Ordner"
|
||||
@@ -954,7 +1070,7 @@ msgid "%s: %d notes"
|
||||
msgstr "%s: %d Notizen"
|
||||
|
||||
msgid "Coming alarms"
|
||||
msgstr "Anstehender Alarm"
|
||||
msgstr "Anstehende Alarme"
|
||||
|
||||
#, javascript-format
|
||||
msgid "On %s: %s"
|
||||
@@ -962,8 +1078,8 @@ msgstr "Auf %s: %s"
|
||||
|
||||
msgid "There are currently no notes. Create one by clicking on the (+) button."
|
||||
msgstr ""
|
||||
"Momentan existieren noch keine Notizen. Erstelle eine indem Sie auf den (+) "
|
||||
"Knopf drücken."
|
||||
"Momentan existieren noch keine Notizen. Erstelle eine, indem du auf den (+) "
|
||||
"Knopf drückst."
|
||||
|
||||
msgid "Delete these notes?"
|
||||
msgstr "Sollen diese Notizen gelöscht werden?"
|
||||
@@ -971,9 +1087,6 @@ msgstr "Sollen diese Notizen gelöscht werden?"
|
||||
msgid "Log"
|
||||
msgstr "Log"
|
||||
|
||||
msgid "Status"
|
||||
msgstr "Status"
|
||||
|
||||
msgid "Export Debug Report"
|
||||
msgstr "Fehlerbreicht exportieren"
|
||||
|
||||
@@ -981,14 +1094,14 @@ msgid "Configuration"
|
||||
msgstr "Konfiguration"
|
||||
|
||||
msgid "Move to notebook..."
|
||||
msgstr "Verschiebe zu Notizbuch..."
|
||||
msgstr "In Notizbuch verschieben..."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Move %d notes to notebook \"%s\"?"
|
||||
msgstr "Verschiebe %d Notizen zu dem Notizbuch \"%s\"?"
|
||||
msgstr "%d Notizen in das Notizbuch \"%s\" verschieben?"
|
||||
|
||||
msgid "Select date"
|
||||
msgstr "Datum ausswählen"
|
||||
msgstr "Datum auswählen"
|
||||
|
||||
msgid "Confirm"
|
||||
msgstr "Bestätigen"
|
||||
@@ -1023,10 +1136,10 @@ msgid "Attach any file"
|
||||
msgstr "Beliebige Datei anhängen"
|
||||
|
||||
msgid "Convert to note"
|
||||
msgstr "Zu einer Notiz umwandeln"
|
||||
msgstr "In eine Notiz umwandeln"
|
||||
|
||||
msgid "Convert to todo"
|
||||
msgstr "Zu einem ToDo umwandeln"
|
||||
msgstr "In ein To-Do umwandeln"
|
||||
|
||||
msgid "Hide metadata"
|
||||
msgstr "Metadaten verstecken"
|
||||
@@ -1047,16 +1160,26 @@ msgid ""
|
||||
"Click on the (+) button to create a new note or notebook. Click on the side "
|
||||
"menu to access your existing notebooks."
|
||||
msgstr ""
|
||||
"Drücken Sie auf den (+) Knopf, um eine neue Notiz oder ein neues Notizbuch "
|
||||
"zu erstellen."
|
||||
"Drücke auf den (+) Knopf, um eine neue Notiz oder ein neues Notizbuch zu "
|
||||
"erstellen. Tippe auf die Seitenleiste, um auf deine existierenden "
|
||||
"Notizbücher zuzugreifen."
|
||||
|
||||
msgid "You currently have no notebook. Create one by clicking on (+) button."
|
||||
msgstr ""
|
||||
"Du habst noch kein Notizbuch. Sie können eines erstellen, indem Sie auf den "
|
||||
"(+) Knopf drücken."
|
||||
"Du hast noch kein Notizbuch. Erstelle eines, indem du auf den (+) Knopf "
|
||||
"drückst."
|
||||
|
||||
msgid "Welcome"
|
||||
msgstr "Wilkommen"
|
||||
msgstr "Willkommen"
|
||||
|
||||
#~ msgid "Delete notebook?"
|
||||
#~ msgstr "Notizbuch löschen?"
|
||||
|
||||
#~ msgid "Delete notebook \"%s\"?"
|
||||
#~ msgstr "Notizbuch \"%s\" löschen?"
|
||||
|
||||
#~ msgid "File system synchronisation target directory"
|
||||
#~ msgstr "Dateisystem-Synchronisation Zielpfad"
|
||||
|
||||
#~ msgid "Set or clear alarm:"
|
||||
#~ msgstr "Erstelle oder entferne Alarm:"
|
||||
|
@@ -208,7 +208,9 @@ msgstr ""
|
||||
msgid "Shortcuts are not available in CLI mode."
|
||||
msgstr ""
|
||||
|
||||
msgid "Type `help [command]` for more information about a command."
|
||||
msgid ""
|
||||
"Type `help [command]` for more information about a command; or type `help "
|
||||
"all` for the complete usage information."
|
||||
msgstr ""
|
||||
|
||||
msgid "The possible commands are:"
|
||||
@@ -343,8 +345,7 @@ msgstr ""
|
||||
msgid "Deletes the notebook without asking for confirmation."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Delete notebook \"%s\"?"
|
||||
msgid "Delete notebook? All notes within this notebook will also be deleted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Deletes the notes matching <note-pattern>."
|
||||
@@ -363,7 +364,12 @@ msgstr ""
|
||||
msgid "Searches for the given <pattern> in all the notes."
|
||||
msgstr ""
|
||||
|
||||
msgid "Sets the property <name> of the given <note> to the given [value]."
|
||||
#, javascript-format
|
||||
msgid ""
|
||||
"Sets the property <name> of the given <note> to the given [value]. Possible "
|
||||
"properties are:\n"
|
||||
"\n"
|
||||
"%s"
|
||||
msgstr ""
|
||||
|
||||
msgid "Displays summary about the notes and notebooks."
|
||||
@@ -473,6 +479,15 @@ msgstr ""
|
||||
msgid "Search:"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Welcome to Joplin!\n"
|
||||
"\n"
|
||||
"Type `:help shortcuts` for the list of keyboard shortcuts, or just `:help` "
|
||||
"for usage information.\n"
|
||||
"\n"
|
||||
"For example, to create a notebook press `mb`; to create a note press `mn`."
|
||||
msgstr ""
|
||||
|
||||
msgid "File"
|
||||
msgstr ""
|
||||
|
||||
@@ -537,6 +552,74 @@ msgstr ""
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Notes and settings are stored in: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Disabling encryption means *all* your notes and attachments are going to be "
|
||||
"re-synchronised and sent unencrypted to the sync target. Do you wish to "
|
||||
"continue?"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Enabling encryption means *all* your notes and attachments are going to be "
|
||||
"re-synchronised and sent encrypted to the sync target. Do not lose the "
|
||||
"password as, for security purposes, this will be the *only* way to decrypt "
|
||||
"the data! To enable encryption, please enter your password below."
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable encryption"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable encryption"
|
||||
msgstr ""
|
||||
|
||||
msgid "Master Keys"
|
||||
msgstr ""
|
||||
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
msgid "Source"
|
||||
msgstr ""
|
||||
|
||||
msgid "Created"
|
||||
msgstr ""
|
||||
|
||||
msgid "Updated"
|
||||
msgstr ""
|
||||
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
msgid "Password OK"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Note: Only one master key is going to be used for encryption (the one marked "
|
||||
"as \"active\"). Any of the keys might be used for decryption, depending on "
|
||||
"how the notes or notebooks were originally encrypted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
msgid "Encryption is:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "Back"
|
||||
msgstr ""
|
||||
|
||||
@@ -581,6 +664,12 @@ msgstr ""
|
||||
msgid "View them now"
|
||||
msgstr ""
|
||||
|
||||
msgid "Some items cannot be decrypted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Set the password"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add or remove tags"
|
||||
msgstr ""
|
||||
|
||||
@@ -596,6 +685,10 @@ msgstr ""
|
||||
msgid "No notes in here. Create one by clicking on \"New note\"."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"There is currently no notebook. Create one by clicking on \"New notebook\"."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Unsupported link or message: %s"
|
||||
msgstr ""
|
||||
@@ -621,7 +714,7 @@ msgstr ""
|
||||
msgid "Synchronisation Status"
|
||||
msgstr ""
|
||||
|
||||
msgid "Delete notebook?"
|
||||
msgid "Encryption Options"
|
||||
msgstr ""
|
||||
|
||||
msgid "Remove this tag from all the notes?"
|
||||
@@ -645,6 +738,9 @@ msgstr ""
|
||||
msgid "Searches"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please select where the sync status should be exported to"
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Usage: %s"
|
||||
msgstr ""
|
||||
@@ -752,14 +848,6 @@ msgstr ""
|
||||
msgid "Cannot move note to \"%s\" notebook"
|
||||
msgstr ""
|
||||
|
||||
msgid "File system synchronisation target directory"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"The path to synchronise with when file system synchronisation is enabled. "
|
||||
"See `sync.target`."
|
||||
msgstr ""
|
||||
|
||||
msgid "Text editor"
|
||||
msgstr ""
|
||||
|
||||
@@ -795,9 +883,6 @@ msgstr ""
|
||||
msgid "Synchronisation interval"
|
||||
msgstr ""
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "%d minutes"
|
||||
msgstr ""
|
||||
@@ -824,6 +909,14 @@ msgid ""
|
||||
"`sync.2.path` to specify the target directory."
|
||||
msgstr ""
|
||||
|
||||
msgid "Directory to synchronise with (absolute path)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"The path to synchronise with when file system synchronisation is enabled. "
|
||||
"See `sync.target`."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Invalid option value: \"%s\". Possible values are: %s."
|
||||
msgstr ""
|
||||
@@ -877,9 +970,6 @@ msgstr ""
|
||||
msgid "Log"
|
||||
msgstr ""
|
||||
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
msgid "Export Debug Report"
|
||||
msgstr ""
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,34 +1,33 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Laurent Cozic
|
||||
# Joplin translation to Spanish (Spain)
|
||||
# Copyright (C) 2017 Lucas Vieites
|
||||
# This file is distributed under the same license as the Joplin-CLI package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
# Lucas Vieites <lucas.vieites@gmail.com>, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Joplin-CLI 1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Language-Team: \n"
|
||||
"Last-Translator: Lucas Vieites\n"
|
||||
"Language-Team: Spanish <lucas.vieites@gmail.com>\n"
|
||||
"Language: es_ES\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"X-Generator: Poedit 2.0.4\n"
|
||||
"Last-Translator: \n"
|
||||
"X-Generator: Poedit 1.8.11\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: es_419\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
|
||||
msgid "Give focus to next pane"
|
||||
msgstr "Dar enfoque al siguiente panel"
|
||||
msgstr "Enfocar el siguiente panel"
|
||||
|
||||
msgid "Give focus to previous pane"
|
||||
msgstr "Dar enfoque al panel anterior"
|
||||
msgstr "Enfocar el panel anterior"
|
||||
|
||||
msgid "Enter command line mode"
|
||||
msgstr "Entrar modo linea de comandos"
|
||||
msgstr "Entrar en modo línea de comandos"
|
||||
|
||||
msgid "Exit command line mode"
|
||||
msgstr "Salir modo linea de comandos"
|
||||
msgstr "Salir del modo línea de comandos"
|
||||
|
||||
msgid "Edit the selected note"
|
||||
msgstr "Editar la nota seleccionada"
|
||||
@@ -43,32 +42,31 @@ msgid "Delete the currently selected note or notebook."
|
||||
msgstr "Eliminar la nota o libreta seleccionada."
|
||||
|
||||
msgid "To delete a tag, untag the associated notes."
|
||||
msgstr "Para eliminar una etiqueta, desmarca las notas asociadas."
|
||||
msgstr "Desmarque las notas asociadas para eliminar una etiqueta."
|
||||
|
||||
msgid "Please select the note or notebook to be deleted first."
|
||||
msgstr "Por favor selecciona la nota o libreta a elliminar."
|
||||
msgstr "Seleccione primero la nota o libreta que desea eliminar."
|
||||
|
||||
#, fuzzy
|
||||
msgid "Set a to-do as completed / not completed"
|
||||
msgstr "Marca una tarea como completado / no completado"
|
||||
msgstr "Marca una tarea como completada/no completada"
|
||||
|
||||
msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
|
||||
msgstr "[c]ambia la [c]onsola entre maximizado/minimizado/oculto/visible."
|
||||
msgstr "in[t]ercambia la [c]onsola entre maximizada/minimizada/oculta/visible."
|
||||
|
||||
msgid "Search"
|
||||
msgstr "Buscar"
|
||||
|
||||
msgid "[t]oggle note [m]etadata."
|
||||
msgstr "[c]ambia los [m]etadatos de una nota."
|
||||
msgstr "in[t]ercambia los [m]etadatos de una nota."
|
||||
|
||||
msgid "[M]ake a new [n]ote"
|
||||
msgstr "[H]acer una [n]ota nueva"
|
||||
msgstr "[C]rear una [n]ota nueva"
|
||||
|
||||
msgid "[M]ake a new [t]odo"
|
||||
msgstr "[H]acer una nueva [t]area"
|
||||
msgstr "[C]rear una [t]area nueva"
|
||||
|
||||
msgid "[M]ake a new note[b]ook"
|
||||
msgstr "[H]acer una nueva [l]ibreta"
|
||||
msgstr "[C]rear una li[b]reta nueva"
|
||||
|
||||
msgid "Copy ([Y]ank) the [n]ote to a notebook."
|
||||
msgstr "Copiar ([Y]ank) la [n]ota a una libreta."
|
||||
@@ -77,14 +75,15 @@ msgid "Move the note to a notebook."
|
||||
msgstr "Mover la nota a una libreta."
|
||||
|
||||
msgid "Press Ctrl+D or type \"exit\" to exit the application"
|
||||
msgstr "Presiona Ctrl+D o escribe \"salir\" para salir de la aplicación"
|
||||
msgstr "Pulse Ctrl+D o escriba «salir» para salir de la aplicación"
|
||||
|
||||
#, javascript-format
|
||||
msgid "More than one item match \"%s\". Please narrow down your query."
|
||||
msgstr "Más de un artículo coincide con \"%s\". Por favor acortar tu consulta."
|
||||
msgstr ""
|
||||
"Hay más de un elemento que coincide con «%s», intente mejorar su consulta."
|
||||
|
||||
msgid "No notebook selected."
|
||||
msgstr "Ninguna libreta seleccionada"
|
||||
msgstr "No se ha seleccionado ninguna libreta."
|
||||
|
||||
msgid "No notebook has been specified."
|
||||
msgstr "Ninguna libre fue especificada"
|
||||
@@ -104,9 +103,13 @@ msgstr "y"
|
||||
msgid "Cancelling background synchronisation... Please wait."
|
||||
msgstr "Cancelando sincronización de segundo plano... Por favor espere."
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
#, javascript-format
|
||||
msgid "No such command: %s"
|
||||
msgstr "El comando no existe: %s"
|
||||
|
||||
#, javascript-format
|
||||
msgid "The command \"%s\" is only available in GUI mode"
|
||||
msgstr "El comando \"%s\" unicamente disponible en modo GUI"
|
||||
msgstr "El comando «%s» solamente está disponible en modo GUI"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Missing required argument: %s"
|
||||
@@ -217,8 +220,13 @@ msgstr "Muestra información de uso."
|
||||
msgid "Shortcuts are not available in CLI mode."
|
||||
msgstr "Atajos no disponibles en modo CLI."
|
||||
|
||||
msgid "Type `help [command]` for more information about a command."
|
||||
msgstr "Escribe `help [command]` para más información acerca del comando."
|
||||
msgid ""
|
||||
"Type `help [command]` for more information about a command; or type `help "
|
||||
"all` for the complete usage information."
|
||||
msgstr ""
|
||||
"Escriba `help [command]` para obtener más información sobre el comando, o "
|
||||
"escriba `help all` para obtener toda la información acerca del uso del "
|
||||
"programa."
|
||||
|
||||
msgid "The possible commands are:"
|
||||
msgstr "Los posibles comandos son:"
|
||||
@@ -373,9 +381,10 @@ msgstr "Elimina la libreta dada."
|
||||
msgid "Deletes the notebook without asking for confirmation."
|
||||
msgstr "Elimina una libreta sin pedir confirmación."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Delete notebook \"%s\"?"
|
||||
msgstr "Elimina una libreta \"%s\"?"
|
||||
msgid "Delete notebook? All notes within this notebook will also be deleted."
|
||||
msgstr ""
|
||||
"¿Desea eliminar la libreta? Todas las notas dentro de esta libreta también "
|
||||
"serán eliminadas."
|
||||
|
||||
msgid "Deletes the notes matching <note-pattern>."
|
||||
msgstr "Elimina las notas que coinciden con <note-pattern>."
|
||||
@@ -393,8 +402,17 @@ msgstr "Eliminar nota?"
|
||||
msgid "Searches for the given <pattern> in all the notes."
|
||||
msgstr "Buscar el patron <pattern> en todas las notas."
|
||||
|
||||
msgid "Sets the property <name> of the given <note> to the given [value]."
|
||||
msgstr "Configura la propiedad <name> en la nota dada <note> al valor [value]."
|
||||
#, javascript-format
|
||||
msgid ""
|
||||
"Sets the property <name> of the given <note> to the given [value]. Possible "
|
||||
"properties are:\n"
|
||||
"\n"
|
||||
"%s"
|
||||
msgstr ""
|
||||
"Asigna el valor [value] a la propiedad <name> de la nota indicada <note>. "
|
||||
"Propiedades disponibles:\n"
|
||||
"\n"
|
||||
"%s"
|
||||
|
||||
msgid "Displays summary about the notes and notebooks."
|
||||
msgstr "Muestra un resumen acerca de las notas y las libretas."
|
||||
@@ -410,15 +428,15 @@ msgstr ""
|
||||
msgid "Synchronisation is already in progress."
|
||||
msgstr "Sincronzación en progreso."
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
#, javascript-format
|
||||
msgid ""
|
||||
"Lock file is already being hold. If you know that no synchronisation is "
|
||||
"taking place, you may delete the lock file at \"%s\" and resume the "
|
||||
"operation."
|
||||
msgstr ""
|
||||
"Archivo de bloqueo encontrado. Si tu sabes que no hay una sincronización en "
|
||||
"curso, puedes eliminar el archivo de bloqueo en \"%s\" y reanudar la "
|
||||
"operación."
|
||||
"Ya hay un archivo de bloqueo. Si está seguro de que no hay una "
|
||||
"sincronización en curso puede eliminar el archivo de bloqueo «%s» y reanudar "
|
||||
"la operación."
|
||||
|
||||
msgid ""
|
||||
"Authentication was not completed (did not receive an authentication token)."
|
||||
@@ -508,7 +526,6 @@ msgstr ""
|
||||
msgid "The application has been successfully authorised."
|
||||
msgstr "La aplicacion ha sido autorizada exitosamente."
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Please open the following URL in your browser to authenticate the "
|
||||
"application. The application will create a directory in \"Apps/Joplin\" and "
|
||||
@@ -516,32 +533,48 @@ msgid ""
|
||||
"any files outside this directory nor to any other personal data. No data "
|
||||
"will be shared with any third party."
|
||||
msgstr ""
|
||||
"Por favor abre la siguiente URL en tu navegador para autenticar la "
|
||||
"aplicacion. La aplicacion creara un directorio en \"Apps/Joplin\" y solo "
|
||||
"leerá y escribirá archivos en este directorio. No tendra acceso a ningun "
|
||||
"archivo fuera de este directorio ni a ningun otro archivo personal. Ninguna "
|
||||
"informacion sera compartido con terceros."
|
||||
"Abra la siguiente URL en su navegador para autenticar la aplicación. La "
|
||||
"aplicación creará un directorio en «Apps/Joplin» y solo leerá y escribirá "
|
||||
"archivos en este directorio. No tendrá acceso a ningún archivo fuera de este "
|
||||
"directorio ni a ningún otro archivo personal. No se compartirá información "
|
||||
"con terceros."
|
||||
|
||||
msgid "Search:"
|
||||
msgstr "Bucar:"
|
||||
msgstr "Buscar:"
|
||||
|
||||
msgid ""
|
||||
"Welcome to Joplin!\n"
|
||||
"\n"
|
||||
"Type `:help shortcuts` for the list of keyboard shortcuts, or just `:help` "
|
||||
"for usage information.\n"
|
||||
"\n"
|
||||
"For example, to create a notebook press `mb`; to create a note press `mn`."
|
||||
msgstr ""
|
||||
"Bienvenido a Joplin.\n"
|
||||
"\n"
|
||||
"Escriba «:help shortcuts» para obtener una lista con los atajos de teclado, "
|
||||
"o simplemente «:help» para información general.\n"
|
||||
"\n"
|
||||
"Por ejemplo, para crear una libreta escriba «mb», para crear una nota "
|
||||
"escriba «mn»."
|
||||
|
||||
msgid "File"
|
||||
msgstr "Archivo"
|
||||
|
||||
msgid "New note"
|
||||
msgstr "Nueva nota"
|
||||
msgstr "Nota nueva"
|
||||
|
||||
msgid "New to-do"
|
||||
msgstr "Nueva lista de tareas"
|
||||
msgstr "Lista de tareas nueva"
|
||||
|
||||
msgid "New notebook"
|
||||
msgstr "Nueva libreta"
|
||||
msgstr "Libreta nueva"
|
||||
|
||||
msgid "Import Evernote notes"
|
||||
msgstr "Importar notas de Evernote"
|
||||
|
||||
msgid "Evernote Export Files"
|
||||
msgstr "Exportar archivos de Evernote"
|
||||
msgstr "Archivos exportados de Evernote"
|
||||
|
||||
msgid "Quit"
|
||||
msgstr "Salir"
|
||||
@@ -564,6 +597,9 @@ msgstr "Buscar en todas las notas"
|
||||
msgid "Tools"
|
||||
msgstr "Herramientas"
|
||||
|
||||
msgid "Synchronisation status"
|
||||
msgstr "Estado de la sincronización"
|
||||
|
||||
msgid "Options"
|
||||
msgstr "Opciones"
|
||||
|
||||
@@ -571,7 +607,7 @@ msgid "Help"
|
||||
msgstr "Ayuda"
|
||||
|
||||
msgid "Website and documentation"
|
||||
msgstr "Sitio web y documentacion"
|
||||
msgstr "Sitio web y documentación"
|
||||
|
||||
msgid "About Joplin"
|
||||
msgstr "Acerca de Joplin"
|
||||
@@ -581,26 +617,93 @@ msgid "%s %s (%s, %s)"
|
||||
msgstr "%s %s (%s, %s)"
|
||||
|
||||
msgid "OK"
|
||||
msgstr "Ok"
|
||||
msgstr "OK"
|
||||
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Back"
|
||||
msgstr "Retroceder"
|
||||
#, javascript-format
|
||||
msgid "Notes and settings are stored in: %s"
|
||||
msgstr "Las notas y los ajustes se guardan en: %s"
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
msgid "Save"
|
||||
msgstr "Guardar"
|
||||
|
||||
msgid ""
|
||||
"Disabling encryption means *all* your notes and attachments are going to be "
|
||||
"re-synchronised and sent unencrypted to the sync target. Do you wish to "
|
||||
"continue?"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Enabling encryption means *all* your notes and attachments are going to be "
|
||||
"re-synchronised and sent encrypted to the sync target. Do not lose the "
|
||||
"password as, for security purposes, this will be the *only* way to decrypt "
|
||||
"the data! To enable encryption, please enter your password below."
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable encryption"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable encryption"
|
||||
msgstr ""
|
||||
|
||||
msgid "Master Keys"
|
||||
msgstr ""
|
||||
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgid "Source"
|
||||
msgstr "Origen"
|
||||
|
||||
msgid "Created"
|
||||
msgstr "Creado"
|
||||
|
||||
msgid "Updated"
|
||||
msgstr "Actualizado"
|
||||
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
msgid "Password OK"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Note: Only one master key is going to be used for encryption (the one marked "
|
||||
"as \"active\"). Any of the keys might be used for decryption, depending on "
|
||||
"how the notes or notebooks were originally encrypted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Status"
|
||||
msgstr "Estado"
|
||||
|
||||
msgid "Encryption is:"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Enabled"
|
||||
msgstr "Deshabilitado"
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr "Deshabilitado"
|
||||
|
||||
msgid "Back"
|
||||
msgstr "Atrás"
|
||||
|
||||
#, javascript-format
|
||||
msgid ""
|
||||
"New notebook \"%s\" will be created and file \"%s\" will be imported into it"
|
||||
msgstr ""
|
||||
"Nueva libreta \"%s\" sera creada y archivo \"%s\" sera importado dentro de"
|
||||
msgstr "Se creará la nueva libreta «%s» y se importará en ella el archivo «%s»"
|
||||
|
||||
msgid "Please create a notebook first."
|
||||
msgstr "Por favor crea una libreta primero."
|
||||
msgstr "Cree primero una libreta."
|
||||
|
||||
msgid "Note title:"
|
||||
msgstr "Título de nota:"
|
||||
msgstr "Título de la nota:"
|
||||
|
||||
msgid "Please create a notebook first"
|
||||
msgstr "Por favor crea una libreta primero"
|
||||
@@ -626,31 +729,47 @@ msgstr "Ajustar alarma:"
|
||||
msgid "Layout"
|
||||
msgstr "Diseño"
|
||||
|
||||
msgid "Add or remove tags"
|
||||
msgstr "Agregar o borrar etiquetas"
|
||||
msgid "Some items cannot be synchronised."
|
||||
msgstr "No se han podido sincronizar algunos de los elementos."
|
||||
|
||||
msgid "View them now"
|
||||
msgstr "Verlos ahora"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Some items cannot be decrypted."
|
||||
msgstr "No se han podido sincronizar algunos de los elementos."
|
||||
|
||||
msgid "Set the password"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add or remove tags"
|
||||
msgstr "Añadir o borrar etiquetas"
|
||||
|
||||
msgid "Switch between note and to-do type"
|
||||
msgstr "Cambiar entre nota y tipo de lista de tareas"
|
||||
msgstr "Cambiar entre nota y lista de tareas"
|
||||
|
||||
msgid "Delete"
|
||||
msgstr "Eliminar"
|
||||
|
||||
msgid "Delete notes?"
|
||||
msgstr "Eliminar notas?"
|
||||
msgstr "¿Desea eliminar notas?"
|
||||
|
||||
msgid "No notes in here. Create one by clicking on \"New note\"."
|
||||
msgstr "No hay notas aqui. Crea una dando click en \"Nueva nota\"."
|
||||
msgstr "No hay ninguna nota. Cree una pulsando «Nota nueva»."
|
||||
|
||||
msgid ""
|
||||
"There is currently no notebook. Create one by clicking on \"New notebook\"."
|
||||
msgstr "No hay ninguna libreta. Cree una pulsando en «Libreta nueva»."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Unsupported link or message: %s"
|
||||
msgstr "Enlace o mensaje sin soporte: %s"
|
||||
msgstr "Enlace o mensaje no soportado: %s"
|
||||
|
||||
msgid "Attach file"
|
||||
msgstr "Adjuntar archivo"
|
||||
|
||||
msgid "Set alarm"
|
||||
msgstr "Ajustar alarma"
|
||||
msgstr "Fijar alarma"
|
||||
|
||||
msgid "Refresh"
|
||||
msgstr "Refrescar"
|
||||
@@ -664,14 +783,17 @@ msgstr "Inicio de sesión de OneDrive"
|
||||
msgid "Import"
|
||||
msgstr "Importar"
|
||||
|
||||
msgid "Delete notebook?"
|
||||
msgstr "Eliminar libreta?"
|
||||
msgid "Synchronisation Status"
|
||||
msgstr "Estado de la sincronización"
|
||||
|
||||
msgid "Encryption Options"
|
||||
msgstr ""
|
||||
|
||||
msgid "Remove this tag from all the notes?"
|
||||
msgstr "Remover esta etiqueta de todas las notas?"
|
||||
msgstr "¿Desea eliminar esta etiqueta de todas las notas?"
|
||||
|
||||
msgid "Remove this search from the sidebar?"
|
||||
msgstr "Remover esta busqueda de la barra lateral?"
|
||||
msgstr "¿Desea eliminar esta búsqueda de la barra lateral?"
|
||||
|
||||
msgid "Rename"
|
||||
msgstr "Renombrar"
|
||||
@@ -686,7 +808,10 @@ msgid "Tags"
|
||||
msgstr "Etiquetas"
|
||||
|
||||
msgid "Searches"
|
||||
msgstr "Busquedas"
|
||||
msgstr "Búsquedas"
|
||||
|
||||
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"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Usage: %s"
|
||||
@@ -702,9 +827,8 @@ msgstr "Sistema de archivos"
|
||||
msgid "OneDrive"
|
||||
msgstr "OneDrive"
|
||||
|
||||
#, fuzzy
|
||||
msgid "OneDrive Dev (For testing only)"
|
||||
msgstr "OneDrive Dev(Solo para pruebas)"
|
||||
msgstr "OneDrive Dev (Solo para pruebas)"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Unknown log level: %s"
|
||||
@@ -712,17 +836,15 @@ msgstr "Nivel de log desconocido: %s"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Unknown level ID: %s"
|
||||
msgstr "Nivel de ID desconocido: %s"
|
||||
msgstr "ID de nivel desconocido: %s"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Cannot refresh token: authentication data is missing. Starting the "
|
||||
"synchronisation again may fix the problem."
|
||||
msgstr ""
|
||||
"No se ha podido actualizar token: los datos de autenticacion estan perdidos. "
|
||||
"Iniciar la sincronización nuevamente puede solucionar el problema."
|
||||
"No se ha podido actualizar token: faltan datos de autenticación. Reiniciar "
|
||||
"la sincronización podría solucionar el problema."
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Could not synchronize with OneDrive.\n"
|
||||
"\n"
|
||||
@@ -733,45 +855,45 @@ msgid ""
|
||||
msgstr ""
|
||||
"No se ha podido sincronizar con OneDrive.\n"
|
||||
"\n"
|
||||
"Este error muchas veces es causado cuando se esta utilizando OneDrive for "
|
||||
"Business, el cual desafortunadamente no se encuentra soportado.\n"
|
||||
"Este error suele ocurrir al utilizar OneDrive for Business. Este producto no "
|
||||
"está soportado.\n"
|
||||
"\n"
|
||||
"Por favor considere utilizar una cuenta regular de OneDrive."
|
||||
"Podría considerar utilizar una cuenta Personal de OneDrive."
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
#, javascript-format
|
||||
msgid "Cannot access %s"
|
||||
msgstr "No se ha podido acceder a %s"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Created local items: %d."
|
||||
msgstr "Artículos locales creados: %d."
|
||||
msgstr "Elementos locales creados: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Updated local items: %d."
|
||||
msgstr "Artículos locales actualizados: %d."
|
||||
msgstr "Elementos locales actualizados: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Created remote items: %d."
|
||||
msgstr "Artículos remotos creados: %d."
|
||||
msgstr "Elementos remotos creados: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Updated remote items: %d."
|
||||
msgstr "Artículos remotos actualizados: %d."
|
||||
msgstr "Elementos remotos actualizados: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Deleted local items: %d."
|
||||
msgstr "Artículos locales borrados: %d."
|
||||
msgstr "Elementos locales borrados: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Deleted remote items: %d."
|
||||
msgstr "Artículos remotos borrados: %d."
|
||||
msgstr "Elementos remotos borrados: %d."
|
||||
|
||||
#, javascript-format
|
||||
msgid "State: \"%s\"."
|
||||
msgstr "Estado: \"%s\"."
|
||||
msgstr "Estado: «%s»."
|
||||
|
||||
msgid "Cancelling..."
|
||||
msgstr "Cancelando...."
|
||||
msgstr "Cancelando..."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Completed: %s"
|
||||
@@ -779,58 +901,46 @@ msgstr "Completado: %s"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Synchronisation is already in progress. State: %s"
|
||||
msgstr "La sincronizacion ya esta en progreso. Estod: %s"
|
||||
msgstr "La sincronización ya está en progreso. Estado: %s"
|
||||
|
||||
msgid "Conflicts"
|
||||
msgstr "Conflictos"
|
||||
|
||||
#, javascript-format
|
||||
msgid "A notebook with this title already exists: \"%s\""
|
||||
msgstr "Ya existe una libreta con este nombre: \"%s\""
|
||||
msgstr "Ya existe una libreta con este nombre: «%s»"
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
#, javascript-format
|
||||
msgid "Notebooks cannot be named \"%s\", which is a reserved title."
|
||||
msgstr ""
|
||||
"Las libretas no pueden ser nombradas \"%s\", el cual es un título reservado"
|
||||
"No se puede usar el nombre «%s» para una libreta; es un título reservado."
|
||||
|
||||
msgid "Untitled"
|
||||
msgstr "Intitulado"
|
||||
msgstr "Sin título"
|
||||
|
||||
msgid "This note does not have geolocation information."
|
||||
msgstr "Esta nota no tiene informacion de geolocalización."
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
#, javascript-format
|
||||
msgid "Cannot copy note to \"%s\" notebook"
|
||||
msgstr "No se ha podido copiar la nota a la libreta \"%s\""
|
||||
msgstr "No se ha podido copiar la nota a la libreta «%s»"
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
#, javascript-format
|
||||
msgid "Cannot move note to \"%s\" notebook"
|
||||
msgstr "No se ha podido mover la nota a la libreta \"%s\""
|
||||
|
||||
#, fuzzy
|
||||
msgid "File system synchronisation target directory"
|
||||
msgstr "Sincronización de sistema de archivos en directorio objetivo"
|
||||
|
||||
msgid ""
|
||||
"The path to synchronise with when file system synchronisation is enabled. "
|
||||
"See `sync.target`."
|
||||
msgstr ""
|
||||
"La ubicacion para sincronizar cuando el sistema de archivo tenga habilitada "
|
||||
"la sincronización. Ver `sync.target`."
|
||||
msgstr "No se ha podido mover la nota a la libreta «%s»"
|
||||
|
||||
msgid "Text editor"
|
||||
msgstr "Editor de texto"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"The editor that will be used to open a note. If none is provided it will try "
|
||||
"to auto-detect the default editor."
|
||||
msgstr ""
|
||||
"El editor sera cápaz de abrir una nota. Si ninguna es prevista, intentara "
|
||||
"auto-detectar el editor por defecto."
|
||||
"El editor que se usará para abrir una nota. Se intentará auto-detectar el "
|
||||
"editor predeterminado si no se proporciona ninguno."
|
||||
|
||||
msgid "Language"
|
||||
msgstr "Lenguaje"
|
||||
msgstr "Idioma"
|
||||
|
||||
msgid "Date format"
|
||||
msgstr "Formato de fecha"
|
||||
@@ -847,19 +957,15 @@ msgstr "Claro"
|
||||
msgid "Dark"
|
||||
msgstr "Oscuro"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Show uncompleted todos on top of the lists"
|
||||
msgstr "Mostrar lista de tareas incompletas al inio de las listas"
|
||||
msgstr "Mostrar tareas incompletas al inicio de las listas"
|
||||
|
||||
msgid "Save geo-location with notes"
|
||||
msgstr "Guardar notas con geo-licalización"
|
||||
msgstr "Guardar geolocalización en las notas"
|
||||
|
||||
msgid "Synchronisation interval"
|
||||
msgstr "Intervalo de sincronización"
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr "Deshabilitado"
|
||||
|
||||
#, javascript-format
|
||||
msgid "%d minutes"
|
||||
msgstr "%d minutos"
|
||||
@@ -873,29 +979,44 @@ msgid "%d hours"
|
||||
msgstr "%d horas"
|
||||
|
||||
msgid "Automatically update the application"
|
||||
msgstr "Actualizacion automatica de la aplicación"
|
||||
msgstr "Actualizar la aplicación automáticamente"
|
||||
|
||||
msgid "Show advanced options"
|
||||
msgstr "Mostrar opciones "
|
||||
msgstr "Mostrar opciones avanzadas"
|
||||
|
||||
msgid "Synchronisation target"
|
||||
msgstr "Sincronización de objetivo"
|
||||
msgstr "Destino de sincronización"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"The target to synchonise to. If synchronising with the file system, set "
|
||||
"`sync.2.path` to specify the target directory."
|
||||
msgstr ""
|
||||
"El objetivo para sincronizarse a. Si sincronizando con el sistema de "
|
||||
"archivos, establecer `sync.2.path` especifique el directorio destino."
|
||||
"El destino de la sincronización. Si se sincroniza con el sistema de "
|
||||
"archivos, indique el directorio destino en «sync.2.path»."
|
||||
|
||||
msgid "Directory to synchronise with (absolute path)"
|
||||
msgstr "Directorio con el que sincronizarse (ruta completa)"
|
||||
|
||||
msgid ""
|
||||
"The path to synchronise with when file system synchronisation is enabled. "
|
||||
"See `sync.target`."
|
||||
msgstr ""
|
||||
"La ruta a la que sincronizar cuando se activa la sincronización con sistema "
|
||||
"de archivos. Vea «sync.target»."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Invalid option value: \"%s\". Possible values are: %s."
|
||||
msgstr "Valor inválido de opción: \"%s\". Los válores inválidos son: %s."
|
||||
msgstr "Opción inválida: «%s». Los valores posibles son: %s."
|
||||
|
||||
msgid "Items that cannot be synchronised"
|
||||
msgstr "Elementos que no se pueden sincronizar"
|
||||
|
||||
#, javascript-format
|
||||
msgid "\"%s\": \"%s\""
|
||||
msgstr "«%s»: «%s»"
|
||||
|
||||
msgid "Sync status (synced items / total items)"
|
||||
msgstr ""
|
||||
"Estatus de sincronización (artículos sincronizados / total de artículos)"
|
||||
msgstr "Estado de sincronización (elementos sincronizados/elementos totales)"
|
||||
|
||||
#, javascript-format
|
||||
msgid "%s: %d/%d"
|
||||
@@ -907,7 +1028,7 @@ msgstr "Total: %d/%d"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Conflicted: %d"
|
||||
msgstr "Conflictivo: %d"
|
||||
msgstr "Conflictos: %d"
|
||||
|
||||
#, javascript-format
|
||||
msgid "To delete: %d"
|
||||
@@ -920,54 +1041,47 @@ msgstr "Directorios"
|
||||
msgid "%s: %d notes"
|
||||
msgstr "%s: %d notas"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Coming alarms"
|
||||
msgstr "Próximas alarmas"
|
||||
msgstr "Alarmas inminentes"
|
||||
|
||||
#, javascript-format
|
||||
msgid "On %s: %s"
|
||||
msgstr "En %s: %s"
|
||||
|
||||
#, fuzzy
|
||||
msgid "There are currently no notes. Create one by clicking on the (+) button."
|
||||
msgstr ""
|
||||
"Actualmente no hay notas. Crea una nueva nota dando client en el boton (+)."
|
||||
msgstr "No hay notas. Cree una pulsando en el botón (+)."
|
||||
|
||||
msgid "Delete these notes?"
|
||||
msgstr "Borrar estas notas?"
|
||||
msgstr "¿Desea borrar estas notas?"
|
||||
|
||||
msgid "Log"
|
||||
msgstr "Log"
|
||||
|
||||
msgid "Status"
|
||||
msgstr "Estatus"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Export Debug Report"
|
||||
msgstr "Exportar reporte depuracion"
|
||||
msgstr "Exportar informe de depuración"
|
||||
|
||||
msgid "Configuration"
|
||||
msgstr "Configuracion"
|
||||
msgstr "Configuración"
|
||||
|
||||
msgid "Move to notebook..."
|
||||
msgstr "Mover a libreta...."
|
||||
msgstr "Mover a la libreta..."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Move %d notes to notebook \"%s\"?"
|
||||
msgstr "Mover %d notas a libreta \"%s\"?"
|
||||
msgstr "¿Desea mover %d notas a libreta «%s»?"
|
||||
|
||||
msgid "Select date"
|
||||
msgstr "Seleccionar fecha"
|
||||
msgstr "Seleccione fecha"
|
||||
|
||||
msgid "Confirm"
|
||||
msgstr "Confirmar"
|
||||
|
||||
msgid "Cancel synchronisation"
|
||||
msgstr "Sincronizacion cancelada"
|
||||
msgstr "Cancelar sincronización"
|
||||
|
||||
#, javascript-format
|
||||
msgid "The notebook could not be saved: %s"
|
||||
msgstr "Esta libreta no pudo ser guardada: %s"
|
||||
msgstr "No se ha podido guardar esta libreta: %s"
|
||||
|
||||
msgid "Edit notebook"
|
||||
msgstr "Editar libreta"
|
||||
@@ -998,33 +1112,40 @@ msgid "Convert to todo"
|
||||
msgstr "Convertir a lista de tareas"
|
||||
|
||||
msgid "Hide metadata"
|
||||
msgstr "Ocultar metadata"
|
||||
msgstr "Ocultar metadatos"
|
||||
|
||||
msgid "Show metadata"
|
||||
msgstr "Mostrar metadata"
|
||||
msgstr "Mostrar metadatos"
|
||||
|
||||
msgid "View on map"
|
||||
msgstr "Ver un mapa"
|
||||
msgstr "Ver en un mapa"
|
||||
|
||||
msgid "Delete notebook"
|
||||
msgstr "Borrar libreta"
|
||||
|
||||
msgid "Login with OneDrive"
|
||||
msgstr "Loguear con OneDrive"
|
||||
msgstr "Acceder con OneDrive"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Click on the (+) button to create a new note or notebook. Click on the side "
|
||||
"menu to access your existing notebooks."
|
||||
msgstr ""
|
||||
"Click en el boton (+) para crear una nueva nota o libreta. Click en el lado "
|
||||
"del menu para acceder a tus libretas existentes."
|
||||
"Pulse en el botón (+) para crear una nueva nota o libreta. Pulse en el menú "
|
||||
"lateral para acceder a las libretas existentes."
|
||||
|
||||
#, fuzzy
|
||||
msgid "You currently have no notebook. Create one by clicking on (+) button."
|
||||
msgstr ""
|
||||
"Tu actualmente no tienes una libreta. Crea una nueva libreta dando click en "
|
||||
"el boton (+)."
|
||||
"No hay ninguna libreta. Cree una nueva libreta pulsando en el botón (+)."
|
||||
|
||||
msgid "Welcome"
|
||||
msgstr "Bienvenido"
|
||||
|
||||
#~ msgid "Delete notebook?"
|
||||
#~ msgstr "Eliminar libreta?"
|
||||
|
||||
#~ msgid "Delete notebook \"%s\"?"
|
||||
#~ msgstr "Elimina una libreta \"%s\"?"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "File system synchronisation target directory"
|
||||
#~ msgstr "Sincronización de sistema de archivos en directorio objetivo"
|
@@ -221,7 +221,10 @@ msgstr "Affiche les informations d'utilisation."
|
||||
msgid "Shortcuts are not available in CLI mode."
|
||||
msgstr "Les raccourcis ne sont pas disponible en mode de ligne de commande."
|
||||
|
||||
msgid "Type `help [command]` for more information about a command."
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Type `help [command]` for more information about a command; or type `help "
|
||||
"all` for the complete usage information."
|
||||
msgstr "Tapez `help [command]` pour plus d'information sur une commande."
|
||||
|
||||
msgid "The possible commands are:"
|
||||
@@ -374,9 +377,8 @@ msgstr "Supprimer le carnet."
|
||||
msgid "Deletes the notebook without asking for confirmation."
|
||||
msgstr "Supprimer le carnet sans demander la confirmation."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Delete notebook \"%s\"?"
|
||||
msgstr "Supprimer le carnet \"%s\" ?"
|
||||
msgid "Delete notebook? All notes within this notebook will also be deleted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Deletes the notes matching <note-pattern>."
|
||||
msgstr "Supprimer les notes correspondants à <note-pattern>."
|
||||
@@ -394,7 +396,12 @@ msgstr "Supprimer la note ?"
|
||||
msgid "Searches for the given <pattern> in all the notes."
|
||||
msgstr "Chercher le motif <pattern> dans toutes les notes."
|
||||
|
||||
msgid "Sets the property <name> of the given <note> to the given [value]."
|
||||
#, fuzzy, javascript-format
|
||||
msgid ""
|
||||
"Sets the property <name> of the given <note> to the given [value]. Possible "
|
||||
"properties are:\n"
|
||||
"\n"
|
||||
"%s"
|
||||
msgstr "Assigner la valeur [value] à la propriété <name> de la <note> donnée."
|
||||
|
||||
msgid "Displays summary about the notes and notebooks."
|
||||
@@ -523,6 +530,15 @@ msgstr ""
|
||||
msgid "Search:"
|
||||
msgstr "Recherche :"
|
||||
|
||||
msgid ""
|
||||
"Welcome to Joplin!\n"
|
||||
"\n"
|
||||
"Type `:help shortcuts` for the list of keyboard shortcuts, or just `:help` "
|
||||
"for usage information.\n"
|
||||
"\n"
|
||||
"For example, to create a notebook press `mb`; to create a note press `mn`."
|
||||
msgstr ""
|
||||
|
||||
msgid "File"
|
||||
msgstr "Fichier"
|
||||
|
||||
@@ -588,6 +604,77 @@ msgstr "OK"
|
||||
msgid "Cancel"
|
||||
msgstr "Annulation"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Notes and settings are stored in: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Disabling encryption means *all* your notes and attachments are going to be "
|
||||
"re-synchronised and sent unencrypted to the sync target. Do you wish to "
|
||||
"continue?"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Enabling encryption means *all* your notes and attachments are going to be "
|
||||
"re-synchronised and sent encrypted to the sync target. Do not lose the "
|
||||
"password as, for security purposes, this will be the *only* way to decrypt "
|
||||
"the data! To enable encryption, please enter your password below."
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable encryption"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable encryption"
|
||||
msgstr ""
|
||||
|
||||
msgid "Master Keys"
|
||||
msgstr ""
|
||||
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
msgid "Source"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Created"
|
||||
msgstr "Créés : %d."
|
||||
|
||||
#, fuzzy
|
||||
msgid "Updated"
|
||||
msgstr "Mis à jour : %d."
|
||||
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
msgid "Password OK"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Note: Only one master key is going to be used for encryption (the one marked "
|
||||
"as \"active\"). Any of the keys might be used for decryption, depending on "
|
||||
"how the notes or notebooks were originally encrypted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Status"
|
||||
msgstr "État"
|
||||
|
||||
msgid "Encryption is:"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Enabled"
|
||||
msgstr "Désactivé"
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr "Désactivé"
|
||||
|
||||
msgid "Back"
|
||||
msgstr "Retour"
|
||||
|
||||
@@ -636,6 +723,13 @@ msgstr "Impossible d'initialiser la synchronisation."
|
||||
msgid "View them now"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Some items cannot be decrypted."
|
||||
msgstr "Impossible d'initialiser la synchronisation."
|
||||
|
||||
msgid "Set the password"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add or remove tags"
|
||||
msgstr "Gérer les étiquettes"
|
||||
|
||||
@@ -652,6 +746,13 @@ msgid "No notes in here. Create one by clicking on \"New note\"."
|
||||
msgstr ""
|
||||
"Pas de notes ici. Créez-en une en pressant le bouton \"Nouvelle note\"."
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"There is currently no notebook. Create one by clicking on \"New notebook\"."
|
||||
msgstr ""
|
||||
"Il n'y a pour l'instant aucun carnet. Créez-en un en cliquant sur le bouton "
|
||||
"(+)"
|
||||
|
||||
#, javascript-format
|
||||
msgid "Unsupported link or message: %s"
|
||||
msgstr "Lien ou message non géré : %s"
|
||||
@@ -679,8 +780,8 @@ msgstr "Importer"
|
||||
msgid "Synchronisation Status"
|
||||
msgstr "Cible de la synchronisation"
|
||||
|
||||
msgid "Delete notebook?"
|
||||
msgstr "Supprimer le carnet ?"
|
||||
msgid "Encryption Options"
|
||||
msgstr ""
|
||||
|
||||
msgid "Remove this tag from all the notes?"
|
||||
msgstr "Enlever cette étiquette de toutes les notes ?"
|
||||
@@ -703,6 +804,10 @@ msgstr "Étiquettes"
|
||||
msgid "Searches"
|
||||
msgstr "Recherches"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Please select where the sync status should be exported to"
|
||||
msgstr "Veuillez d'abord sélectionner un carnet."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Usage: %s"
|
||||
msgstr "Utilisation : %s"
|
||||
@@ -812,16 +917,6 @@ msgstr "Impossible de copier la note vers le carnet \"%s\""
|
||||
msgid "Cannot move note to \"%s\" notebook"
|
||||
msgstr "Impossible de déplacer la note vers le carnet \"%s\""
|
||||
|
||||
msgid "File system synchronisation target directory"
|
||||
msgstr "Cible de la synchronisation sur le disque dur"
|
||||
|
||||
msgid ""
|
||||
"The path to synchronise with when file system synchronisation is enabled. "
|
||||
"See `sync.target`."
|
||||
msgstr ""
|
||||
"Le chemin du répertoire avec lequel synchroniser lorsque la synchronisation "
|
||||
"par système de fichier est activée. Voir `sync.target`."
|
||||
|
||||
msgid "Text editor"
|
||||
msgstr "Éditeur de texte"
|
||||
|
||||
@@ -859,9 +954,6 @@ msgstr "Enregistrer l'emplacement avec les notes"
|
||||
msgid "Synchronisation interval"
|
||||
msgstr "Intervalle de synchronisation"
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr "Désactivé"
|
||||
|
||||
#, javascript-format
|
||||
msgid "%d minutes"
|
||||
msgstr "%d minutes"
|
||||
@@ -890,6 +982,16 @@ msgstr ""
|
||||
"La cible avec laquelle synchroniser. Pour synchroniser avec le système de "
|
||||
"fichier, veuillez spécifier le répertoire avec `sync.2.path`."
|
||||
|
||||
msgid "Directory to synchronise with (absolute path)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"The path to synchronise with when file system synchronisation is enabled. "
|
||||
"See `sync.target`."
|
||||
msgstr ""
|
||||
"Le chemin du répertoire avec lequel synchroniser lorsque la synchronisation "
|
||||
"par système de fichier est activée. Voir `sync.target`."
|
||||
|
||||
#, javascript-format
|
||||
msgid "Invalid option value: \"%s\". Possible values are: %s."
|
||||
msgstr "Option invalide: \"%s\". Les valeurs possibles sont : %s."
|
||||
@@ -945,9 +1047,6 @@ msgstr "Supprimer ces notes ?"
|
||||
msgid "Log"
|
||||
msgstr "Journal"
|
||||
|
||||
msgid "Status"
|
||||
msgstr "État"
|
||||
|
||||
msgid "Export Debug Report"
|
||||
msgstr "Exporter rapport de débogage"
|
||||
|
||||
@@ -1032,6 +1131,15 @@ msgstr ""
|
||||
msgid "Welcome"
|
||||
msgstr "Bienvenue"
|
||||
|
||||
#~ msgid "Delete notebook?"
|
||||
#~ msgstr "Supprimer le carnet ?"
|
||||
|
||||
#~ msgid "Delete notebook \"%s\"?"
|
||||
#~ msgstr "Supprimer le carnet \"%s\" ?"
|
||||
|
||||
#~ msgid "File system synchronisation target directory"
|
||||
#~ msgstr "Cible de la synchronisation sur le disque dur"
|
||||
|
||||
#~ msgid "Set or clear alarm:"
|
||||
#~ msgstr "Définir ou modifier alarme :"
|
||||
|
||||
@@ -1205,12 +1313,6 @@ msgstr "Bienvenue"
|
||||
#~ "Tous les ports sont en cours d'utilisation. Veuillez signaler ce problème "
|
||||
#~ "sur %s"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "There is currently no notebook. Create one by clicking on the (+) button."
|
||||
#~ msgstr ""
|
||||
#~ "Il n'y a pour l'instant aucun carnet. Créez-en un en cliquant sur le "
|
||||
#~ "bouton (+)"
|
||||
|
||||
#~ msgid "Synchronizing with directory \"%s\""
|
||||
#~ msgstr "Synchronisation avec dossier \"%s\""
|
||||
|
||||
|
1147
CliClient/locales/hr_HR.po
Normal file
1147
CliClient/locales/hr_HR.po
Normal file
File diff suppressed because it is too large
Load Diff
1141
CliClient/locales/it_IT.po
Normal file
1141
CliClient/locales/it_IT.po
Normal file
File diff suppressed because it is too large
Load Diff
1134
CliClient/locales/ja_JP.po
Normal file
1134
CliClient/locales/ja_JP.po
Normal file
File diff suppressed because it is too large
Load Diff
@@ -208,7 +208,9 @@ msgstr ""
|
||||
msgid "Shortcuts are not available in CLI mode."
|
||||
msgstr ""
|
||||
|
||||
msgid "Type `help [command]` for more information about a command."
|
||||
msgid ""
|
||||
"Type `help [command]` for more information about a command; or type `help "
|
||||
"all` for the complete usage information."
|
||||
msgstr ""
|
||||
|
||||
msgid "The possible commands are:"
|
||||
@@ -343,8 +345,7 @@ msgstr ""
|
||||
msgid "Deletes the notebook without asking for confirmation."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Delete notebook \"%s\"?"
|
||||
msgid "Delete notebook? All notes within this notebook will also be deleted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Deletes the notes matching <note-pattern>."
|
||||
@@ -363,7 +364,12 @@ msgstr ""
|
||||
msgid "Searches for the given <pattern> in all the notes."
|
||||
msgstr ""
|
||||
|
||||
msgid "Sets the property <name> of the given <note> to the given [value]."
|
||||
#, javascript-format
|
||||
msgid ""
|
||||
"Sets the property <name> of the given <note> to the given [value]. Possible "
|
||||
"properties are:\n"
|
||||
"\n"
|
||||
"%s"
|
||||
msgstr ""
|
||||
|
||||
msgid "Displays summary about the notes and notebooks."
|
||||
@@ -473,6 +479,15 @@ msgstr ""
|
||||
msgid "Search:"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Welcome to Joplin!\n"
|
||||
"\n"
|
||||
"Type `:help shortcuts` for the list of keyboard shortcuts, or just `:help` "
|
||||
"for usage information.\n"
|
||||
"\n"
|
||||
"For example, to create a notebook press `mb`; to create a note press `mn`."
|
||||
msgstr ""
|
||||
|
||||
msgid "File"
|
||||
msgstr ""
|
||||
|
||||
@@ -537,6 +552,74 @@ msgstr ""
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Notes and settings are stored in: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Disabling encryption means *all* your notes and attachments are going to be "
|
||||
"re-synchronised and sent unencrypted to the sync target. Do you wish to "
|
||||
"continue?"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Enabling encryption means *all* your notes and attachments are going to be "
|
||||
"re-synchronised and sent encrypted to the sync target. Do not lose the "
|
||||
"password as, for security purposes, this will be the *only* way to decrypt "
|
||||
"the data! To enable encryption, please enter your password below."
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable encryption"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable encryption"
|
||||
msgstr ""
|
||||
|
||||
msgid "Master Keys"
|
||||
msgstr ""
|
||||
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
msgid "Source"
|
||||
msgstr ""
|
||||
|
||||
msgid "Created"
|
||||
msgstr ""
|
||||
|
||||
msgid "Updated"
|
||||
msgstr ""
|
||||
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
msgid "Password OK"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Note: Only one master key is going to be used for encryption (the one marked "
|
||||
"as \"active\"). Any of the keys might be used for decryption, depending on "
|
||||
"how the notes or notebooks were originally encrypted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
msgid "Encryption is:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "Back"
|
||||
msgstr ""
|
||||
|
||||
@@ -581,6 +664,12 @@ msgstr ""
|
||||
msgid "View them now"
|
||||
msgstr ""
|
||||
|
||||
msgid "Some items cannot be decrypted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Set the password"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add or remove tags"
|
||||
msgstr ""
|
||||
|
||||
@@ -596,6 +685,10 @@ msgstr ""
|
||||
msgid "No notes in here. Create one by clicking on \"New note\"."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"There is currently no notebook. Create one by clicking on \"New notebook\"."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Unsupported link or message: %s"
|
||||
msgstr ""
|
||||
@@ -621,7 +714,7 @@ msgstr ""
|
||||
msgid "Synchronisation Status"
|
||||
msgstr ""
|
||||
|
||||
msgid "Delete notebook?"
|
||||
msgid "Encryption Options"
|
||||
msgstr ""
|
||||
|
||||
msgid "Remove this tag from all the notes?"
|
||||
@@ -645,6 +738,9 @@ msgstr ""
|
||||
msgid "Searches"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please select where the sync status should be exported to"
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Usage: %s"
|
||||
msgstr ""
|
||||
@@ -752,14 +848,6 @@ msgstr ""
|
||||
msgid "Cannot move note to \"%s\" notebook"
|
||||
msgstr ""
|
||||
|
||||
msgid "File system synchronisation target directory"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"The path to synchronise with when file system synchronisation is enabled. "
|
||||
"See `sync.target`."
|
||||
msgstr ""
|
||||
|
||||
msgid "Text editor"
|
||||
msgstr ""
|
||||
|
||||
@@ -795,9 +883,6 @@ msgstr ""
|
||||
msgid "Synchronisation interval"
|
||||
msgstr ""
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "%d minutes"
|
||||
msgstr ""
|
||||
@@ -824,6 +909,14 @@ msgid ""
|
||||
"`sync.2.path` to specify the target directory."
|
||||
msgstr ""
|
||||
|
||||
msgid "Directory to synchronise with (absolute path)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"The path to synchronise with when file system synchronisation is enabled. "
|
||||
"See `sync.target`."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Invalid option value: \"%s\". Possible values are: %s."
|
||||
msgstr ""
|
||||
@@ -877,9 +970,6 @@ msgstr ""
|
||||
msgid "Log"
|
||||
msgstr ""
|
||||
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
msgid "Export Debug Report"
|
||||
msgstr ""
|
||||
|
||||
|
1137
CliClient/locales/pt_BR.po
Normal file
1137
CliClient/locales/pt_BR.po
Normal file
File diff suppressed because it is too large
Load Diff
1134
CliClient/locales/ru_RU.po
Normal file
1134
CliClient/locales/ru_RU.po
Normal file
File diff suppressed because it is too large
Load Diff
1093
CliClient/locales/zh_CN.po
Normal file
1093
CliClient/locales/zh_CN.po
Normal file
File diff suppressed because it is too large
Load Diff
16
CliClient/package-lock.json
generated
16
CliClient/package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "joplin",
|
||||
"version": "0.10.82",
|
||||
"version": "0.10.85",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -411,12 +411,12 @@
|
||||
}
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz",
|
||||
"integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=",
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz",
|
||||
"integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==",
|
||||
"requires": {
|
||||
"graceful-fs": "4.1.11",
|
||||
"jsonfile": "3.0.1",
|
||||
"jsonfile": "4.0.0",
|
||||
"universalify": "0.1.1"
|
||||
}
|
||||
},
|
||||
@@ -728,9 +728,9 @@
|
||||
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz",
|
||||
"integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=",
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||
"requires": {
|
||||
"graceful-fs": "4.1.11"
|
||||
}
|
||||
|
@@ -14,11 +14,12 @@
|
||||
"title": "Joplin CLI",
|
||||
"years": [
|
||||
2016,
|
||||
2017
|
||||
2017,
|
||||
2018
|
||||
],
|
||||
"owner": "Laurent Cozic"
|
||||
},
|
||||
"version": "0.10.82",
|
||||
"version": "0.10.85",
|
||||
"bin": {
|
||||
"joplin": "./main.js"
|
||||
},
|
||||
@@ -29,7 +30,7 @@
|
||||
"app-module-path": "^2.2.0",
|
||||
"follow-redirects": "^1.2.4",
|
||||
"form-data": "^2.1.4",
|
||||
"fs-extra": "^3.0.1",
|
||||
"fs-extra": "^5.0.0",
|
||||
"html-entities": "^1.2.1",
|
||||
"jssha": "^2.3.0",
|
||||
"levenshtein": "^1.0.5",
|
||||
|
@@ -4,4 +4,4 @@ CLIENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
bash "$CLIENT_DIR/build.sh" && node "$CLIENT_DIR/build/main.js" --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev "$@"
|
||||
|
||||
#bash $CLIENT_DIR/build.sh && NODE_PATH="$CLIENT_DIR/build/" node build/main.js --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev "$@"
|
||||
# bash $CLIENT_DIR/build.sh && NODE_PATH="$CLIENT_DIR/build/" node build/main.js --profile ~/.config/joplin --stack-trace-enabled --log-level debug "$@"
|
@@ -1,10 +1,17 @@
|
||||
#!/bin/bash
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
BUILD_DIR="$ROOT_DIR/tests-build"
|
||||
TEST_FILE="$1"
|
||||
|
||||
rsync -a --exclude "node_modules/" "$ROOT_DIR/tests/" "$BUILD_DIR/"
|
||||
rsync -a "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
|
||||
rsync -a "$ROOT_DIR/build/locales/" "$BUILD_DIR/locales/"
|
||||
mkdir -p "$BUILD_DIR/data"
|
||||
|
||||
(cd "$ROOT_DIR" && npm test tests-build/synchronizer.js)
|
||||
if [[ $TEST_FILE == "" ]]; then
|
||||
(cd "$ROOT_DIR" && npm test tests-build/synchronizer.js)
|
||||
(cd "$ROOT_DIR" && npm test tests-build/encryption.js)
|
||||
(cd "$ROOT_DIR" && npm test tests-build/ArrayUtils.js)
|
||||
else
|
||||
(cd "$ROOT_DIR" && npm test tests-build/$TEST_FILE.js)
|
||||
fi
|
32
CliClient/tests/ArrayUtils.js
Normal file
32
CliClient/tests/ArrayUtils.js
Normal file
@@ -0,0 +1,32 @@
|
||||
require('app-module-path').addPath(__dirname);
|
||||
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js');
|
||||
const ArrayUtils = require('lib/ArrayUtils.js');
|
||||
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
|
||||
});
|
||||
|
||||
describe('Encryption', function() {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
done();
|
||||
});
|
||||
|
||||
it('should remove array elements', async (done) => {
|
||||
let a = ['un', 'deux', 'trois'];
|
||||
a = ArrayUtils.removeElement(a, 'deux');
|
||||
|
||||
expect(a[0]).toBe('un');
|
||||
expect(a[1]).toBe('trois');
|
||||
expect(a.length).toBe(2);
|
||||
|
||||
a = ['un', 'deux', 'trois'];
|
||||
a = ArrayUtils.removeElement(a, 'not in there');
|
||||
expect(a.length).toBe(3);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
180
CliClient/tests/encryption.js
Normal file
180
CliClient/tests/encryption.js
Normal file
@@ -0,0 +1,180 @@
|
||||
require('app-module-path').addPath(__dirname);
|
||||
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const { Database } = require('lib/database.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const MasterKey = require('lib/models/MasterKey');
|
||||
const SyncTargetRegistry = require('lib/SyncTargetRegistry.js');
|
||||
const EncryptionService = require('lib/services/EncryptionService.js');
|
||||
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
|
||||
});
|
||||
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; // The first test is slow because the database needs to be built
|
||||
|
||||
let service = null;
|
||||
|
||||
describe('Encryption', function() {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await setupDatabaseAndSynchronizer(1);
|
||||
//await setupDatabaseAndSynchronizer(2);
|
||||
//await switchClient(1);
|
||||
service = new EncryptionService();
|
||||
BaseItem.encryptionService_ = service;
|
||||
Setting.setValue('encryption.enabled', true);
|
||||
done();
|
||||
});
|
||||
|
||||
it('should encode and decode header', async (done) => {
|
||||
const header = {
|
||||
encryptionMethod: EncryptionService.METHOD_SJCL,
|
||||
masterKeyId: '01234568abcdefgh01234568abcdefgh',
|
||||
};
|
||||
|
||||
const encodedHeader = service.encodeHeader_(header);
|
||||
const decodedHeader = service.decodeHeader_(encodedHeader);
|
||||
delete decodedHeader.length;
|
||||
|
||||
expect(objectsEqual(header, decodedHeader)).toBe(true);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should generate and decrypt a master key', async (done) => {
|
||||
const masterKey = await service.generateMasterKey('123456');
|
||||
expect(!!masterKey.checksum).toBe(true);
|
||||
expect(!!masterKey.content).toBe(true);
|
||||
|
||||
let hasThrown = false;
|
||||
try {
|
||||
await service.decryptMasterKey(masterKey, 'wrongpassword');
|
||||
} catch (error) {
|
||||
hasThrown = true;
|
||||
}
|
||||
|
||||
expect(hasThrown).toBe(true);
|
||||
|
||||
const decryptedMasterKey = await service.decryptMasterKey(masterKey, '123456');
|
||||
expect(decryptedMasterKey.length).toBe(512);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should encrypt and decrypt with a master key', async (done) => {
|
||||
let masterKey = await service.generateMasterKey('123456');
|
||||
masterKey = await MasterKey.save(masterKey);
|
||||
|
||||
await service.loadMasterKey(masterKey, '123456', true);
|
||||
|
||||
const cipherText = await service.encryptString('some secret');
|
||||
const plainText = await service.decryptString(cipherText);
|
||||
|
||||
expect(plainText).toBe('some secret');
|
||||
|
||||
// Test that a long string, that is going to be split into multiple chunks, encrypt
|
||||
// and decrypt properly too.
|
||||
let veryLongSecret = '';
|
||||
for (let i = 0; i < service.chunkSize() * 3; i++) veryLongSecret += Math.floor(Math.random() * 9);
|
||||
|
||||
const cipherText2 = await service.encryptString(veryLongSecret);
|
||||
const plainText2 = await service.decryptString(cipherText2);
|
||||
|
||||
expect(plainText2 === veryLongSecret).toBe(true);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should fail to decrypt if master key not present', async (done) => {
|
||||
let masterKey = await service.generateMasterKey('123456');
|
||||
masterKey = await MasterKey.save(masterKey);
|
||||
|
||||
await service.loadMasterKey(masterKey, '123456', true);
|
||||
|
||||
const cipherText = await service.encryptString('some secret');
|
||||
|
||||
await service.unloadMasterKey(masterKey);
|
||||
|
||||
let hasThrown = await checkThrowAsync(async () => await service.decryptString(cipherText));
|
||||
|
||||
expect(hasThrown).toBe(true);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
it('should fail to decrypt if data tampered with', async (done) => {
|
||||
let masterKey = await service.generateMasterKey('123456');
|
||||
masterKey = await MasterKey.save(masterKey);
|
||||
|
||||
await service.loadMasterKey(masterKey, '123456', true);
|
||||
|
||||
let cipherText = await service.encryptString('some secret');
|
||||
cipherText += "ABCDEFGHIJ";
|
||||
|
||||
let hasThrown = await checkThrowAsync(async () => await service.decryptString(cipherText));
|
||||
|
||||
expect(hasThrown).toBe(true);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should encrypt and decrypt notes and folders', async (done) => {
|
||||
let masterKey = await service.generateMasterKey('123456');
|
||||
masterKey = await MasterKey.save(masterKey);
|
||||
await service.loadMasterKey(masterKey, '123456', true);
|
||||
|
||||
let folder = await Folder.save({ title: 'folder' });
|
||||
let note = await Note.save({ title: 'encrypted note', body: 'something', parent_id: folder.id });
|
||||
let serialized = await Note.serializeForSync(note);
|
||||
let deserialized = Note.filter(await Note.unserialize(serialized));
|
||||
|
||||
// Check that required properties are not encrypted
|
||||
expect(deserialized.id).toBe(note.id);
|
||||
expect(deserialized.parent_id).toBe(note.parent_id);
|
||||
expect(deserialized.updated_time).toBe(note.updated_time);
|
||||
|
||||
// Check that at least title and body are encrypted
|
||||
expect(!deserialized.title).toBe(true);
|
||||
expect(!deserialized.body).toBe(true);
|
||||
|
||||
// Check that encrypted data is there
|
||||
expect(!!deserialized.encryption_cipher_text).toBe(true);
|
||||
|
||||
encryptedNote = await Note.save(deserialized);
|
||||
decryptedNote = await Note.decrypt(encryptedNote);
|
||||
|
||||
expect(decryptedNote.title).toBe(note.title);
|
||||
expect(decryptedNote.body).toBe(note.body);
|
||||
expect(decryptedNote.id).toBe(note.id);
|
||||
expect(decryptedNote.parent_id).toBe(note.parent_id);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should encrypt and decrypt files', async (done) => {
|
||||
let masterKey = await service.generateMasterKey('123456');
|
||||
masterKey = await MasterKey.save(masterKey);
|
||||
await service.loadMasterKey(masterKey, '123456', true);
|
||||
|
||||
const sourcePath = __dirname + '/../tests/support/photo.jpg';
|
||||
const encryptedPath = __dirname + '/data/photo.crypted';
|
||||
const decryptedPath = __dirname + '/data/photo.jpg';
|
||||
|
||||
await service.encryptFile(sourcePath, encryptedPath);
|
||||
await service.decryptFile(encryptedPath, decryptedPath);
|
||||
|
||||
expect(fileContentEqual(sourcePath, encryptedPath)).toBe(false);
|
||||
expect(fileContentEqual(sourcePath, decryptedPath)).toBe(true);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
BIN
CliClient/tests/support/photo.jpg
Normal file
BIN
CliClient/tests/support/photo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
@@ -1,14 +1,18 @@
|
||||
require('app-module-path').addPath(__dirname);
|
||||
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const { setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId } = require('test-utils.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const { setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, encryptionService, loadEncryptionMasterKey, fileContentEqual, decryptionWorker, checkThrowAsync, asyncTest } = require('test-utils.js');
|
||||
const { shim } = require('lib/shim.js');
|
||||
const fs = require('fs-extra');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Resource = require('lib/models/Resource.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const { Database } = require('lib/database.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const { BaseItem } = require('lib/models/base-item.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const MasterKey = require('lib/models/MasterKey');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const SyncTargetRegistry = require('lib/SyncTargetRegistry.js');
|
||||
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
@@ -23,6 +27,38 @@ async function allItems() {
|
||||
return folders.concat(notes);
|
||||
}
|
||||
|
||||
async function allSyncTargetItemsEncrypted() {
|
||||
const list = await fileApi().list();
|
||||
const files = list.items;
|
||||
|
||||
//console.info(Setting.value('resourceDir'));
|
||||
|
||||
let totalCount = 0;
|
||||
let encryptedCount = 0;
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const file = files[i];
|
||||
const remoteContentString = await fileApi().get(file.path);
|
||||
const remoteContent = await BaseItem.unserialize(remoteContentString);
|
||||
const ItemClass = BaseItem.itemClass(remoteContent);
|
||||
|
||||
if (!ItemClass.encryptionSupported()) continue;
|
||||
|
||||
totalCount++;
|
||||
|
||||
if (remoteContent.type_ === BaseModel.TYPE_RESOURCE) {
|
||||
const content = await fileApi().get('.resource/' + remoteContent.id);
|
||||
totalCount++;
|
||||
if (content.substr(0, 5) === 'JED01') output = encryptedCount++;
|
||||
}
|
||||
|
||||
if (!!remoteContent.encryption_applied) encryptedCount++;
|
||||
}
|
||||
|
||||
if (!totalCount) throw new Error('No encryptable item on sync target');
|
||||
|
||||
return totalCount === encryptedCount;
|
||||
}
|
||||
|
||||
async function localItemsSameAsRemote(locals, expect) {
|
||||
try {
|
||||
let files = await fileApi().list();
|
||||
@@ -53,16 +89,22 @@ async function localItemsSameAsRemote(locals, expect) {
|
||||
}
|
||||
}
|
||||
|
||||
let insideBeforeEach = false;
|
||||
|
||||
describe('Synchronizer', function() {
|
||||
|
||||
beforeEach( async (done) => {
|
||||
beforeEach(async (done) => {
|
||||
insideBeforeEach = true;
|
||||
|
||||
await setupDatabaseAndSynchronizer(1);
|
||||
await setupDatabaseAndSynchronizer(2);
|
||||
await switchClient(1);
|
||||
done();
|
||||
|
||||
insideBeforeEach = false;
|
||||
});
|
||||
|
||||
it('should create remote items', async (done) => {
|
||||
it('should create remote items', asyncTest(async () => {
|
||||
let folder = await Folder.save({ title: "folder1" });
|
||||
await Note.save({ title: "un", parent_id: folder.id });
|
||||
|
||||
@@ -71,11 +113,9 @@ describe('Synchronizer', function() {
|
||||
await synchronizer().start();
|
||||
|
||||
await localItemsSameAsRemote(all, expect);
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should update remote item', async (done) => {
|
||||
it('should update remote item', asyncTest(async () => {
|
||||
let folder = await Folder.save({ title: "folder1" });
|
||||
let note = await Note.save({ title: "un", parent_id: folder.id });
|
||||
await synchronizer().start();
|
||||
@@ -86,11 +126,9 @@ describe('Synchronizer', function() {
|
||||
await synchronizer().start();
|
||||
|
||||
await localItemsSameAsRemote(all, expect);
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should create local items', async (done) => {
|
||||
it('should create local items', asyncTest(async () => {
|
||||
let folder = await Folder.save({ title: "folder1" });
|
||||
await Note.save({ title: "un", parent_id: folder.id });
|
||||
await synchronizer().start();
|
||||
@@ -102,11 +140,9 @@ describe('Synchronizer', function() {
|
||||
let all = await allItems();
|
||||
|
||||
await localItemsSameAsRemote(all, expect);
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should update local items', async (done) => {
|
||||
it('should update local items', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: "un", parent_id: folder1.id });
|
||||
await synchronizer().start();
|
||||
@@ -131,11 +167,9 @@ describe('Synchronizer', function() {
|
||||
let all = await allItems();
|
||||
|
||||
await localItemsSameAsRemote(all, expect);
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should resolve note conflicts', async (done) => {
|
||||
it('should resolve note conflicts', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: "un", parent_id: folder1.id });
|
||||
await synchronizer().start();
|
||||
@@ -174,11 +208,9 @@ describe('Synchronizer', function() {
|
||||
if (!noteUpdatedFromRemote.hasOwnProperty(n)) continue;
|
||||
expect(noteUpdatedFromRemote[n]).toBe(note2[n], 'Property: ' + n);
|
||||
}
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should resolve folders conflicts', async (done) => {
|
||||
it('should resolve folders conflicts', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: "un", parent_id: folder1.id });
|
||||
await synchronizer().start();
|
||||
@@ -209,11 +241,9 @@ describe('Synchronizer', function() {
|
||||
|
||||
let folder1_final = await Folder.load(folder1.id);
|
||||
expect(folder1_final.title).toBe(folder1_modRemote.title);
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should delete remote notes', async (done) => {
|
||||
it('should delete remote notes', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: "un", parent_id: folder1.id });
|
||||
await synchronizer().start();
|
||||
@@ -236,11 +266,9 @@ describe('Synchronizer', function() {
|
||||
|
||||
let deletedItems = await BaseItem.deletedItems(syncTargetId());
|
||||
expect(deletedItems.length).toBe(0);
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should delete local notes', async (done) => {
|
||||
it('should delete local notes', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: "un", parent_id: folder1.id });
|
||||
await synchronizer().start();
|
||||
@@ -258,11 +286,9 @@ describe('Synchronizer', function() {
|
||||
expect(items.length).toBe(1);
|
||||
let deletedItems = await BaseItem.deletedItems(syncTargetId());
|
||||
expect(deletedItems.length).toBe(0);
|
||||
|
||||
done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should delete remote folder', async (done) => {
|
||||
it('should delete remote folder', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let folder2 = await Folder.save({ title: "folder2" });
|
||||
await synchronizer().start();
|
||||
@@ -279,11 +305,9 @@ describe('Synchronizer', function() {
|
||||
|
||||
let all = await allItems();
|
||||
localItemsSameAsRemote(all, expect);
|
||||
|
||||
done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should delete local folder', async (done) => {
|
||||
it('should delete local folder', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let folder2 = await Folder.save({ title: "folder2" });
|
||||
await synchronizer().start();
|
||||
@@ -304,11 +328,9 @@ describe('Synchronizer', function() {
|
||||
|
||||
let items = await allItems();
|
||||
localItemsSameAsRemote(items, expect);
|
||||
|
||||
done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should resolve conflict if remote folder has been deleted, but note has been added to folder locally', async (done) => {
|
||||
it('should resolve conflict if remote folder has been deleted, but note has been added to folder locally', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
await synchronizer().start();
|
||||
|
||||
@@ -326,11 +348,9 @@ describe('Synchronizer', function() {
|
||||
expect(items.length).toBe(1);
|
||||
expect(items[0].title).toBe('note1');
|
||||
expect(items[0].is_conflict).toBe(1);
|
||||
|
||||
done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should resolve conflict if note has been deleted remotely and locally', async (done) => {
|
||||
it('should resolve conflict if note has been deleted remotely and locally', asyncTest(async () => {
|
||||
let folder = await Folder.save({ title: "folder" });
|
||||
let note = await Note.save({ title: "note", parent_id: folder.title });
|
||||
await synchronizer().start();
|
||||
@@ -351,11 +371,9 @@ describe('Synchronizer', function() {
|
||||
expect(items[0].title).toBe('folder');
|
||||
|
||||
localItemsSameAsRemote(items, expect);
|
||||
|
||||
done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should cross delete all folders', async (done) => {
|
||||
it('should cross delete all folders', asyncTest(async () => {
|
||||
// If client1 and 2 have two folders, client 1 deletes item 1 and client
|
||||
// 2 deletes item 2, they should both end up with no items after sync.
|
||||
|
||||
@@ -391,11 +409,9 @@ describe('Synchronizer', function() {
|
||||
|
||||
expect(items1.length).toBe(0);
|
||||
expect(items1.length).toBe(items2.length);
|
||||
|
||||
done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should handle conflict when remote note is deleted then local note is modified', async (done) => {
|
||||
it('should handle conflict when remote note is deleted then local note is modified', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: "un", parent_id: folder1.id });
|
||||
await synchronizer().start();
|
||||
@@ -425,11 +441,9 @@ describe('Synchronizer', function() {
|
||||
let unconflictedNotes = await Note.unconflictedNotes();
|
||||
|
||||
expect(unconflictedNotes.length).toBe(0);
|
||||
|
||||
done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should handle conflict when remote folder is deleted then local folder is renamed', async (done) => {
|
||||
it('should handle conflict when remote folder is deleted then local folder is renamed', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let folder2 = await Folder.save({ title: "folder2" });
|
||||
let note1 = await Note.save({ title: "un", parent_id: folder1.id });
|
||||
@@ -457,11 +471,9 @@ describe('Synchronizer', function() {
|
||||
let items = await allItems();
|
||||
|
||||
expect(items.length).toBe(1);
|
||||
|
||||
done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should allow duplicate folder titles', async (done) => {
|
||||
it('should allow duplicate folder titles', asyncTest(async () => {
|
||||
let localF1 = await Folder.save({ title: "folder" });
|
||||
|
||||
await switchClient(2);
|
||||
@@ -493,11 +505,15 @@ describe('Synchronizer', function() {
|
||||
remoteF2 = await Folder.load(remoteF2.id);
|
||||
|
||||
expect(remoteF2.title == localF2.title).toBe(true);
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
async function shoudSyncTagTest(withEncryption) {
|
||||
let masterKey = null;
|
||||
if (withEncryption) {
|
||||
Setting.setValue('encryption.enabled', true);
|
||||
masterKey = await loadEncryptionMasterKey();
|
||||
}
|
||||
|
||||
it('should sync tags', async (done) => {
|
||||
let f1 = await Folder.save({ title: "folder" });
|
||||
let n1 = await Note.save({ title: "mynote" });
|
||||
let n2 = await Note.save({ title: "mynote2" });
|
||||
@@ -507,6 +523,12 @@ describe('Synchronizer', function() {
|
||||
await switchClient(2);
|
||||
|
||||
await synchronizer().start();
|
||||
if (withEncryption) {
|
||||
const masterKey_2 = await MasterKey.load(masterKey.id);
|
||||
await encryptionService().loadMasterKey(masterKey_2, '123456', true);
|
||||
let t = await Tag.load(tag.id);
|
||||
await Tag.decrypt(t);
|
||||
}
|
||||
let remoteTag = await Tag.loadByTitle(tag.title);
|
||||
expect(!!remoteTag).toBe(true);
|
||||
expect(remoteTag.id).toBe(tag.id);
|
||||
@@ -532,11 +554,15 @@ describe('Synchronizer', function() {
|
||||
noteIds = await Tag.noteIds(tag.id);
|
||||
expect(noteIds.length).toBe(1);
|
||||
expect(remoteNoteIds[0]).toBe(noteIds[0]);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
it('should sync tags', asyncTest(async () => {
|
||||
await shoudSyncTagTest(false); }));
|
||||
|
||||
it('should not sync notes with conflicts', async (done) => {
|
||||
it('should sync encrypted tags', asyncTest(async () => {
|
||||
await shoudSyncTagTest(true); }));
|
||||
|
||||
it('should not sync notes with conflicts', asyncTest(async () => {
|
||||
let f1 = await Folder.save({ title: "folder" });
|
||||
let n1 = await Note.save({ title: "mynote", parent_id: f1.id, is_conflict: 1 });
|
||||
await synchronizer().start();
|
||||
@@ -548,11 +574,9 @@ describe('Synchronizer', function() {
|
||||
let folders = await Folder.all()
|
||||
expect(notes.length).toBe(0);
|
||||
expect(folders.length).toBe(1);
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should not try to delete on remote conflicted notes that have been deleted', async (done) => {
|
||||
it('should not try to delete on remote conflicted notes that have been deleted', asyncTest(async () => {
|
||||
let f1 = await Folder.save({ title: "folder" });
|
||||
let n1 = await Note.save({ title: "mynote", parent_id: f1.id });
|
||||
await synchronizer().start();
|
||||
@@ -565,17 +589,13 @@ describe('Synchronizer', function() {
|
||||
const deletedItems = await BaseItem.deletedItems(syncTargetId());
|
||||
|
||||
expect(deletedItems.length).toBe(0);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('should not consider it is a conflict if neither the title nor body of the note have changed', async (done) => {
|
||||
// That was previously a common conflict:
|
||||
// - Client 1 mark todo as "done", and sync
|
||||
// - Client 2 doesn't sync, mark todo as "done" todo. Then sync.
|
||||
// In theory it is a conflict because the todo_completed dates are different
|
||||
// but in practice it doesn't matter, we can just take the date when the
|
||||
// todo was marked as "done" the first time.
|
||||
}));
|
||||
|
||||
async function ignorableNoteConflictTest(withEncryption) {
|
||||
if (withEncryption) {
|
||||
Setting.setValue('encryption.enabled', true);
|
||||
await loadEncryptionMasterKey();
|
||||
}
|
||||
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: "un", is_todo: 1, parent_id: folder1.id });
|
||||
@@ -584,6 +604,10 @@ describe('Synchronizer', function() {
|
||||
await switchClient(2);
|
||||
|
||||
await synchronizer().start();
|
||||
if (withEncryption) {
|
||||
await loadEncryptionMasterKey(null, true);
|
||||
await decryptionWorker().start();
|
||||
}
|
||||
let note2 = await Note.load(note1.id);
|
||||
note2.todo_completed = time.unixMs()-1;
|
||||
await Note.save(note2);
|
||||
@@ -598,18 +622,43 @@ describe('Synchronizer', function() {
|
||||
note2conf = await Note.load(note1.id);
|
||||
await synchronizer().start();
|
||||
|
||||
let conflictedNotes = await Note.conflictedNotes();
|
||||
expect(conflictedNotes.length).toBe(0);
|
||||
if (!withEncryption) {
|
||||
// That was previously a common conflict:
|
||||
// - Client 1 mark todo as "done", and sync
|
||||
// - Client 2 doesn't sync, mark todo as "done" todo. Then sync.
|
||||
// In theory it is a conflict because the todo_completed dates are different
|
||||
// but in practice it doesn't matter, we can just take the date when the
|
||||
// todo was marked as "done" the first time.
|
||||
|
||||
let notes = await Note.all();
|
||||
expect(notes.length).toBe(1);
|
||||
expect(notes[0].id).toBe(note1.id);
|
||||
expect(notes[0].todo_completed).toBe(note2.todo_completed);
|
||||
let conflictedNotes = await Note.conflictedNotes();
|
||||
expect(conflictedNotes.length).toBe(0);
|
||||
|
||||
done();
|
||||
});
|
||||
let notes = await Note.all();
|
||||
expect(notes.length).toBe(1);
|
||||
expect(notes[0].id).toBe(note1.id);
|
||||
expect(notes[0].todo_completed).toBe(note2.todo_completed);
|
||||
} else {
|
||||
// If the notes are encrypted however it's not possible to do this kind of
|
||||
// smart conflict resolving since we don't know the content, so in that
|
||||
// case it's handled as a regular conflict.
|
||||
|
||||
it('items should be downloaded again when user cancels in the middle of delta operation', async (done) => {
|
||||
let conflictedNotes = await Note.conflictedNotes();
|
||||
expect(conflictedNotes.length).toBe(1);
|
||||
|
||||
let notes = await Note.all();
|
||||
expect(notes.length).toBe(2);
|
||||
}
|
||||
}
|
||||
|
||||
it('should not consider it is a conflict if neither the title nor body of the note have changed', asyncTest(async () => {
|
||||
await ignorableNoteConflictTest(false);
|
||||
}));
|
||||
|
||||
it('should always handle conflict if local or remote are encrypted', asyncTest(async () => {
|
||||
await ignorableNoteConflictTest(true);
|
||||
}));
|
||||
|
||||
it('items should be downloaded again when user cancels in the middle of delta operation', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: "un", is_todo: 1, parent_id: folder1.id });
|
||||
await synchronizer().start();
|
||||
@@ -625,19 +674,17 @@ describe('Synchronizer', function() {
|
||||
await synchronizer().start({ context: context });
|
||||
notes = await Note.all();
|
||||
expect(notes.length).toBe(1);
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('items should skip items that cannot be synced', async (done) => {
|
||||
it('should skip items that cannot be synced', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: "un", is_todo: 1, parent_id: folder1.id });
|
||||
const noteId = note1.id;
|
||||
await synchronizer().start();
|
||||
let disabledItems = await BaseItem.syncDisabledItems();
|
||||
let disabledItems = await BaseItem.syncDisabledItems(syncTargetId());
|
||||
expect(disabledItems.length).toBe(0);
|
||||
await Note.save({ id: noteId, title: "un mod", });
|
||||
synchronizer().debugFlags_ = ['cannotSync'];
|
||||
synchronizer().debugFlags_ = ['rejectedByTarget'];
|
||||
await synchronizer().start();
|
||||
synchronizer().debugFlags_ = [];
|
||||
await synchronizer().start(); // Another sync to check that this item is now excluded from sync
|
||||
@@ -651,10 +698,269 @@ describe('Synchronizer', function() {
|
||||
|
||||
await switchClient(1);
|
||||
|
||||
disabledItems = await BaseItem.syncDisabledItems();
|
||||
disabledItems = await BaseItem.syncDisabledItems(syncTargetId());
|
||||
expect(disabledItems.length).toBe(1);
|
||||
}));
|
||||
|
||||
done();
|
||||
});
|
||||
it('notes and folders should get encrypted when encryption is enabled', asyncTest(async () => {
|
||||
Setting.setValue('encryption.enabled', true);
|
||||
const masterKey = await loadEncryptionMasterKey();
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: "un", body: 'to be encrypted', parent_id: folder1.id });
|
||||
await synchronizer().start();
|
||||
// After synchronisation, remote items should be encrypted but local ones remain plain text
|
||||
note1 = await Note.load(note1.id);
|
||||
expect(note1.title).toBe('un');
|
||||
|
||||
await switchClient(2);
|
||||
|
||||
await synchronizer().start();
|
||||
let folder1_2 = await Folder.load(folder1.id);
|
||||
let note1_2 = await Note.load(note1.id);
|
||||
let masterKey_2 = await MasterKey.load(masterKey.id);
|
||||
// On this side however it should be received encrypted
|
||||
expect(!note1_2.title).toBe(true);
|
||||
expect(!folder1_2.title).toBe(true);
|
||||
expect(!!note1_2.encryption_cipher_text).toBe(true);
|
||||
expect(!!folder1_2.encryption_cipher_text).toBe(true);
|
||||
// Master key is already encrypted so it does not get re-encrypted during sync
|
||||
expect(masterKey_2.content).toBe(masterKey.content);
|
||||
expect(masterKey_2.checksum).toBe(masterKey.checksum);
|
||||
// Now load the master key we got from client 1 and try to decrypt
|
||||
await encryptionService().loadMasterKey(masterKey_2, '123456', true);
|
||||
// Get the decrypted items back
|
||||
await Folder.decrypt(folder1_2);
|
||||
await Note.decrypt(note1_2);
|
||||
folder1_2 = await Folder.load(folder1.id);
|
||||
note1_2 = await Note.load(note1.id);
|
||||
// Check that properties match the original items. Also check
|
||||
// the encryption did not affect the updated_time timestamp.
|
||||
expect(note1_2.title).toBe(note1.title);
|
||||
expect(note1_2.body).toBe(note1.body);
|
||||
expect(note1_2.updated_time).toBe(note1.updated_time);
|
||||
expect(!note1_2.encryption_cipher_text).toBe(true);
|
||||
expect(folder1_2.title).toBe(folder1.title);
|
||||
expect(folder1_2.updated_time).toBe(folder1.updated_time);
|
||||
expect(!folder1_2.encryption_cipher_text).toBe(true);
|
||||
}));
|
||||
|
||||
it('should enable encryption automatically when downloading new master key (and none was previously available)',asyncTest(async () => {
|
||||
// Enable encryption on client 1 and sync an item
|
||||
Setting.setValue('encryption.enabled', true);
|
||||
await loadEncryptionMasterKey();
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
await synchronizer().start();
|
||||
|
||||
await switchClient(2);
|
||||
|
||||
// Synchronising should enable encryption since we're going to get a master key
|
||||
expect(Setting.value('encryption.enabled')).toBe(false);
|
||||
await synchronizer().start();
|
||||
expect(Setting.value('encryption.enabled')).toBe(true);
|
||||
|
||||
// Check that we got the master key from client 1
|
||||
const masterKey = (await MasterKey.all())[0];
|
||||
expect(!!masterKey).toBe(true);
|
||||
|
||||
// Since client 2 hasn't supplied a password yet, no master key is currently loaded
|
||||
expect(encryptionService().loadedMasterKeyIds().length).toBe(0);
|
||||
|
||||
// If we sync now, nothing should be sent to target since we don't have a password.
|
||||
// Technically it's incorrect to set the property of an encrypted variable but it allows confirming
|
||||
// that encryption doesn't work if user hasn't supplied a password.
|
||||
await BaseItem.forceSync(folder1.id);
|
||||
await synchronizer().start();
|
||||
|
||||
await switchClient(1);
|
||||
|
||||
await synchronizer().start();
|
||||
folder1 = await Folder.load(folder1.id);
|
||||
expect(folder1.title).toBe('folder1'); // Still at old value
|
||||
|
||||
await switchClient(2);
|
||||
|
||||
// Now client 2 set the master key password
|
||||
Setting.setObjectKey('encryption.passwordCache', masterKey.id, '123456');
|
||||
await encryptionService().loadMasterKeysFromSettings();
|
||||
|
||||
// Now that master key should be loaded
|
||||
expect(encryptionService().loadedMasterKeyIds()[0]).toBe(masterKey.id);
|
||||
|
||||
// Decrypt all the data. Now change the title and sync again - this time the changes should be transmitted
|
||||
await decryptionWorker().start();
|
||||
folder1_2 = await Folder.save({ id: folder1.id, title: "change test" });
|
||||
|
||||
// If we sync now, this time client 1 should get the changes we did earlier
|
||||
await synchronizer().start();
|
||||
|
||||
await switchClient(1);
|
||||
|
||||
await synchronizer().start();
|
||||
// Decrypt the data we just got
|
||||
await decryptionWorker().start();
|
||||
folder1 = await Folder.load(folder1.id);
|
||||
expect(folder1.title).toBe('change test'); // Got title from client 2
|
||||
}));
|
||||
|
||||
it('should encrypt existing notes too when enabling E2EE', asyncTest(async () => {
|
||||
// First create a folder, without encryption enabled, and sync it
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
await synchronizer().start();
|
||||
let files = await fileApi().list()
|
||||
let content = await fileApi().get(files.items[0].path);
|
||||
expect(content.indexOf('folder1') >= 0).toBe(true)
|
||||
|
||||
// Then enable encryption and sync again
|
||||
let masterKey = await encryptionService().generateMasterKey('123456');
|
||||
masterKey = await MasterKey.save(masterKey);
|
||||
await encryptionService().enableEncryption(masterKey, '123456');
|
||||
await encryptionService().loadMasterKeysFromSettings();
|
||||
await synchronizer().start();
|
||||
|
||||
// Even though the folder has not been changed it should have been synced again so that
|
||||
// an encrypted version of it replaces the decrypted version.
|
||||
files = await fileApi().list()
|
||||
expect(files.items.length).toBe(2);
|
||||
// By checking that the folder title is not present, we can confirm that the item has indeed been encrypted
|
||||
// One of the two items is the master key
|
||||
content = await fileApi().get(files.items[0].path);
|
||||
expect(content.indexOf('folder1') < 0).toBe(true);
|
||||
content = await fileApi().get(files.items[1].path);
|
||||
expect(content.indexOf('folder1') < 0).toBe(true);
|
||||
}));
|
||||
|
||||
it('should sync resources', asyncTest(async () => {
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
|
||||
await shim.attachFileToNote(note1, __dirname + '/../tests/support/photo.jpg');
|
||||
let resource1 = (await Resource.all())[0];
|
||||
let resourcePath1 = Resource.fullPath(resource1);
|
||||
await synchronizer().start();
|
||||
expect((await fileApi().list()).items.length).toBe(3);
|
||||
|
||||
await switchClient(2);
|
||||
|
||||
await synchronizer().start();
|
||||
let allResources = await Resource.all();
|
||||
expect(allResources.length).toBe(1);
|
||||
let resource1_2 = allResources[0];
|
||||
let resourcePath1_2 = Resource.fullPath(resource1_2);
|
||||
|
||||
expect(resource1_2.id).toBe(resource1.id);
|
||||
expect(fileContentEqual(resourcePath1, resourcePath1_2)).toBe(true);
|
||||
}));
|
||||
|
||||
it('should encryt resources', asyncTest(async () => {
|
||||
Setting.setValue('encryption.enabled', true);
|
||||
const masterKey = await loadEncryptionMasterKey();
|
||||
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
|
||||
await shim.attachFileToNote(note1, __dirname + '/../tests/support/photo.jpg');
|
||||
let resource1 = (await Resource.all())[0];
|
||||
let resourcePath1 = Resource.fullPath(resource1);
|
||||
await synchronizer().start();
|
||||
|
||||
await switchClient(2);
|
||||
|
||||
await synchronizer().start();
|
||||
Setting.setObjectKey('encryption.passwordCache', masterKey.id, '123456');
|
||||
await encryptionService().loadMasterKeysFromSettings();
|
||||
|
||||
let resource1_2 = (await Resource.all())[0];
|
||||
resource1_2 = await Resource.decrypt(resource1_2);
|
||||
let resourcePath1_2 = Resource.fullPath(resource1_2);
|
||||
|
||||
expect(fileContentEqual(resourcePath1, resourcePath1_2)).toBe(true);
|
||||
}));
|
||||
|
||||
it('should upload decrypted items to sync target after encryption disabled', asyncTest(async () => {
|
||||
Setting.setValue('encryption.enabled', true);
|
||||
const masterKey = await loadEncryptionMasterKey();
|
||||
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
await synchronizer().start();
|
||||
|
||||
let allEncrypted = await allSyncTargetItemsEncrypted();
|
||||
expect(allEncrypted).toBe(true);
|
||||
|
||||
await encryptionService().disableEncryption();
|
||||
|
||||
await synchronizer().start();
|
||||
allEncrypted = await allSyncTargetItemsEncrypted();
|
||||
expect(allEncrypted).toBe(false);
|
||||
}));
|
||||
|
||||
it('should not upload any item if encryption was enabled, and items have not been decrypted, and then encryption disabled', asyncTest(async () => {
|
||||
// For some reason I can't explain, this test is sometimes executed before beforeEach is finished
|
||||
// which means it's going to fail in unexpected way. So the loop below wait for beforeEach to be done.
|
||||
while (insideBeforeEach) await time.msleep(100);
|
||||
|
||||
Setting.setValue('encryption.enabled', true);
|
||||
const masterKey = await loadEncryptionMasterKey();
|
||||
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
await synchronizer().start();
|
||||
|
||||
await switchClient(2);
|
||||
|
||||
await synchronizer().start();
|
||||
expect(Setting.value('encryption.enabled')).toBe(true);
|
||||
|
||||
// If we try to disable encryption now, it should throw an error because some items are
|
||||
// currently encrypted. They must be decrypted first so that they can be sent as
|
||||
// plain text to the sync target.
|
||||
//let hasThrown = await checkThrowAsync(async () => await encryptionService().disableEncryption());
|
||||
//expect(hasThrown).toBe(true);
|
||||
|
||||
// Now supply the password, and decrypt the items
|
||||
Setting.setObjectKey('encryption.passwordCache', masterKey.id, '123456');
|
||||
await encryptionService().loadMasterKeysFromSettings();
|
||||
await decryptionWorker().start();
|
||||
|
||||
// Try to disable encryption again
|
||||
hasThrown = await checkThrowAsync(async () => await encryptionService().disableEncryption());
|
||||
expect(hasThrown).toBe(false);
|
||||
|
||||
// If we sync now the target should receive the decrypted items
|
||||
await synchronizer().start();
|
||||
allEncrypted = await allSyncTargetItemsEncrypted();
|
||||
expect(allEncrypted).toBe(false);
|
||||
}));
|
||||
|
||||
it('should encrypt remote resources after encryption has been enabled', asyncTest(async () => {
|
||||
while (insideBeforeEach) await time.msleep(100);
|
||||
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
|
||||
await shim.attachFileToNote(note1, __dirname + '/../tests/support/photo.jpg');
|
||||
let resource1 = (await Resource.all())[0];
|
||||
await synchronizer().start();
|
||||
|
||||
expect(await allSyncTargetItemsEncrypted()).toBe(false);
|
||||
|
||||
const masterKey = await loadEncryptionMasterKey();
|
||||
await encryptionService().enableEncryption(masterKey, '123456');
|
||||
await encryptionService().loadMasterKeysFromSettings();
|
||||
|
||||
await synchronizer().start();
|
||||
|
||||
expect(await allSyncTargetItemsEncrypted()).toBe(true);
|
||||
}));
|
||||
|
||||
it('should upload encrypted resource, but it should not mark the blob as encrypted locally', asyncTest(async () => {
|
||||
while (insideBeforeEach) await time.msleep(100);
|
||||
|
||||
let folder1 = await Folder.save({ title: "folder1" });
|
||||
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
|
||||
await shim.attachFileToNote(note1, __dirname + '/../tests/support/photo.jpg');
|
||||
const masterKey = await loadEncryptionMasterKey();
|
||||
await encryptionService().enableEncryption(masterKey, '123456');
|
||||
await encryptionService().loadMasterKeysFromSettings();
|
||||
await synchronizer().start();
|
||||
|
||||
let resource1 = (await Resource.all())[0];
|
||||
expect(resource1.encryption_blob_encrypted).toBe(0);
|
||||
}));
|
||||
|
||||
});
|
@@ -1,34 +1,43 @@
|
||||
const fs = require('fs-extra');
|
||||
const { JoplinDatabase } = require('lib/joplin-database.js');
|
||||
const { DatabaseDriverNode } = require('lib/database-driver-node.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { Resource } = require('lib/models/resource.js');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const { NoteTag } = require('lib/models/note-tag.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Resource = require('lib/models/Resource.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const NoteTag = require('lib/models/NoteTag.js');
|
||||
const { Logger } = require('lib/logger.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const { BaseItem } = require('lib/models/base-item.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const MasterKey = require('lib/models/MasterKey');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
const { Synchronizer } = require('lib/synchronizer.js');
|
||||
const { FileApi } = require('lib/file-api.js');
|
||||
const { FileApiDriverMemory } = require('lib/file-api-driver-memory.js');
|
||||
const { FileApiDriverLocal } = require('lib/file-api-driver-local.js');
|
||||
const { FsDriverNode } = require('lib/fs-driver-node.js');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const { shimInit } = require('lib/shim-init-node.js');
|
||||
const SyncTargetRegistry = require('lib/SyncTargetRegistry.js');
|
||||
const SyncTargetMemory = require('lib/SyncTargetMemory.js');
|
||||
const SyncTargetFilesystem = require('lib/SyncTargetFilesystem.js');
|
||||
const SyncTargetOneDrive = require('lib/SyncTargetOneDrive.js');
|
||||
const EncryptionService = require('lib/services/EncryptionService.js');
|
||||
const DecryptionWorker = require('lib/services/DecryptionWorker.js');
|
||||
|
||||
let databases_ = [];
|
||||
let synchronizers_ = [];
|
||||
let encryptionServices_ = [];
|
||||
let decryptionWorkers_ = [];
|
||||
let fileApi_ = null;
|
||||
let currentClient_ = 1;
|
||||
|
||||
shimInit();
|
||||
|
||||
const fsDriver = new FsDriverNode();
|
||||
Logger.fsDriver_ = fsDriver;
|
||||
Resource.fsDriver_ = fsDriver;
|
||||
EncryptionService.fsDriver_ = fsDriver;
|
||||
|
||||
const logDir = __dirname + '/../tests/logs';
|
||||
fs.mkdirpSync(logDir, 0o755);
|
||||
@@ -37,7 +46,8 @@ SyncTargetRegistry.addClass(SyncTargetMemory);
|
||||
SyncTargetRegistry.addClass(SyncTargetFilesystem);
|
||||
SyncTargetRegistry.addClass(SyncTargetOneDrive);
|
||||
|
||||
const syncTargetId_ = SyncTargetRegistry.nameToId('memory');
|
||||
//const syncTargetId_ = SyncTargetRegistry.nameToId('memory');
|
||||
const syncTargetId_ = SyncTargetRegistry.nameToId('filesystem');
|
||||
const syncDir = __dirname + '/../tests/sync';
|
||||
|
||||
const sleepTime = syncTargetId_ == SyncTargetRegistry.nameToId('filesystem') ? 1001 : 400;
|
||||
@@ -45,13 +55,14 @@ const sleepTime = syncTargetId_ == SyncTargetRegistry.nameToId('filesystem') ? 1
|
||||
const logger = new Logger();
|
||||
logger.addTarget('console');
|
||||
logger.addTarget('file', { path: logDir + '/log.txt' });
|
||||
logger.setLevel(Logger.LEVEL_WARN);
|
||||
logger.setLevel(Logger.LEVEL_WARN); // Set to INFO to display sync process in console
|
||||
|
||||
BaseItem.loadClass('Note', Note);
|
||||
BaseItem.loadClass('Folder', Folder);
|
||||
BaseItem.loadClass('Resource', Resource);
|
||||
BaseItem.loadClass('Tag', Tag);
|
||||
BaseItem.loadClass('NoteTag', NoteTag);
|
||||
BaseItem.loadClass('MasterKey', MasterKey);
|
||||
|
||||
Setting.setConstant('appId', 'net.cozic.joplin-cli');
|
||||
Setting.setConstant('appType', 'cli');
|
||||
@@ -79,10 +90,15 @@ async function switchClient(id) {
|
||||
BaseItem.db_ = databases_[id];
|
||||
Setting.db_ = databases_[id];
|
||||
|
||||
BaseItem.encryptionService_ = encryptionServices_[id];
|
||||
Resource.encryptionService_ = encryptionServices_[id];
|
||||
|
||||
Setting.setConstant('resourceDir', resourceDir(id));
|
||||
|
||||
return Setting.load();
|
||||
}
|
||||
|
||||
function clearDatabase(id = null) {
|
||||
async function clearDatabase(id = null) {
|
||||
if (id === null) id = currentClient_;
|
||||
|
||||
let queries = [
|
||||
@@ -91,35 +107,65 @@ function clearDatabase(id = null) {
|
||||
'DELETE FROM resources',
|
||||
'DELETE FROM tags',
|
||||
'DELETE FROM note_tags',
|
||||
'DELETE FROM master_keys',
|
||||
'DELETE FROM settings',
|
||||
|
||||
'DELETE FROM deleted_items',
|
||||
'DELETE FROM sync_items',
|
||||
];
|
||||
|
||||
return databases_[id].transactionExecBatch(queries);
|
||||
await databases_[id].transactionExecBatch(queries);
|
||||
}
|
||||
|
||||
function setupDatabase(id = null) {
|
||||
async function setupDatabase(id = null) {
|
||||
if (id === null) id = currentClient_;
|
||||
|
||||
Setting.cancelScheduleSave();
|
||||
Setting.cache_ = null;
|
||||
|
||||
if (databases_[id]) {
|
||||
return clearDatabase(id).then(() => {
|
||||
return Setting.load();
|
||||
});
|
||||
await clearDatabase(id);
|
||||
await Setting.load();
|
||||
return;
|
||||
}
|
||||
|
||||
const filePath = __dirname + '/data/test-' + id + '.sqlite';
|
||||
return fs.unlink(filePath).catch(() => {
|
||||
|
||||
try {
|
||||
await fs.unlink(filePath);
|
||||
} catch (error) {
|
||||
// Don't care if the file doesn't exist
|
||||
}).then(() => {
|
||||
databases_[id] = new JoplinDatabase(new DatabaseDriverNode());
|
||||
// databases_[id].setLogger(logger);
|
||||
// console.info(filePath);
|
||||
return databases_[id].open({ name: filePath }).then(() => {
|
||||
BaseModel.db_ = databases_[id];
|
||||
return setupDatabase(id);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
databases_[id] = new JoplinDatabase(new DatabaseDriverNode());
|
||||
await databases_[id].open({ name: filePath });
|
||||
|
||||
BaseModel.db_ = databases_[id];
|
||||
await Setting.load();
|
||||
//return setupDatabase(id);
|
||||
|
||||
|
||||
|
||||
// return databases_[id].open({ name: filePath }).then(() => {
|
||||
// BaseModel.db_ = databases_[id];
|
||||
// return setupDatabase(id);
|
||||
// });
|
||||
|
||||
|
||||
// return fs.unlink(filePath).catch(() => {
|
||||
// // Don't care if the file doesn't exist
|
||||
// }).then(() => {
|
||||
// databases_[id] = new JoplinDatabase(new DatabaseDriverNode());
|
||||
// return databases_[id].open({ name: filePath }).then(() => {
|
||||
// BaseModel.db_ = databases_[id];
|
||||
// return setupDatabase(id);
|
||||
// });
|
||||
// });
|
||||
}
|
||||
|
||||
function resourceDir(id = null) {
|
||||
if (id === null) id = currentClient_;
|
||||
return __dirname + '/data/resources-' + id;
|
||||
}
|
||||
|
||||
async function setupDatabaseAndSynchronizer(id = null) {
|
||||
@@ -127,14 +173,25 @@ async function setupDatabaseAndSynchronizer(id = null) {
|
||||
|
||||
await setupDatabase(id);
|
||||
|
||||
EncryptionService.instance_ = null;
|
||||
DecryptionWorker.instance_ = null;
|
||||
|
||||
await fs.remove(resourceDir(id));
|
||||
await fs.mkdirp(resourceDir(id), 0o755);
|
||||
|
||||
if (!synchronizers_[id]) {
|
||||
const SyncTargetClass = SyncTargetRegistry.classById(syncTargetId_);
|
||||
const syncTarget = new SyncTargetClass(db(id));
|
||||
syncTarget.setFileApi(fileApi());
|
||||
syncTarget.setLogger(logger);
|
||||
synchronizers_[id] = await syncTarget.synchronizer();
|
||||
synchronizers_[id].autoStartDecryptionWorker_ = false; // For testing we disable this since it would make the tests non-deterministic
|
||||
}
|
||||
|
||||
encryptionServices_[id] = new EncryptionService();
|
||||
decryptionWorkers_[id] = new DecryptionWorker();
|
||||
decryptionWorkers_[id].setEncryptionService(encryptionServices_[id]);
|
||||
|
||||
if (syncTargetId_ == SyncTargetRegistry.nameToId('filesystem')) {
|
||||
fs.removeSync(syncDir)
|
||||
fs.mkdirpSync(syncDir, 0o755);
|
||||
@@ -153,6 +210,35 @@ function synchronizer(id = null) {
|
||||
return synchronizers_[id];
|
||||
}
|
||||
|
||||
function encryptionService(id = null) {
|
||||
if (id === null) id = currentClient_;
|
||||
return encryptionServices_[id];
|
||||
}
|
||||
|
||||
function decryptionWorker(id = null) {
|
||||
if (id === null) id = currentClient_;
|
||||
return decryptionWorkers_[id];
|
||||
}
|
||||
|
||||
async function loadEncryptionMasterKey(id = null, useExisting = false) {
|
||||
const service = encryptionService(id);
|
||||
|
||||
let masterKey = null;
|
||||
|
||||
if (!useExisting) { // Create it
|
||||
masterKey = await service.generateMasterKey('123456');
|
||||
masterKey = await MasterKey.save(masterKey);
|
||||
} else { // Use the one already available
|
||||
materKey = await MasterKey.all();
|
||||
if (!materKey.length) throw new Error('No mater key available');
|
||||
masterKey = materKey[0];
|
||||
}
|
||||
|
||||
await service.loadMasterKey(masterKey, '123456', true);
|
||||
|
||||
return masterKey;
|
||||
}
|
||||
|
||||
function fileApi() {
|
||||
if (fileApi_) return fileApi_;
|
||||
|
||||
@@ -185,4 +271,43 @@ function fileApi() {
|
||||
return fileApi_;
|
||||
}
|
||||
|
||||
module.exports = { setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId };
|
||||
function objectsEqual(o1, o2) {
|
||||
if (Object.getOwnPropertyNames(o1).length !== Object.getOwnPropertyNames(o2).length) return false;
|
||||
for (let n in o1) {
|
||||
if (!o1.hasOwnProperty(n)) continue;
|
||||
if (o1[n] !== o2[n]) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
async function checkThrowAsync(asyncFn) {
|
||||
let hasThrown = false;
|
||||
try {
|
||||
await asyncFn();
|
||||
} catch (error) {
|
||||
hasThrown = true;
|
||||
}
|
||||
return hasThrown;
|
||||
}
|
||||
|
||||
function fileContentEqual(path1, path2) {
|
||||
const fs = require('fs-extra');
|
||||
const content1 = fs.readFileSync(path1, 'base64');
|
||||
const content2 = fs.readFileSync(path2, 'base64');
|
||||
return content1 === content2;
|
||||
}
|
||||
|
||||
// Wrap an async test in a try/catch block so that done() is always called
|
||||
// and display a proper error message instead of "unhandled promise error"
|
||||
function asyncTest(callback) {
|
||||
return async function(done) {
|
||||
try {
|
||||
await callback();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
done();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync, encryptionService, loadEncryptionMasterKey, fileContentEqual, decryptionWorker, asyncTest };
|
@@ -19,7 +19,8 @@
|
||||
"title": "Demo for Joplin CLI",
|
||||
"years": [
|
||||
2016,
|
||||
2017
|
||||
2017,
|
||||
2018
|
||||
],
|
||||
"owner": "Laurent Cozic"
|
||||
},
|
||||
|
@@ -1,5 +1,6 @@
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { BrowserWindow } = require('electron');
|
||||
const { shim } = require('lib/shim');
|
||||
const url = require('url')
|
||||
const path = require('path')
|
||||
const urlUtils = require('lib/urlUtils.js');
|
||||
@@ -38,12 +39,18 @@ class ElectronAppWrapper {
|
||||
defaultHeight: 600,
|
||||
});
|
||||
|
||||
this.win_ = new BrowserWindow({
|
||||
const windowOptions = {
|
||||
'x': windowState.x,
|
||||
'y': windowState.y,
|
||||
'width': windowState.width,
|
||||
'height': windowState.height
|
||||
})
|
||||
'height': windowState.height,
|
||||
};
|
||||
|
||||
// Linux icon workaround for bug https://github.com/electron-userland/electron-builder/issues/2098
|
||||
// Fix: https://github.com/electron-userland/electron-builder/issues/2269
|
||||
if (shim.isLinux()) windowOptions.icon = __dirname + '/build/icons/128x128.png';
|
||||
|
||||
this.win_ = new BrowserWindow(windowOptions)
|
||||
|
||||
this.win_.loadURL(url.format({
|
||||
pathname: path.join(__dirname, 'index.html'),
|
||||
|
@@ -2,13 +2,14 @@ require('app-module-path').addPath(__dirname);
|
||||
|
||||
const { BaseApplication } = require('lib/BaseApplication');
|
||||
const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { shim } = require('lib/shim.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const MasterKey = require('lib/models/MasterKey');
|
||||
const { _, setLocale } = require('lib/locale.js');
|
||||
const os = require('os');
|
||||
const fs = require('fs-extra');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const { reg } = require('lib/registry.js');
|
||||
const { sprintf } = require('sprintf-js');
|
||||
const { JoplinDatabase } = require('lib/joplin-database.js');
|
||||
@@ -18,6 +19,7 @@ const { defaultState } = require('lib/reducer.js');
|
||||
const packageInfo = require('./packageInfo.js');
|
||||
const AlarmService = require('lib/services/AlarmService.js');
|
||||
const AlarmServiceDriverNode = require('lib/services/AlarmServiceDriverNode');
|
||||
const DecryptionWorker = require('lib/services/DecryptionWorker');
|
||||
|
||||
const { bridge } = require('electron').remote.require('./bridge');
|
||||
const Menu = bridge().Menu;
|
||||
@@ -255,7 +257,7 @@ class Application extends BaseApplication {
|
||||
name: 'search',
|
||||
});
|
||||
},
|
||||
}]
|
||||
}],
|
||||
}, {
|
||||
label: _('Tools'),
|
||||
submenu: [{
|
||||
@@ -266,15 +268,26 @@ class Application extends BaseApplication {
|
||||
routeName: 'Status',
|
||||
});
|
||||
}
|
||||
}, {
|
||||
type: 'separator',
|
||||
screens: ['Main'],
|
||||
},{
|
||||
label: _('Options'),
|
||||
label: _('Encryption options'),
|
||||
click: () => {
|
||||
this.dispatch({
|
||||
type: 'NAV_GO',
|
||||
routeName: 'EncryptionConfig',
|
||||
});
|
||||
}
|
||||
},{
|
||||
label: _('General Options'),
|
||||
click: () => {
|
||||
this.dispatch({
|
||||
type: 'NAV_GO',
|
||||
routeName: 'Config',
|
||||
});
|
||||
}
|
||||
}]
|
||||
}],
|
||||
}, {
|
||||
label: _('Help'),
|
||||
submenu: [{
|
||||
@@ -288,7 +301,7 @@ class Application extends BaseApplication {
|
||||
let message = [
|
||||
p.description,
|
||||
'',
|
||||
'Copyright © 2016-2017 Laurent Cozic',
|
||||
'Copyright © 2016-2018 Laurent Cozic',
|
||||
_('%s %s (%s, %s)', p.name, p.version, Setting.value('env'), process.platform),
|
||||
];
|
||||
bridge().showMessageBox({
|
||||
@@ -354,7 +367,14 @@ class Application extends BaseApplication {
|
||||
|
||||
this.dispatch({
|
||||
type: 'TAG_UPDATE_ALL',
|
||||
tags: tags,
|
||||
items: tags,
|
||||
});
|
||||
|
||||
const masterKeys = await MasterKey.all();
|
||||
|
||||
this.dispatch({
|
||||
type: 'MASTERKEY_UPDATE_ALL',
|
||||
items: masterKeys,
|
||||
});
|
||||
|
||||
this.store().dispatch({
|
||||
@@ -387,6 +407,8 @@ class Application extends BaseApplication {
|
||||
// Wait for the first sync before updating the notifications, since synchronisation
|
||||
// might change the notifications.
|
||||
AlarmService.updateAllNotifications();
|
||||
|
||||
DecryptionWorker.instance().scheduleStart();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ fs.readdirSync(guiPath).forEach((filename) => {
|
||||
if (ext !== 'jsx') return;
|
||||
p.pop();
|
||||
|
||||
const basePath = p.join('/');
|
||||
const basePath = p.join('.');
|
||||
|
||||
const jsPath = basePath + '.min.js';
|
||||
|
||||
|
@@ -1,10 +1,11 @@
|
||||
const React = require('react');
|
||||
const { connect } = require('react-redux');
|
||||
const { reg } = require('lib/registry.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { bridge } = require('electron').remote.require('./bridge');
|
||||
const { Header } = require('./Header.min.js');
|
||||
const { themeStyle } = require('../theme.js');
|
||||
const pathUtils = require('lib/path-utils.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
|
||||
class ConfigScreenComponent extends React.Component {
|
||||
@@ -21,6 +22,23 @@ class ConfigScreenComponent extends React.Component {
|
||||
this.setState({ settings: this.props.settings });
|
||||
}
|
||||
|
||||
keyValueToArray(kv) {
|
||||
let output = [];
|
||||
for (let k in kv) {
|
||||
if (!kv.hasOwnProperty(k)) continue;
|
||||
output.push({
|
||||
key: k,
|
||||
label: kv[k],
|
||||
});
|
||||
}
|
||||
|
||||
output.sort((a, b) => {
|
||||
return a.label.toLowerCase() < b.label.toLowerCase() ? -1 : +1;
|
||||
});
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
settingToComponent(key, value) {
|
||||
const theme = themeStyle(this.props.theme);
|
||||
|
||||
@@ -52,13 +70,14 @@ class ConfigScreenComponent extends React.Component {
|
||||
if (md.isEnum) {
|
||||
let items = [];
|
||||
const settingOptions = md.options();
|
||||
for (let k in settingOptions) {
|
||||
if (!settingOptions.hasOwnProperty(k)) continue;
|
||||
items.push(<option value={k.toString()} key={k}>{settingOptions[k]}</option>);
|
||||
let array = this.keyValueToArray(settingOptions);
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
const e = array[i];
|
||||
items.push(<option value={e.key.toString()} key={e.key}>{settingOptions[e.key]}</option>);
|
||||
}
|
||||
|
||||
return (
|
||||
<div key={key+value} style={rowStyle}>
|
||||
<div key={key} style={rowStyle}>
|
||||
<div style={labelStyle}><label>{md.label()}</label></div>
|
||||
<select value={value} style={controlStyle} onChange={(event) => { updateSettingValue(key, event.target.value) }}>
|
||||
{items}
|
||||
@@ -71,9 +90,9 @@ class ConfigScreenComponent extends React.Component {
|
||||
}
|
||||
|
||||
return (
|
||||
<div key={key+value} style={rowStyle}>
|
||||
<div key={key} style={rowStyle}>
|
||||
<div style={controlStyle}>
|
||||
<input id={'setting_checkbox_' + key} type="checkbox" defaultChecked={!!value} onChange={(event) => { onCheckboxClick(event) }}/><label onClick={(event) => { onCheckboxClick(event) }} style={labelStyle} htmlFor={'setting_checkbox_' + key}>{md.label()}</label>
|
||||
<input id={'setting_checkbox_' + key} type="checkbox" checked={!!value} onChange={(event) => { onCheckboxClick(event) }}/><label onClick={(event) => { onCheckboxClick(event) }} style={labelStyle} htmlFor={'setting_checkbox_' + key}>{md.label()}</label>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -85,7 +104,7 @@ class ConfigScreenComponent extends React.Component {
|
||||
}
|
||||
|
||||
return (
|
||||
<div key={key+value} style={rowStyle}>
|
||||
<div key={key} style={rowStyle}>
|
||||
<div style={labelStyle}><label>{md.label()}</label></div>
|
||||
<input type="text" style={controlStyle} value={this.state.settings[key]} onChange={(event) => {onTextChange(event)}} />
|
||||
</div>
|
||||
@@ -146,6 +165,9 @@ class ConfigScreenComponent extends React.Component {
|
||||
<div style={style}>
|
||||
<Header style={headerStyle} />
|
||||
<div style={containerStyle}>
|
||||
<div style={Object.assign({}, theme.textStyle, {marginBottom: 20})}>
|
||||
{_('Notes and settings are stored in: %s', pathUtils.toSystemSlashes(Setting.value('profileDir'), process.platform))}
|
||||
</div>
|
||||
{ settingComps }
|
||||
<button onClick={() => {this.onSaveClick()}} style={buttonStyle}>{_('Save')}</button>
|
||||
<button onClick={() => {this.onCancelClick()}} style={buttonStyle}>{_('Cancel')}</button>
|
||||
|
191
ElectronClient/app/gui/EncryptionConfigScreen.jsx
Normal file
191
ElectronClient/app/gui/EncryptionConfigScreen.jsx
Normal file
@@ -0,0 +1,191 @@
|
||||
const React = require('react');
|
||||
const { connect } = require('react-redux');
|
||||
const Setting = require('lib/models/Setting');
|
||||
const BaseItem = require('lib/models/BaseItem');
|
||||
const EncryptionService = require('lib/services/EncryptionService');
|
||||
const { Header } = require('./Header.min.js');
|
||||
const { themeStyle } = require('../theme.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const dialogs = require('./dialogs');
|
||||
const shared = require('lib/components/shared/encryption-config-shared.js');
|
||||
const pathUtils = require('lib/path-utils.js');
|
||||
const { bridge } = require('electron').remote.require('./bridge');
|
||||
|
||||
class EncryptionConfigScreenComponent extends React.Component {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
shared.constructor(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.isMounted_ = true;
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.isMounted_ = false;
|
||||
}
|
||||
|
||||
initState(props) {
|
||||
return shared.initState(this, props);
|
||||
}
|
||||
|
||||
async refreshStats() {
|
||||
return shared.refreshStats(this);
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
this.initState(this.props);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
this.initState(nextProps);
|
||||
}
|
||||
|
||||
async checkPasswords() {
|
||||
return shared.checkPasswords(this);
|
||||
}
|
||||
|
||||
renderMasterKey(mk) {
|
||||
const theme = themeStyle(this.props.theme);
|
||||
|
||||
const onSaveClick = () => {
|
||||
return shared.onSavePasswordClick(this, mk);
|
||||
}
|
||||
|
||||
const onPasswordChange = (event) => {
|
||||
return shared.onPasswordChange(this, mk, event.target.value);
|
||||
}
|
||||
|
||||
const password = this.state.passwords[mk.id] ? this.state.passwords[mk.id] : '';
|
||||
const active = this.props.activeMasterKeyId === mk.id ? '✔' : '';
|
||||
const passwordOk = this.state.passwordChecks[mk.id] === true ? '✔' : '❌';
|
||||
|
||||
return (
|
||||
<tr key={mk.id}>
|
||||
<td style={theme.textStyle}>{active}</td>
|
||||
<td style={theme.textStyle}>{mk.id}</td>
|
||||
<td style={theme.textStyle}>{mk.source_application}</td>
|
||||
<td style={theme.textStyle}>{time.formatMsToLocal(mk.created_time)}</td>
|
||||
<td style={theme.textStyle}>{time.formatMsToLocal(mk.updated_time)}</td>
|
||||
<td style={theme.textStyle}><input type="password" value={password} onChange={(event) => onPasswordChange(event)}/> <button onClick={() => onSaveClick()}>{_('Save')}</button></td>
|
||||
<td style={theme.textStyle}>{passwordOk}</td>
|
||||
</tr>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
const style = this.props.style;
|
||||
const theme = themeStyle(this.props.theme);
|
||||
const masterKeys = this.state.masterKeys;
|
||||
const containerPadding = 10;
|
||||
|
||||
const headerStyle = {
|
||||
width: style.width,
|
||||
};
|
||||
|
||||
const containerStyle = {
|
||||
padding: containerPadding,
|
||||
overflow: 'auto',
|
||||
height: style.height - theme.headerHeight - containerPadding * 2,
|
||||
};
|
||||
|
||||
const mkComps = [];
|
||||
|
||||
for (let i = 0; i < masterKeys.length; i++) {
|
||||
const mk = masterKeys[i];
|
||||
mkComps.push(this.renderMasterKey(mk));
|
||||
}
|
||||
|
||||
const onToggleButtonClick = async () => {
|
||||
const isEnabled = Setting.value('encryption.enabled');
|
||||
|
||||
let answer = null;
|
||||
if (isEnabled) {
|
||||
answer = await dialogs.confirm(_('Disabling encryption means *all* your notes and attachments are going to be re-synchronised and sent unencrypted to the sync target. Do you wish to continue?'));
|
||||
} else {
|
||||
answer = await dialogs.prompt(_('Enabling encryption means *all* your notes and attachments are going to be re-synchronised and sent encrypted to the sync target. Do not lose the password as, for security purposes, this will be the *only* way to decrypt the data! To enable encryption, please enter your password below.'), '', '', { type: 'password' });
|
||||
}
|
||||
|
||||
if (!answer) return;
|
||||
|
||||
try {
|
||||
if (isEnabled) {
|
||||
await EncryptionService.instance().disableEncryption();
|
||||
} else {
|
||||
await EncryptionService.instance().generateMasterKeyAndEnableEncryption(answer);
|
||||
}
|
||||
} catch (error) {
|
||||
await dialogs.alert(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
const decryptedItemsInfo = this.props.encryptionEnabled ? <p style={theme.textStyle}>{shared.decryptedStatText(this)}</p> : null;
|
||||
const toggleButton = <button onClick={() => { onToggleButtonClick() }}>{this.props.encryptionEnabled ? _('Disable encryption') : _('Enable encryption')}</button>
|
||||
|
||||
let masterKeySection = null;
|
||||
|
||||
if (mkComps.length) {
|
||||
masterKeySection = (
|
||||
<div>
|
||||
<h1 style={theme.h1Style}>{_('Master Keys')}</h1>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style={theme.textStyle}>{_('Active')}</th>
|
||||
<th style={theme.textStyle}>{_('ID')}</th>
|
||||
<th style={theme.textStyle}>{_('Source')}</th>
|
||||
<th style={theme.textStyle}>{_('Created')}</th>
|
||||
<th style={theme.textStyle}>{_('Updated')}</th>
|
||||
<th style={theme.textStyle}>{_('Password')}</th>
|
||||
<th style={theme.textStyle}>{_('Password OK')}</th>
|
||||
</tr>
|
||||
{mkComps}
|
||||
</tbody>
|
||||
</table>
|
||||
<p style={theme.textStyle}>{_('Note: Only one master key is going to be used for encryption (the one marked as "active"). Any of the keys might be used for decryption, depending on how the notes or notebooks were originally encrypted.')}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Header style={headerStyle} />
|
||||
<div style={containerStyle}>
|
||||
<div style={{backgroundColor: theme.warningBackgroundColor, paddingLeft: 10, paddingRight: 10, paddingTop: 2, paddingBottom: 2 }}>
|
||||
<p style={theme.textStyle}>
|
||||
Important: This is a <b>beta</b> feature. It has been extensively tested and is already in use by some users, but it is possible that some bugs remain.
|
||||
</p>
|
||||
<p style={theme.textStyle}>
|
||||
If you wish to you use it, it is recommended that you keep a backup of your data. The simplest way is to regularly backup <b>{pathUtils.toSystemSlashes(Setting.value('profileDir'), process.platform)}</b>
|
||||
</p>
|
||||
<p style={theme.textStyle}>
|
||||
For more information about End-To-End Encryption (E2EE) and how it is going to work, please check the documentation: <a onClick={() => {bridge().openExternal('http://joplin.cozic.net/help/e2ee.html')}} href="#">http://joplin.cozic.net/help/e2ee.html</a>
|
||||
</p>
|
||||
</div>
|
||||
<h1 style={theme.h1Style}>{_('Status')}</h1>
|
||||
<p style={theme.textStyle}>{_('Encryption is:')} <strong>{this.props.encryptionEnabled ? _('Enabled') : _('Disabled')}</strong></p>
|
||||
{decryptedItemsInfo}
|
||||
{toggleButton}
|
||||
{masterKeySection}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
theme: state.settings.theme,
|
||||
masterKeys: state.masterKeys,
|
||||
passwords: state.settings['encryption.passwordCache'],
|
||||
encryptionEnabled: state.settings['encryption.enabled'],
|
||||
activeMasterKeyId: state.settings['encryption.activeMasterKeyId'],
|
||||
};
|
||||
};
|
||||
|
||||
const EncryptionConfigScreen = connect(mapStateToProps)(EncryptionConfigScreenComponent);
|
||||
|
||||
module.exports = { EncryptionConfigScreen };
|
@@ -1,7 +1,7 @@
|
||||
const React = require('react');
|
||||
const { connect } = require('react-redux');
|
||||
const { reg } = require('lib/registry.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const { bridge } = require('electron').remote.require('./bridge');
|
||||
const { Header } = require('./Header.min.js');
|
||||
const { themeStyle } = require('../theme.js');
|
||||
|
@@ -5,12 +5,12 @@ const { SideBar } = require('./SideBar.min.js');
|
||||
const { NoteList } = require('./NoteList.min.js');
|
||||
const { NoteText } = require('./NoteText.min.js');
|
||||
const { PromptDialog } = require('./PromptDialog.min.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const { uuid } = require('lib/uuid.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const { themeStyle } = require('../theme.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const layoutUtils = require('lib/layout-utils.js');
|
||||
@@ -132,7 +132,7 @@ class MainScreenComponent extends React.Component {
|
||||
}
|
||||
},
|
||||
});
|
||||
} else if (command.name === 'renameNotebook') {
|
||||
} else if (command.name === 'renameFolder') {
|
||||
const folder = await Folder.load(command.id);
|
||||
if (!folder) return;
|
||||
|
||||
@@ -143,7 +143,8 @@ class MainScreenComponent extends React.Component {
|
||||
onClose: async (answer) => {
|
||||
if (answer !== null) {
|
||||
try {
|
||||
await Folder.save({ id: folder.id, title: answer }, { userSideValidation: true });
|
||||
folder.title = answer;
|
||||
await Folder.save(folder, { fields: ['title'], userSideValidation: true });
|
||||
} catch (error) {
|
||||
bridge().showErrorMessageBox(error.message);
|
||||
}
|
||||
@@ -288,8 +289,7 @@ class MainScreenComponent extends React.Component {
|
||||
const promptOptions = this.state.promptOptions;
|
||||
const folders = this.props.folders;
|
||||
const notes = this.props.notes;
|
||||
const messageBoxVisible = this.props.hasDisabledSyncItems;
|
||||
|
||||
const messageBoxVisible = this.props.hasDisabledSyncItems || this.props.showMissingMasterKeyMessage;
|
||||
const styles = this.styles(this.props.theme, style.width, style.height, messageBoxVisible);
|
||||
const theme = themeStyle(this.props.theme);
|
||||
|
||||
@@ -343,13 +343,31 @@ class MainScreenComponent extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
const messageComp = messageBoxVisible ? (
|
||||
<div style={styles.messageBox}>
|
||||
<span style={theme.textStyle}>
|
||||
{_('Some items cannot be synchronised.')} <a href="#" onClick={() => { onViewDisabledItemsClick() }}>{_('View them now')}</a>
|
||||
</span>
|
||||
</div>
|
||||
) : null;
|
||||
const onViewMasterKeysClick = () => {
|
||||
this.props.dispatch({
|
||||
type: 'NAV_GO',
|
||||
routeName: 'EncryptionConfig',
|
||||
});
|
||||
}
|
||||
|
||||
let messageComp = null;
|
||||
|
||||
if (messageBoxVisible) {
|
||||
let msg = null;
|
||||
if (this.props.hasDisabledSyncItems) {
|
||||
msg = <span>{_('Some items cannot be synchronised.')} <a href="#" onClick={() => { onViewDisabledItemsClick() }}>{_('View them now')}</a></span>
|
||||
} else if (this.props.showMissingMasterKeyMessage) {
|
||||
msg = <span>{_('Some items cannot be decrypted.')} <a href="#" onClick={() => { onViewMasterKeysClick() }}>{_('Set the password')}</a></span>
|
||||
}
|
||||
|
||||
messageComp = (
|
||||
<div style={styles.messageBox}>
|
||||
<span style={theme.textStyle}>
|
||||
{msg}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={style}>
|
||||
@@ -383,6 +401,7 @@ const mapStateToProps = (state) => {
|
||||
folders: state.folders,
|
||||
notes: state.notes,
|
||||
hasDisabledSyncItems: state.hasDisabledSyncItems,
|
||||
showMissingMasterKeyMessage: state.notLoadedMasterKeys.length && state.masterKeys.length,
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -3,6 +3,7 @@ const React = require('react');
|
||||
const { connect } = require('react-redux');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const { themeStyle } = require('../theme.js');
|
||||
const BaseModel = require('lib/BaseModel');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { bridge } = require('electron').remote.require('./bridge');
|
||||
const Menu = bridge().Menu;
|
||||
@@ -56,23 +57,32 @@ class NoteListComponent extends React.Component {
|
||||
const noteIds = this.props.selectedNoteIds;
|
||||
if (!noteIds.length) return;
|
||||
|
||||
const notes = noteIds.map((id) => BaseModel.byId(this.props.notes, id));
|
||||
|
||||
let hasEncrypted = false;
|
||||
for (let i = 0; i < notes.length; i++) {
|
||||
if (!!notes[i].encryption_applied) hasEncrypted = true;
|
||||
}
|
||||
|
||||
const menu = new Menu()
|
||||
|
||||
menu.append(new MenuItem({label: _('Add or remove tags'), enabled: noteIds.length === 1, click: async () => {
|
||||
this.props.dispatch({
|
||||
type: 'WINDOW_COMMAND',
|
||||
name: 'setTags',
|
||||
noteId: noteIds[0],
|
||||
});
|
||||
}}));
|
||||
if (!hasEncrypted) {
|
||||
menu.append(new MenuItem({label: _('Add or remove tags'), enabled: noteIds.length === 1, click: async () => {
|
||||
this.props.dispatch({
|
||||
type: 'WINDOW_COMMAND',
|
||||
name: 'setTags',
|
||||
noteId: noteIds[0],
|
||||
});
|
||||
}}));
|
||||
|
||||
menu.append(new MenuItem({label: _('Switch between note and to-do type'), click: async () => {
|
||||
for (let i = 0; i < noteIds.length; i++) {
|
||||
const note = await Note.load(noteIds[i]);
|
||||
await Note.save(Note.toggleIsTodo(note));
|
||||
eventManager.emit('noteTypeToggle', { noteId: note.id });
|
||||
}
|
||||
}}));
|
||||
menu.append(new MenuItem({label: _('Switch between note and to-do type'), click: async () => {
|
||||
for (let i = 0; i < noteIds.length; i++) {
|
||||
const note = await Note.load(noteIds[i]);
|
||||
await Note.save(Note.toggleIsTodo(note), { userSideValidation: true });
|
||||
eventManager.emit('noteTypeToggle', { noteId: note.id });
|
||||
}
|
||||
}}));
|
||||
}
|
||||
|
||||
menu.append(new MenuItem({label: _('Delete'), click: async () => {
|
||||
const ok = bridge().showConfirmMessageBox(noteIds.length > 1 ? _('Delete notes?') : _('Delete note?'));
|
||||
@@ -120,7 +130,7 @@ class NoteListComponent extends React.Component {
|
||||
id: item.id,
|
||||
todo_completed: checked ? time.unixMs() : 0,
|
||||
}
|
||||
await Note.save(newNote);
|
||||
await Note.save(newNote, { userSideValidation: true });
|
||||
eventManager.emit('todoToggle', { noteId: item.id });
|
||||
}
|
||||
|
||||
@@ -154,7 +164,7 @@ class NoteListComponent extends React.Component {
|
||||
onClick={(event) => { onTitleClick(event, item) }}
|
||||
onDragStart={(event) => onDragStart(event) }
|
||||
>
|
||||
{item.title}
|
||||
{Note.displayTitle(item)}
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const React = require('react');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { IconButton } = require('./IconButton.min.js');
|
||||
const Toolbar = require('./Toolbar.min.js');
|
||||
const { connect } = require('react-redux');
|
||||
@@ -36,7 +36,7 @@ class NoteTextComponent extends React.Component {
|
||||
isLoading: true,
|
||||
webviewReady: false,
|
||||
scrollHeight: null,
|
||||
editorScrollTop: 0,
|
||||
editorScrollTop: 0
|
||||
};
|
||||
|
||||
this.lastLoadedNoteId_ = null;
|
||||
@@ -167,6 +167,12 @@ class NoteTextComponent extends React.Component {
|
||||
async componentWillReceiveProps(nextProps) {
|
||||
if ('noteId' in nextProps && nextProps.noteId !== this.props.noteId) {
|
||||
await this.reloadNote(nextProps);
|
||||
if(this.editor_){
|
||||
const session = this.editor_.editor.getSession();
|
||||
const undoManager = session.getUndoManager();
|
||||
undoManager.reset();
|
||||
session.setUndoManager(undoManager);
|
||||
}
|
||||
}
|
||||
|
||||
if ('syncStarted' in nextProps && !nextProps.syncStarted && !this.isModified()) {
|
||||
@@ -334,6 +340,7 @@ class NoteTextComponent extends React.Component {
|
||||
this.scheduleSave();
|
||||
}
|
||||
|
||||
|
||||
async commandAttachFile() {
|
||||
const noteId = this.props.noteId;
|
||||
if (!noteId) return;
|
||||
@@ -418,7 +425,7 @@ class NoteTextComponent extends React.Component {
|
||||
|
||||
const innerWidth = rootStyle.width - rootStyle.paddingLeft - rootStyle.paddingRight - borderWidth;
|
||||
|
||||
if (!note) {
|
||||
if (!note || !!note.encryption_applied) {
|
||||
const emptyDivStyle = Object.assign({
|
||||
backgroundColor: 'black',
|
||||
opacity: 0.1,
|
||||
@@ -549,7 +556,6 @@ class NoteTextComponent extends React.Component {
|
||||
delete editorRootStyle.width;
|
||||
delete editorRootStyle.height;
|
||||
delete editorRootStyle.fontSize;
|
||||
|
||||
const editor = <AceEditor
|
||||
value={body}
|
||||
mode="markdown"
|
||||
|
@@ -4,13 +4,14 @@ const { createStore } = require('redux');
|
||||
const { connect, Provider } = require('react-redux');
|
||||
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
|
||||
const { MainScreen } = require('./MainScreen.min.js');
|
||||
const { OneDriveLoginScreen } = require('./OneDriveLoginScreen.min.js');
|
||||
const { StatusScreen } = require('./StatusScreen.min.js');
|
||||
const { ImportScreen } = require('./ImportScreen.min.js');
|
||||
const { ConfigScreen } = require('./ConfigScreen.min.js');
|
||||
const { EncryptionConfigScreen } = require('./EncryptionConfigScreen.min.js');
|
||||
const { Navigator } = require('./Navigator.min.js');
|
||||
|
||||
const { app } = require('../app');
|
||||
@@ -77,6 +78,7 @@ class RootComponent extends React.Component {
|
||||
Import: { screen: ImportScreen, title: () => _('Import') },
|
||||
Config: { screen: ConfigScreen, title: () => _('Options') },
|
||||
Status: { screen: StatusScreen, title: () => _('Synchronisation Status') },
|
||||
EncryptionConfig: { screen: EncryptionConfigScreen, title: () => _('Encryption Options') },
|
||||
};
|
||||
|
||||
return (
|
||||
|
@@ -2,10 +2,10 @@ const React = require('react');
|
||||
const { connect } = require('react-redux');
|
||||
const shared = require('lib/components/shared/side-menu-shared.js');
|
||||
const { Synchronizer } = require('lib/synchronizer.js');
|
||||
const { BaseModel } = require('lib/base-model.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const BaseModel = require('lib/BaseModel.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const { themeStyle } = require('../theme.js');
|
||||
const { bridge } = require('electron').remote.require('./bridge');
|
||||
@@ -98,7 +98,7 @@ class SideBarComponent extends React.Component {
|
||||
|
||||
let deleteMessage = '';
|
||||
if (itemType === BaseModel.TYPE_FOLDER) {
|
||||
deleteMessage = _('Delete notebook?');
|
||||
deleteMessage = _('Delete notebook? All notes within this notebook will also be deleted.');
|
||||
} else if (itemType === BaseModel.TYPE_TAG) {
|
||||
deleteMessage = _('Remove this tag from all the notes?');
|
||||
} else if (itemType === BaseModel.TYPE_SEARCH) {
|
||||
@@ -107,6 +107,11 @@ class SideBarComponent extends React.Component {
|
||||
|
||||
const menu = new Menu();
|
||||
|
||||
let item = null;
|
||||
if (itemType === BaseModel.TYPE_FOLDER) {
|
||||
item = BaseModel.byId(this.props.folders, itemId);
|
||||
}
|
||||
|
||||
menu.append(new MenuItem({label: _('Delete'), click: async () => {
|
||||
const ok = bridge().showConfirmMessageBox(deleteMessage);
|
||||
if (!ok) return;
|
||||
@@ -123,11 +128,11 @@ class SideBarComponent extends React.Component {
|
||||
}
|
||||
}}))
|
||||
|
||||
if (itemType === BaseModel.TYPE_FOLDER) {
|
||||
if (itemType === BaseModel.TYPE_FOLDER && !item.encryption_applied) {
|
||||
menu.append(new MenuItem({label: _('Rename'), click: async () => {
|
||||
this.props.dispatch({
|
||||
type: 'WINDOW_COMMAND',
|
||||
name: 'renameNotebook',
|
||||
name: 'renameFolder',
|
||||
id: itemId,
|
||||
});
|
||||
}}))
|
||||
@@ -180,6 +185,8 @@ class SideBarComponent extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
const itemTitle = Folder.displayTitle(folder);
|
||||
|
||||
return <a
|
||||
className="list-item"
|
||||
onDragOver={(event) => { onDragOver(event, folder) } }
|
||||
@@ -189,14 +196,14 @@ class SideBarComponent extends React.Component {
|
||||
data-type={BaseModel.TYPE_FOLDER}
|
||||
onContextMenu={(event) => this.itemContextMenu(event)}
|
||||
key={folder.id}
|
||||
style={style} onClick={() => {this.folderItem_click(folder)}}>{folder.title}
|
||||
style={style} onClick={() => {this.folderItem_click(folder)}}>{itemTitle}
|
||||
</a>
|
||||
}
|
||||
|
||||
tagItem(tag, selected) {
|
||||
let style = Object.assign({}, this.style().listItem);
|
||||
if (selected) style = Object.assign(style, this.style().listItemSelected);
|
||||
return <a className="list-item" href="#" data-id={tag.id} data-type={BaseModel.TYPE_TAG} onContextMenu={(event) => this.itemContextMenu(event)} key={tag.id} style={style} onClick={() => {this.tagItem_click(tag)}}>{tag.title}</a>
|
||||
return <a className="list-item" href="#" data-id={tag.id} data-type={BaseModel.TYPE_TAG} onContextMenu={(event) => this.itemContextMenu(event)} key={tag.id} style={style} onClick={() => {this.tagItem_click(tag)}}>{Tag.displayTitle(tag)}</a>
|
||||
}
|
||||
|
||||
searchItem(search, selected) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const React = require('react');
|
||||
const { connect } = require('react-redux');
|
||||
const { reg } = require('lib/registry.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { bridge } = require('electron').remote.require('./bridge');
|
||||
const { Header } = require('./Header.min.js');
|
||||
const { themeStyle } = require('../theme.js');
|
||||
@@ -70,7 +70,9 @@ class StatusScreenComponent extends React.Component {
|
||||
|
||||
for (let n in section.body) {
|
||||
if (!section.body.hasOwnProperty(n)) continue;
|
||||
itemsHtml.push(<div style={theme.textStyle} key={'item_' + n}>{section.body[n]}</div>);
|
||||
let text = section.body[n];
|
||||
if (!text) text = '\xa0';
|
||||
itemsHtml.push(<div style={theme.textStyle} key={'item_' + n}>{text}</div>);
|
||||
}
|
||||
|
||||
return (
|
||||
|
33
ElectronClient/app/gui/dialogs.js
Normal file
33
ElectronClient/app/gui/dialogs.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const smalltalk = require('smalltalk');
|
||||
|
||||
class Dialogs {
|
||||
|
||||
async alert(message, title = '') {
|
||||
await smalltalk.alert(title, message);
|
||||
}
|
||||
|
||||
async confirm(message, title = '') {
|
||||
try {
|
||||
await smalltalk.confirm(title, message);
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
async prompt(message, title = '', defaultValue = '', options = null) {
|
||||
if (options === null) options = {};
|
||||
|
||||
try {
|
||||
const answer = await smalltalk.prompt(title, message, defaultValue, options);
|
||||
return answer;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const dialogs = new Dialogs();
|
||||
|
||||
module.exports = dialogs;
|
@@ -6,6 +6,18 @@
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="node_modules/react-datetime/css/react-datetime.css">
|
||||
<link rel="stylesheet" href="node_modules/smalltalk/css/smalltalk.css">
|
||||
<style>
|
||||
.smalltalk {
|
||||
background-color: rgba(0,0,0,.5);
|
||||
}
|
||||
.smalltalk input {
|
||||
margin-top: 1em;
|
||||
}
|
||||
.smalltalk .page {
|
||||
max-width: 30em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="react-root"></div>
|
||||
|
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
1
ElectronClient/app/locales/es_ES.json
Normal file
1
ElectronClient/app/locales/es_ES.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
ElectronClient/app/locales/hr_HR.json
Normal file
1
ElectronClient/app/locales/hr_HR.json
Normal file
File diff suppressed because one or more lines are too long
@@ -2,5 +2,12 @@ var locales = {};
|
||||
locales['en_GB'] = require('./en_GB.json');
|
||||
locales['de_DE'] = require('./de_DE.json');
|
||||
locales['es_CR'] = require('./es_CR.json');
|
||||
locales['es_ES'] = require('./es_ES.json');
|
||||
locales['fr_FR'] = require('./fr_FR.json');
|
||||
locales['hr_HR'] = require('./hr_HR.json');
|
||||
locales['it_IT'] = require('./it_IT.json');
|
||||
locales['ja_JP'] = require('./ja_JP.json');
|
||||
locales['pt_BR'] = require('./pt_BR.json');
|
||||
locales['ru_RU'] = require('./ru_RU.json');
|
||||
locales['zh_CN'] = require('./zh_CN.json');
|
||||
module.exports = { locales: locales };
|
1
ElectronClient/app/locales/it_IT.json
Normal file
1
ElectronClient/app/locales/it_IT.json
Normal file
File diff suppressed because one or more lines are too long
1
ElectronClient/app/locales/ja_JP.json
Normal file
1
ElectronClient/app/locales/ja_JP.json
Normal file
File diff suppressed because one or more lines are too long
1
ElectronClient/app/locales/pt_BR.json
Normal file
1
ElectronClient/app/locales/pt_BR.json
Normal file
File diff suppressed because one or more lines are too long
1
ElectronClient/app/locales/ru_RU.json
Normal file
1
ElectronClient/app/locales/ru_RU.json
Normal file
File diff suppressed because one or more lines are too long
1
ElectronClient/app/locales/zh_CN.json
Normal file
1
ElectronClient/app/locales/zh_CN.json
Normal file
File diff suppressed because one or more lines are too long
@@ -4,21 +4,24 @@
|
||||
require('app-module-path').addPath(__dirname);
|
||||
|
||||
const { app } = require('./app.js');
|
||||
const { Folder } = require('lib/models/folder.js');
|
||||
const { Resource } = require('lib/models/resource.js');
|
||||
const { BaseItem } = require('lib/models/base-item.js');
|
||||
const { Note } = require('lib/models/note.js');
|
||||
const { Tag } = require('lib/models/tag.js');
|
||||
const { NoteTag } = require('lib/models/note-tag.js');
|
||||
const { Setting } = require('lib/models/setting.js');
|
||||
const Folder = require('lib/models/Folder.js');
|
||||
const Resource = require('lib/models/Resource.js');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
const Note = require('lib/models/Note.js');
|
||||
const Tag = require('lib/models/Tag.js');
|
||||
const NoteTag = require('lib/models/NoteTag.js');
|
||||
const MasterKey = require('lib/models/MasterKey');
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { Logger } = require('lib/logger.js');
|
||||
const { FsDriverNode } = require('lib/fs-driver-node.js');
|
||||
const { shimInit } = require('lib/shim-init-node.js');
|
||||
const EncryptionService = require('lib/services/EncryptionService');
|
||||
const { bridge } = require('electron').remote.require('./bridge');
|
||||
|
||||
const fsDriver = new FsDriverNode();
|
||||
Logger.fsDriver_ = fsDriver;
|
||||
Resource.fsDriver_ = fsDriver;
|
||||
EncryptionService.fsDriver_ = fsDriver;
|
||||
|
||||
// That's not good, but it's to avoid circular dependency issues
|
||||
// in the BaseItem class.
|
||||
@@ -27,10 +30,13 @@ BaseItem.loadClass('Folder', Folder);
|
||||
BaseItem.loadClass('Resource', Resource);
|
||||
BaseItem.loadClass('Tag', Tag);
|
||||
BaseItem.loadClass('NoteTag', NoteTag);
|
||||
BaseItem.loadClass('MasterKey', MasterKey);
|
||||
|
||||
Setting.setConstant('appId', 'net.cozic.joplin-desktop');
|
||||
Setting.setConstant('appType', 'desktop');
|
||||
|
||||
shimInit();
|
||||
|
||||
// Disable drag and drop of links inside application (which would
|
||||
// open it as if the whole app was a browser)
|
||||
document.addEventListener('dragover', event => event.preventDefault());
|
||||
@@ -44,8 +50,6 @@ document.addEventListener('auxclick', event => event.preventDefault());
|
||||
// which would open a new browser window.
|
||||
document.addEventListener('click', (event) => event.preventDefault());
|
||||
|
||||
shimInit();
|
||||
|
||||
app().start(bridge().processArgv()).then(() => {
|
||||
require('./gui/Root.min.js');
|
||||
}).catch((error) => {
|
||||
|
982
ElectronClient/app/package-lock.json
generated
982
ElectronClient/app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Joplin",
|
||||
"version": "0.10.38",
|
||||
"version": "0.10.41",
|
||||
"description": "Joplin for Desktop",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
@@ -57,7 +57,7 @@
|
||||
"electron-window-state": "^4.1.1",
|
||||
"follow-redirects": "^1.2.5",
|
||||
"form-data": "^2.3.1",
|
||||
"fs-extra": "^4.0.2",
|
||||
"fs-extra": "^5.0.0",
|
||||
"highlight.js": "^9.12.0",
|
||||
"html-entities": "^1.2.1",
|
||||
"jssha": "^2.3.1",
|
||||
@@ -78,6 +78,7 @@
|
||||
"react-redux": "^5.0.6",
|
||||
"redux": "^3.7.2",
|
||||
"sharp": "^0.18.4",
|
||||
"smalltalk": "^2.5.1",
|
||||
"sprintf-js": "^1.1.1",
|
||||
"sqlite3": "^3.1.13",
|
||||
"string-padding": "^1.0.2",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user