1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Doc building

This commit is contained in:
Laurent Cozic 2017-07-27 23:59:34 +01:00
parent d62aca7f50
commit eb5d131620
29 changed files with 520 additions and 56 deletions

141
CliClient/app/build-doc.js Normal file
View File

@ -0,0 +1,141 @@
require('source-map-support').install();
require('babel-plugin-transform-runtime');
import fs from 'fs-extra';
import { fileExtension, basename, dirname } from 'lib/path-utils.js';
import wrap_ from 'word-wrap';
import { _, setLocale, languageCode } from 'lib/locale.js';
const rootDir = dirname(dirname(__dirname));
const MAX_WIDTH = 78;
const INDENT = ' ';
function wrap(text, indent) {
return wrap_(text, {
width: MAX_WIDTH - indent.length,
indent: indent,
});
}
function renderOptions(options) {
let output = [];
const optionColWidth = getOptionColWidth(options);
for (let i = 0; i < options.length; i++) {
let option = options[i];
const flag = option[0];
const indent = INDENT + INDENT + ' '.repeat(optionColWidth + 2);
let r = wrap(option[1], indent);
r = r.substr(flag.length + (INDENT + INDENT).length);
r = INDENT + INDENT + flag + r;
output.push(r);
}
return output.join("\n");
}
function renderCommand(cmd) {
let output = [];
output.push(INDENT + cmd.usage());
output.push('');
output.push(wrap(cmd.description(), INDENT + INDENT));
const optionString = renderOptions(cmd.options());
if (optionString) {
output.push('');
output.push(optionString);
}
return output.join("\n");
}
function getCommands() {
let output = [];
fs.readdirSync(__dirname).forEach((path) => {
if (path.indexOf('command-') !== 0) return;
const ext = fileExtension(path)
if (ext != 'js') return;
let CommandClass = require('./' + path);
let cmd = new CommandClass();
if (!cmd.enabled()) return;
output.push(cmd);
});
return output;
}
function getOptionColWidth(options) {
let output = 0;
for (let j = 0; j < options.length; j++) {
const option = options[j];
if (option[0].length > output) output = option[0].length;
}
return output;
}
function getHeader() {
let output = [];
output.push(_('NAME'));
output.push('');
output.push(wrap(_('joplin - a note taking and todo app with synchronisation capabilities'), INDENT));
output.push('');
output.push(_('DESCRIPTION'));
output.push('');
let description = [];
description.push(_('Joplin is a note taking and todo application, which can handle a large number of notes organised into notebooks.'));
description.push(_('The notes are searchable, can be copied, tagged and modified with your own text editor.'));
description.push("\n\n");
description.push(_('The notes can be synchronised with various target including the file system (for example with a network directory) or with Microsoft OneDrive.'));
description.push("\n\n");
description.push(_('Notes exported from Evenotes via .enex files can be imported into Joplin, including the formatted content, resources (images, attachments, etc.) and complete metadata (geolocation, updated time, created time, etc.).'));
output.push(wrap(description.join(''), INDENT));
return output.join("\n");
}
function getFooter() {
let output = [];
output.push(_('WEBSITE'));
output.push('');
output.push(INDENT + 'https://joplin.cozic.net');
output.push('');
output.push(_('LICENSE'));
output.push('');
let filePath = rootDir + '/LICENSE_' + languageCode();
if (!fs.existsSync(filePath)) filePath = rootDir + '/LICENSE';
const licenseText = fs.readFileSync(filePath, 'utf8');
output.push(wrap(licenseText, INDENT));
return output.join("\n");
}
async function main() {
// setLocale('fr_FR');
const commands = getCommands();
let commandBlocks = [];
for (let i = 0; i < commands.length; i++) {
let cmd = commands[i];
commandBlocks.push(renderCommand(cmd));
}
const headerText = getHeader();
const commandsText = commandBlocks.join("\n\n");
const footerText = getFooter();
console.info(headerText + "\n\n" + _('USAGE') + "\n\n" + commandsText + "\n\n" + footerText);
}
main().catch((error) => {
console.error(error);
});

View File

@ -9,7 +9,7 @@ import { autocompleteItems } from './autocomplete.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'cat <title>'; return _('cat <title>');
} }
description() { description() {

View File

@ -6,7 +6,7 @@ import { Setting } from 'lib/models/setting.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'config [name] [value]'; return _('config [name] [value]');
} }
description() { description() {

View File

@ -9,7 +9,7 @@ import { autocompleteItems } from './autocomplete.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'cp <pattern> [notebook]'; return _('cp <pattern> [notebook]');
} }
description() { description() {

View File

@ -12,7 +12,7 @@ import { autocompleteItems } from './autocomplete.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'edit <title>'; return _('edit <title>');
} }
description() { description() {

View File

@ -9,7 +9,7 @@ import { autocompleteItems } from './autocomplete.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'geoloc <title>'; return _('geoloc <title>');
} }
description() { description() {

View File

@ -9,7 +9,7 @@ import { filename, basename } from 'lib/path-utils.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'import-enex <file> [notebook]'; return _('import-enex <file> [notebook]');
} }
description() { description() {

View File

@ -12,7 +12,7 @@ import { vorpalUtils } from './vorpal-utils.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'ls [pattern]'; return _('ls [pattern]');
} }
description() { description() {
@ -21,11 +21,11 @@ class Command extends BaseCommand {
options() { options() {
return [ return [
['-n, --limit <num>', _('Displays only the first top <num> notes.')], [_('-n, --limit <num>'), _('Displays only the first top <num> notes.')],
['-s, --sort <field>', _('Sorts the item by <field> (eg. title, updated_time, created_time).')], [_('-s, --sort <field>'), _('Sorts the item by <field> (eg. title, updated_time, created_time).')],
['-r, --reverse', _('Reverses the sorting order.')], ['-r, --reverse', _('Reverses the sorting order.')],
['-t, --type <type>', _('Displays only the items of the specific type(s). Can be `n` for notes, `t` for todos, or `nt` for notes and todos (eg. `-tt` would display only the todos, while `-ttd` would display notes and todos.')], [_('-t, --type <type>'), _('Displays only the items of the specific type(s). Can be `n` for notes, `t` for todos, or `nt` for notes and todos (eg. `-tt` would display only the todos, while `-ttd` would display notes and todos.')],
['-f, --format <format>', _('Either "text" or "json"')], [_('-f, --format <format>'), _('Either "text" or "json"')],
['-l, --long', _('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for todos), TITLE')], ['-l, --long', _('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for todos), TITLE')],
]; ];
} }

View File

@ -7,7 +7,7 @@ import { reg } from 'lib/registry.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'mkbook <notebook>'; return _('mkbook <notebook>');
} }
description() { description() {

View File

@ -7,7 +7,7 @@ import { reg } from 'lib/registry.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'mknote <note>'; return _('mknote <note>');
} }
description() { description() {

View File

@ -9,7 +9,7 @@ import { autocompleteItems } from './autocomplete.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'mv <pattern> <destination>'; return _('mv <pattern> <destination>');
} }
description() { description() {

View File

@ -11,7 +11,7 @@ import { vorpalUtils } from './vorpal-utils.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'rm <pattern>'; return _('rm <pattern>');
} }
description() { description() {

View File

@ -12,7 +12,7 @@ import { vorpalUtils } from './vorpal-utils.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'search <pattern> [notebook]'; return _('search <pattern> [notebook]');
} }
description() { description() {

View File

@ -10,7 +10,7 @@ import { autocompleteItems } from './autocomplete.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'set <note> <name> [value]'; return _('set <note> <name> [value]');
} }
description() { description() {

View File

@ -30,7 +30,7 @@ class Command extends BaseCommand {
options() { options() {
return [ return [
['--target <target>', _('Sync to provided target (defaults to sync.target config value)')], [_('--target <target>'), _('Sync to provided target (defaults to sync.target config value)')],
['--random-failures', 'For debugging purposes. Do not use.'], ['--random-failures', 'For debugging purposes. Do not use.'],
]; ];
} }

View File

@ -7,7 +7,7 @@ import { BaseModel } from 'lib/base-model.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'tag <command> [tag] [note]'; return _('tag <command> [tag] [note]');
} }
description() { description() {

View File

@ -10,7 +10,7 @@ import { autocompleteItems } from './autocomplete.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'todo <action> <pattern>'; return _('todo <action> <pattern>');
} }
description() { description() {

View File

@ -8,7 +8,7 @@ import { autocompleteFolders } from './autocomplete.js';
class Command extends BaseCommand { class Command extends BaseCommand {
usage() { usage() {
return 'use <notebook>'; return _('use <notebook>');
} }
description() { description() {

View File

@ -49,6 +49,48 @@ msgstr ""
msgid "No notebook is defined. Create one with `mkbook <notebook>`." msgid "No notebook is defined. Create one with `mkbook <notebook>`."
msgstr "" msgstr ""
msgid "NAME"
msgstr ""
msgid "joplin - a note taking and todo app with synchronisation capabilities"
msgstr ""
msgid "DESCRIPTION"
msgstr ""
msgid ""
"Joplin is a note taking and todo application, which can handle a large "
"number of notes organised into notebooks."
msgstr ""
msgid ""
"The notes are searchable, can be copied, tagged and modified with your own "
"text editor."
msgstr ""
msgid ""
"The notes can be synchronised with various target including the file system "
"(for example with a network directory) or with Microsoft OneDrive."
msgstr ""
msgid ""
"Notes exported from Evenotes via .enex files can be imported into Joplin, "
"including the formatted content, resources (images, attachments, etc.) and "
"complete metadata (geolocation, updated time, created time, etc.)."
msgstr ""
msgid "WEBSITE"
msgstr ""
msgid "LICENSE"
msgstr ""
msgid "USAGE"
msgstr ""
msgid "cat <title>"
msgstr ""
msgid "Displays the given note." msgid "Displays the given note."
msgstr "" msgstr ""
@ -59,6 +101,9 @@ msgstr ""
msgid "Cannot find \"%s\"." msgid "Cannot find \"%s\"."
msgstr "" msgstr ""
msgid "config [name] [value]"
msgstr ""
msgid "" msgid ""
"Gets or sets a config value. If [value] is not provided, it will show the " "Gets or sets a config value. If [value] is not provided, it will show the "
"value of [name]. If neither [name] nor [value] is provided, it will list the " "value of [name]. If neither [name] nor [value] is provided, it will list the "
@ -76,11 +121,17 @@ msgstr ""
msgid "%s = %s" msgid "%s = %s"
msgstr "" msgstr ""
msgid "cp <pattern> [notebook]"
msgstr ""
msgid "" msgid ""
"Duplicates the notes matching <pattern> to [notebook]. If no notebook is " "Duplicates the notes matching <pattern> to [notebook]. If no notebook is "
"specified the note is duplicated in the current notebook." "specified the note is duplicated in the current notebook."
msgstr "" msgstr ""
msgid "edit <title>"
msgstr ""
msgid "Edit note." msgid "Edit note."
msgstr "" msgstr ""
@ -101,9 +152,15 @@ msgstr ""
msgid "Starting to edit note. Close the editor to get back to the prompt." msgid "Starting to edit note. Close the editor to get back to the prompt."
msgstr "" msgstr ""
msgid "geoloc <title>"
msgstr ""
msgid "Displays a geolocation URL for the note." msgid "Displays a geolocation URL for the note."
msgstr "" msgstr ""
msgid "import-enex <file> [notebook]"
msgstr ""
msgid "Imports an Evernote notebook file (.enex file)." msgid "Imports an Evernote notebook file (.enex file)."
msgstr "" msgstr ""
@ -145,26 +202,41 @@ msgstr ""
msgid "Importing notes..." msgid "Importing notes..."
msgstr "" msgstr ""
msgid "ls [pattern]"
msgstr ""
msgid "" msgid ""
"Displays the notes in [notebook]. Use `ls /` to display the list of " "Displays the notes in [notebook]. Use `ls /` to display the list of "
"notebooks." "notebooks."
msgstr "" msgstr ""
msgid "-n, --limit <num>"
msgstr ""
msgid "Displays only the first top <num> notes." msgid "Displays only the first top <num> notes."
msgstr "" msgstr ""
msgid "-s, --sort <field>"
msgstr ""
msgid "Sorts the item by <field> (eg. title, updated_time, created_time)." msgid "Sorts the item by <field> (eg. title, updated_time, created_time)."
msgstr "" msgstr ""
msgid "Reverses the sorting order." msgid "Reverses the sorting order."
msgstr "" msgstr ""
msgid "-t, --type <type>"
msgstr ""
msgid "" msgid ""
"Displays only the items of the specific type(s). Can be `n` for notes, `t` " "Displays only the items of the specific type(s). Can be `n` for notes, `t` "
"for todos, or `nt` for notes and todos (eg. `-tt` would display only the " "for todos, or `nt` for notes and todos (eg. `-tt` would display only the "
"todos, while `-ttd` would display notes and todos." "todos, while `-ttd` would display notes and todos."
msgstr "" msgstr ""
msgid "-f, --format <format>"
msgstr ""
msgid "Either \"text\" or \"json\"" msgid "Either \"text\" or \"json\""
msgstr "" msgstr ""
@ -176,21 +248,33 @@ msgstr ""
msgid "Please select a notebook first." msgid "Please select a notebook first."
msgstr "" msgstr ""
msgid "mkbook <notebook>"
msgstr ""
msgid "Creates a new notebook." msgid "Creates a new notebook."
msgstr "" msgstr ""
msgid "mknote <note>"
msgstr ""
msgid "Creates a new note." msgid "Creates a new note."
msgstr "" msgstr ""
msgid "Notes can only be created within a notebook." msgid "Notes can only be created within a notebook."
msgstr "" msgstr ""
msgid "mv <pattern> <destination>"
msgstr ""
msgid "" msgid ""
"Moves the notes matching <pattern> to <destination>. If <pattern> is a note, " "Moves the notes matching <pattern> to <destination>. If <pattern> is a note, "
"it will be moved to the notebook <destination>. If <pattern> is a notebook, " "it will be moved to the notebook <destination>. If <pattern> is a notebook, "
"it will be renamed to <destination>." "it will be renamed to <destination>."
msgstr "" msgstr ""
msgid "rm <pattern>"
msgstr ""
msgid "Deletes the items matching <pattern>." msgid "Deletes the items matching <pattern>."
msgstr "" msgstr ""
@ -208,9 +292,15 @@ msgstr ""
msgid "%d notes match this pattern. Delete them?" msgid "%d notes match this pattern. Delete them?"
msgstr "" msgstr ""
msgid "search <pattern> [notebook]"
msgstr ""
msgid "Searches for the given <pattern> in all the notes." msgid "Searches for the given <pattern> in all the notes."
msgstr "" msgstr ""
msgid "set <note> <name> [value]"
msgstr ""
msgid "Sets the property <name> of the given <note> to the given [value]." msgid "Sets the property <name> of the given <note> to the given [value]."
msgstr "" msgstr ""
@ -220,6 +310,9 @@ msgstr ""
msgid "Synchronises with remote storage." msgid "Synchronises with remote storage."
msgstr "" msgstr ""
msgid "--target <target>"
msgstr ""
msgid "Sync to provided target (defaults to sync.target config value)" msgid "Sync to provided target (defaults to sync.target config value)"
msgstr "" msgstr ""
@ -242,6 +335,9 @@ msgstr ""
msgid "Cancelling..." msgid "Cancelling..."
msgstr "" msgstr ""
msgid "tag <command> [tag] [note]"
msgstr ""
msgid "" msgid ""
"<command> can be \"add\", \"remove\" or \"list\" to assign or remove [tag] " "<command> can be \"add\", \"remove\" or \"list\" to assign or remove [tag] "
"from [note], or to list the notes associated with [tag]. The command `tag " "from [note], or to list the notes associated with [tag]. The command `tag "
@ -252,6 +348,9 @@ msgstr ""
msgid "Invalid command: \"%s\"" msgid "Invalid command: \"%s\""
msgstr "" msgstr ""
msgid "todo <action> <pattern>"
msgstr ""
msgid "" msgid ""
"<action> can either be \"toggle\" or \"clear\". Use \"toggle\" to toggle the " "<action> can either be \"toggle\" or \"clear\". Use \"toggle\" to toggle the "
"given todo between completed and uncompleted state (If the target is a " "given todo between completed and uncompleted state (If the target is a "
@ -259,6 +358,9 @@ msgid ""
"todo back to a regular note." "todo back to a regular note."
msgstr "" msgstr ""
msgid "use <notebook>"
msgstr ""
msgid "" msgid ""
"Switches to [notebook] - all further operations will happen within this " "Switches to [notebook] - all further operations will happen within this "
"notebook." "notebook."
@ -464,6 +566,9 @@ msgstr ""
msgid "Edit notebook" msgid "Edit notebook"
msgstr "" msgstr ""
msgid "Refresh"
msgstr ""
msgid "Untitled" msgid "Untitled"
msgstr "" msgstr ""

View File

@ -51,6 +51,48 @@ msgstr "Quitter le logiciel."
msgid "No notebook is defined. Create one with `mkbook <notebook>`." msgid "No notebook is defined. Create one with `mkbook <notebook>`."
msgstr "Aucun carnet n'est défini. Créez-en un avec `mkbook <carnet>`." msgstr "Aucun carnet n'est défini. Créez-en un avec `mkbook <carnet>`."
msgid "NAME"
msgstr ""
msgid "joplin - a note taking and todo app with synchronisation capabilities"
msgstr ""
msgid "DESCRIPTION"
msgstr ""
msgid ""
"Joplin is a note taking and todo application, which can handle a large "
"number of notes organised into notebooks."
msgstr ""
msgid ""
"The notes are searchable, can be copied, tagged and modified with your own "
"text editor."
msgstr ""
msgid ""
"The notes can be synchronised with various target including the file system "
"(for example with a network directory) or with Microsoft OneDrive."
msgstr ""
msgid ""
"Notes exported from Evenotes via .enex files can be imported into Joplin, "
"including the formatted content, resources (images, attachments, etc.) and "
"complete metadata (geolocation, updated time, created time, etc.)."
msgstr ""
msgid "WEBSITE"
msgstr ""
msgid "LICENSE"
msgstr ""
msgid "USAGE"
msgstr ""
msgid "cat <title>"
msgstr "cat <titre>"
msgid "Displays the given note." msgid "Displays the given note."
msgstr "Affiche la note." msgstr "Affiche la note."
@ -61,6 +103,9 @@ msgstr "Affiche tous les détails de la note."
msgid "Cannot find \"%s\"." msgid "Cannot find \"%s\"."
msgstr "Impossible de trouver \"%s\"." msgstr "Impossible de trouver \"%s\"."
msgid "config [name] [value]"
msgstr "config [nom] [valeur]"
msgid "" msgid ""
"Gets or sets a config value. If [value] is not provided, it will show the " "Gets or sets a config value. If [value] is not provided, it will show the "
"value of [name]. If neither [name] nor [value] is provided, it will list the " "value of [name]. If neither [name] nor [value] is provided, it will list the "
@ -81,6 +126,9 @@ msgstr "%s = %s (%s)"
msgid "%s = %s" msgid "%s = %s"
msgstr "%s = %s" msgstr "%s = %s"
msgid "cp <pattern> [notebook]"
msgstr "cp <nom> [carnet]"
msgid "" msgid ""
"Duplicates the notes matching <pattern> to [notebook]. If no notebook is " "Duplicates the notes matching <pattern> to [notebook]. If no notebook is "
"specified the note is duplicated in the current notebook." "specified the note is duplicated in the current notebook."
@ -88,6 +136,9 @@ msgstr ""
"Copie les notes correspondant à [nom] vers [carnet]. Si aucun carnet n'est " "Copie les notes correspondant à [nom] vers [carnet]. Si aucun carnet n'est "
"spécifié, la note est dupliqué sur place." "spécifié, la note est dupliqué sur place."
msgid "edit <title>"
msgstr "edit <titre>"
msgid "Edit note." msgid "Edit note."
msgstr "Editer la note." msgstr "Editer la note."
@ -112,9 +163,16 @@ msgstr ""
"Edition de la note en cours. Fermez l'éditeur de texte pour retourner à " "Edition de la note en cours. Fermez l'éditeur de texte pour retourner à "
"l'invite de commande." "l'invite de commande."
#, fuzzy
msgid "geoloc <title>"
msgstr "cat <titre>"
msgid "Displays a geolocation URL for the note." msgid "Displays a geolocation URL for the note."
msgstr "Afficher l'URL de l'emplacement de la note." msgstr "Afficher l'URL de l'emplacement de la note."
msgid "import-enex <file> [notebook]"
msgstr "import-enex <fichier> [carnet]"
msgid "Imports an Evernote notebook file (.enex file)." msgid "Imports an Evernote notebook file (.enex file)."
msgstr "Importer un carnet Evernote (fichier .enex)." msgstr "Importer un carnet Evernote (fichier .enex)."
@ -156,6 +214,9 @@ msgstr "Etiquettes : %d."
msgid "Importing notes..." msgid "Importing notes..."
msgstr "Importation des notes..." msgstr "Importation des notes..."
msgid "ls [pattern]"
msgstr "ls [motif]"
msgid "" msgid ""
"Displays the notes in [notebook]. Use `ls /` to display the list of " "Displays the notes in [notebook]. Use `ls /` to display the list of "
"notebooks." "notebooks."
@ -163,9 +224,15 @@ msgstr ""
"Affiche les notes dans le carnet. Utilisez `ls /` pour afficher la liste des " "Affiche les notes dans le carnet. Utilisez `ls /` pour afficher la liste des "
"carnets." "carnets."
msgid "-n, --limit <num>"
msgstr ""
msgid "Displays only the first top <num> notes." msgid "Displays only the first top <num> notes."
msgstr "Affiche uniquement les <num> premières notes." msgstr "Affiche uniquement les <num> premières notes."
msgid "-s, --sort <field>"
msgstr ""
msgid "Sorts the item by <field> (eg. title, updated_time, created_time)." msgid "Sorts the item by <field> (eg. title, updated_time, created_time)."
msgstr "" msgstr ""
"Trier les notes par <field> (par exemple, title, updated_time, created_time)." "Trier les notes par <field> (par exemple, title, updated_time, created_time)."
@ -173,6 +240,9 @@ msgstr ""
msgid "Reverses the sorting order." msgid "Reverses the sorting order."
msgstr "Inverser l'ordre." msgstr "Inverser l'ordre."
msgid "-t, --type <type>"
msgstr ""
msgid "" msgid ""
"Displays only the items of the specific type(s). Can be `n` for notes, `t` " "Displays only the items of the specific type(s). Can be `n` for notes, `t` "
"for todos, or `nt` for notes and todos (eg. `-tt` would display only the " "for todos, or `nt` for notes and todos (eg. `-tt` would display only the "
@ -182,6 +252,9 @@ msgstr ""
"`n` pour les notes, `t` pour les tâches (par exemple, `-tt` affiche " "`n` pour les notes, `t` pour les tâches (par exemple, `-tt` affiche "
"uniquement les tâches, tandis que `-ttd` affiche les notes et les tâches)." "uniquement les tâches, tandis que `-ttd` affiche les notes et les tâches)."
msgid "-f, --format <format>"
msgstr ""
msgid "Either \"text\" or \"json\"" msgid "Either \"text\" or \"json\""
msgstr "Soit \"text\" soit \"json\"" msgstr "Soit \"text\" soit \"json\""
@ -195,15 +268,24 @@ msgstr ""
msgid "Please select a notebook first." msgid "Please select a notebook first."
msgstr "Veuillez d'abord sélectionner un carnet." msgstr "Veuillez d'abord sélectionner un carnet."
msgid "mkbook <notebook>"
msgstr "mkbook <carnet>"
msgid "Creates a new notebook." msgid "Creates a new notebook."
msgstr "Créer un carnet." msgstr "Créer un carnet."
msgid "mknote <note>"
msgstr "mknote <note>"
msgid "Creates a new note." msgid "Creates a new note."
msgstr "Créer une note." msgstr "Créer une note."
msgid "Notes can only be created within a notebook." msgid "Notes can only be created within a notebook."
msgstr "Les notes ne peuvent être créées que dans un carnet." msgstr "Les notes ne peuvent être créées que dans un carnet."
msgid "mv <pattern> <destination>"
msgstr "mv <motif> <destination>"
msgid "" msgid ""
"Moves the notes matching <pattern> to <destination>. If <pattern> is a note, " "Moves the notes matching <pattern> to <destination>. If <pattern> is a note, "
"it will be moved to the notebook <destination>. If <pattern> is a notebook, " "it will be moved to the notebook <destination>. If <pattern> is a notebook, "
@ -213,6 +295,9 @@ msgstr ""
"est une note, elle sera déplacée vers le carnet <destination>. Si <motif> " "est une note, elle sera déplacée vers le carnet <destination>. Si <motif> "
"est un carnet, il sera renommé <destination>." "est un carnet, il sera renommé <destination>."
msgid "rm <pattern>"
msgstr "rm <motif>"
msgid "Deletes the items matching <pattern>." msgid "Deletes the items matching <pattern>."
msgstr "Supprime les objets correspondants à <motif>." msgstr "Supprime les objets correspondants à <motif>."
@ -230,9 +315,17 @@ msgstr "Supprimer le carnet \"%s\" ?"
msgid "%d notes match this pattern. Delete them?" msgid "%d notes match this pattern. Delete them?"
msgstr "%d notes correspondent à ce motif. Les supprimer ?" msgstr "%d notes correspondent à ce motif. Les supprimer ?"
#, fuzzy
msgid "search <pattern> [notebook]"
msgstr "cp <nom> [carnet]"
msgid "Searches for the given <pattern> in all the notes." msgid "Searches for the given <pattern> in all the notes."
msgstr "Chercher le motif <pattern> dans toutes les notes." msgstr "Chercher le motif <pattern> dans toutes les notes."
#, fuzzy
msgid "set <note> <name> [value]"
msgstr "config [nom] [valeur]"
msgid "Sets the property <name> of the given <note> to the given [value]." msgid "Sets the property <name> of the given <note> to the given [value]."
msgstr "Assigner la valeur [value] à la propriété <name> de la <note> donnée." msgstr "Assigner la valeur [value] à la propriété <name> de la <note> donnée."
@ -242,6 +335,9 @@ msgstr "Afficher un résumé des notes et carnets."
msgid "Synchronises with remote storage." msgid "Synchronises with remote storage."
msgstr "Synchroniser les notes et carnets." msgstr "Synchroniser les notes et carnets."
msgid "--target <target>"
msgstr ""
msgid "Sync to provided target (defaults to sync.target config value)" msgid "Sync to provided target (defaults to sync.target config value)"
msgstr "" msgstr ""
"Synchroniser avec la cible donnée (par défaut, la valeur de configuration " "Synchroniser avec la cible donnée (par défaut, la valeur de configuration "
@ -266,6 +362,9 @@ msgstr "Terminé."
msgid "Cancelling..." msgid "Cancelling..."
msgstr "Annulation..." msgstr "Annulation..."
msgid "tag <command> [tag] [note]"
msgstr ""
msgid "" msgid ""
"<command> can be \"add\", \"remove\" or \"list\" to assign or remove [tag] " "<command> can be \"add\", \"remove\" or \"list\" to assign or remove [tag] "
"from [note], or to list the notes associated with [tag]. The command `tag " "from [note], or to list the notes associated with [tag]. The command `tag "
@ -280,6 +379,9 @@ msgstr ""
msgid "Invalid command: \"%s\"" msgid "Invalid command: \"%s\""
msgstr "Commande invalide : \"%s\"" msgstr "Commande invalide : \"%s\""
msgid "todo <action> <pattern>"
msgstr ""
#, fuzzy #, fuzzy
msgid "" msgid ""
"<action> can either be \"toggle\" or \"clear\". Use \"toggle\" to toggle the " "<action> can either be \"toggle\" or \"clear\". Use \"toggle\" to toggle the "
@ -292,6 +394,10 @@ msgstr ""
"terminé (Si la cible est une note, elle sera convertie en tâche). Utilisez " "terminé (Si la cible est une note, elle sera convertie en tâche). Utilisez "
"\"clear\" pour convertir la tâche en note." "\"clear\" pour convertir la tâche en note."
#, fuzzy
msgid "use <notebook>"
msgstr "Nouveau carnet"
msgid "" msgid ""
"Switches to [notebook] - all further operations will happen within this " "Switches to [notebook] - all further operations will happen within this "
"notebook." "notebook."
@ -504,6 +610,9 @@ msgstr "Ce carnet n'a pas pu être sauvegardé : %s"
msgid "Edit notebook" msgid "Edit notebook"
msgstr "Editer le carnet" msgstr "Editer le carnet"
msgid "Refresh"
msgstr ""
msgid "Untitled" msgid "Untitled"
msgstr "Sans titre" msgstr "Sans titre"
@ -581,33 +690,3 @@ msgstr "Bienvenu"
#, fuzzy #, fuzzy
#~ msgid "Invalid command. Showing help:" #~ msgid "Invalid command. Showing help:"
#~ msgstr "Commande invalie : \"%s\"" #~ msgstr "Commande invalie : \"%s\""
#~ msgid "cat <title>"
#~ msgstr "cat <titre>"
#~ msgid "config [name] [value]"
#~ msgstr "config [nom] [valeur]"
#~ msgid "cp <pattern> [notebook]"
#~ msgstr "cp <nom> [carnet]"
#~ msgid "edit <title>"
#~ msgstr "edit <titre>"
#~ msgid "import-enex <file> [notebook]"
#~ msgstr "import-enex <fichier> [carnet]"
#~ msgid "ls [pattern]"
#~ msgstr "ls [motif]"
#~ msgid "mkbook <notebook>"
#~ msgstr "mkbook <carnet>"
#~ msgid "mknote <note>"
#~ msgstr "mknote <note>"
#~ msgid "mv <pattern> <destination>"
#~ msgstr "mv <motif> <destination>"
#~ msgid "rm <pattern>"
#~ msgstr "rm <motif>"

View File

@ -49,6 +49,48 @@ msgstr ""
msgid "No notebook is defined. Create one with `mkbook <notebook>`." msgid "No notebook is defined. Create one with `mkbook <notebook>`."
msgstr "" msgstr ""
msgid "NAME"
msgstr ""
msgid "joplin - a note taking and todo app with synchronisation capabilities"
msgstr ""
msgid "DESCRIPTION"
msgstr ""
msgid ""
"Joplin is a note taking and todo application, which can handle a large "
"number of notes organised into notebooks."
msgstr ""
msgid ""
"The notes are searchable, can be copied, tagged and modified with your own "
"text editor."
msgstr ""
msgid ""
"The notes can be synchronised with various target including the file system "
"(for example with a network directory) or with Microsoft OneDrive."
msgstr ""
msgid ""
"Notes exported from Evenotes via .enex files can be imported into Joplin, "
"including the formatted content, resources (images, attachments, etc.) and "
"complete metadata (geolocation, updated time, created time, etc.)."
msgstr ""
msgid "WEBSITE"
msgstr ""
msgid "LICENSE"
msgstr ""
msgid "USAGE"
msgstr ""
msgid "cat <title>"
msgstr ""
msgid "Displays the given note." msgid "Displays the given note."
msgstr "" msgstr ""
@ -59,6 +101,9 @@ msgstr ""
msgid "Cannot find \"%s\"." msgid "Cannot find \"%s\"."
msgstr "" msgstr ""
msgid "config [name] [value]"
msgstr ""
msgid "" msgid ""
"Gets or sets a config value. If [value] is not provided, it will show the " "Gets or sets a config value. If [value] is not provided, it will show the "
"value of [name]. If neither [name] nor [value] is provided, it will list the " "value of [name]. If neither [name] nor [value] is provided, it will list the "
@ -76,11 +121,17 @@ msgstr ""
msgid "%s = %s" msgid "%s = %s"
msgstr "" msgstr ""
msgid "cp <pattern> [notebook]"
msgstr ""
msgid "" msgid ""
"Duplicates the notes matching <pattern> to [notebook]. If no notebook is " "Duplicates the notes matching <pattern> to [notebook]. If no notebook is "
"specified the note is duplicated in the current notebook." "specified the note is duplicated in the current notebook."
msgstr "" msgstr ""
msgid "edit <title>"
msgstr ""
msgid "Edit note." msgid "Edit note."
msgstr "" msgstr ""
@ -101,9 +152,15 @@ msgstr ""
msgid "Starting to edit note. Close the editor to get back to the prompt." msgid "Starting to edit note. Close the editor to get back to the prompt."
msgstr "" msgstr ""
msgid "geoloc <title>"
msgstr ""
msgid "Displays a geolocation URL for the note." msgid "Displays a geolocation URL for the note."
msgstr "" msgstr ""
msgid "import-enex <file> [notebook]"
msgstr ""
msgid "Imports an Evernote notebook file (.enex file)." msgid "Imports an Evernote notebook file (.enex file)."
msgstr "" msgstr ""
@ -145,26 +202,41 @@ msgstr ""
msgid "Importing notes..." msgid "Importing notes..."
msgstr "" msgstr ""
msgid "ls [pattern]"
msgstr ""
msgid "" msgid ""
"Displays the notes in [notebook]. Use `ls /` to display the list of " "Displays the notes in [notebook]. Use `ls /` to display the list of "
"notebooks." "notebooks."
msgstr "" msgstr ""
msgid "-n, --limit <num>"
msgstr ""
msgid "Displays only the first top <num> notes." msgid "Displays only the first top <num> notes."
msgstr "" msgstr ""
msgid "-s, --sort <field>"
msgstr ""
msgid "Sorts the item by <field> (eg. title, updated_time, created_time)." msgid "Sorts the item by <field> (eg. title, updated_time, created_time)."
msgstr "" msgstr ""
msgid "Reverses the sorting order." msgid "Reverses the sorting order."
msgstr "" msgstr ""
msgid "-t, --type <type>"
msgstr ""
msgid "" msgid ""
"Displays only the items of the specific type(s). Can be `n` for notes, `t` " "Displays only the items of the specific type(s). Can be `n` for notes, `t` "
"for todos, or `nt` for notes and todos (eg. `-tt` would display only the " "for todos, or `nt` for notes and todos (eg. `-tt` would display only the "
"todos, while `-ttd` would display notes and todos." "todos, while `-ttd` would display notes and todos."
msgstr "" msgstr ""
msgid "-f, --format <format>"
msgstr ""
msgid "Either \"text\" or \"json\"" msgid "Either \"text\" or \"json\""
msgstr "" msgstr ""
@ -176,21 +248,33 @@ msgstr ""
msgid "Please select a notebook first." msgid "Please select a notebook first."
msgstr "" msgstr ""
msgid "mkbook <notebook>"
msgstr ""
msgid "Creates a new notebook." msgid "Creates a new notebook."
msgstr "" msgstr ""
msgid "mknote <note>"
msgstr ""
msgid "Creates a new note." msgid "Creates a new note."
msgstr "" msgstr ""
msgid "Notes can only be created within a notebook." msgid "Notes can only be created within a notebook."
msgstr "" msgstr ""
msgid "mv <pattern> <destination>"
msgstr ""
msgid "" msgid ""
"Moves the notes matching <pattern> to <destination>. If <pattern> is a note, " "Moves the notes matching <pattern> to <destination>. If <pattern> is a note, "
"it will be moved to the notebook <destination>. If <pattern> is a notebook, " "it will be moved to the notebook <destination>. If <pattern> is a notebook, "
"it will be renamed to <destination>." "it will be renamed to <destination>."
msgstr "" msgstr ""
msgid "rm <pattern>"
msgstr ""
msgid "Deletes the items matching <pattern>." msgid "Deletes the items matching <pattern>."
msgstr "" msgstr ""
@ -208,9 +292,15 @@ msgstr ""
msgid "%d notes match this pattern. Delete them?" msgid "%d notes match this pattern. Delete them?"
msgstr "" msgstr ""
msgid "search <pattern> [notebook]"
msgstr ""
msgid "Searches for the given <pattern> in all the notes." msgid "Searches for the given <pattern> in all the notes."
msgstr "" msgstr ""
msgid "set <note> <name> [value]"
msgstr ""
msgid "Sets the property <name> of the given <note> to the given [value]." msgid "Sets the property <name> of the given <note> to the given [value]."
msgstr "" msgstr ""
@ -220,6 +310,9 @@ msgstr ""
msgid "Synchronises with remote storage." msgid "Synchronises with remote storage."
msgstr "" msgstr ""
msgid "--target <target>"
msgstr ""
msgid "Sync to provided target (defaults to sync.target config value)" msgid "Sync to provided target (defaults to sync.target config value)"
msgstr "" msgstr ""
@ -242,6 +335,9 @@ msgstr ""
msgid "Cancelling..." msgid "Cancelling..."
msgstr "" msgstr ""
msgid "tag <command> [tag] [note]"
msgstr ""
msgid "" msgid ""
"<command> can be \"add\", \"remove\" or \"list\" to assign or remove [tag] " "<command> can be \"add\", \"remove\" or \"list\" to assign or remove [tag] "
"from [note], or to list the notes associated with [tag]. The command `tag " "from [note], or to list the notes associated with [tag]. The command `tag "
@ -252,6 +348,9 @@ msgstr ""
msgid "Invalid command: \"%s\"" msgid "Invalid command: \"%s\""
msgstr "" msgstr ""
msgid "todo <action> <pattern>"
msgstr ""
msgid "" msgid ""
"<action> can either be \"toggle\" or \"clear\". Use \"toggle\" to toggle the " "<action> can either be \"toggle\" or \"clear\". Use \"toggle\" to toggle the "
"given todo between completed and uncompleted state (If the target is a " "given todo between completed and uncompleted state (If the target is a "
@ -259,6 +358,9 @@ msgid ""
"todo back to a regular note." "todo back to a regular note."
msgstr "" msgstr ""
msgid "use <notebook>"
msgstr ""
msgid "" msgid ""
"Switches to [notebook] - all further operations will happen within this " "Switches to [notebook] - all further operations will happen within this "
"notebook." "notebook."
@ -464,6 +566,9 @@ msgstr ""
msgid "Edit notebook" msgid "Edit notebook"
msgstr "" msgstr ""
msgid "Refresh"
msgstr ""
msgid "Untitled" msgid "Untitled"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@
"url": "https://github.com/laurent22/joplin" "url": "https://github.com/laurent22/joplin"
}, },
"url": "git://github.com/laurent22/joplin.git", "url": "git://github.com/laurent22/joplin.git",
"version": "0.8.68", "version": "0.8.70",
"bin": { "bin": {
"joplin": "./main_launcher.js" "joplin": "./main_launcher.js"
}, },
@ -50,7 +50,8 @@
"babel-preset-es2015": "^6.1.4", "babel-preset-es2015": "^6.1.4",
"babel-preset-react": "^6.24.1", "babel-preset-react": "^6.24.1",
"gettext-parser": "^1.2.2", "gettext-parser": "^1.2.2",
"jasmine": "^2.6.0" "jasmine": "^2.6.0",
"word-wrap": "^1.2.3"
}, },
"scripts": { "scripts": {
"babelbuild": "babel app -d build", "babelbuild": "babel app -d build",

9
CliClient/publish.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
npm version patch
bash $SCRIPT_DIR/build.sh
cp "$SCRIPT_DIR/package.json" build/
cd "$SCRIPT_DIR/build"
npm publish

View File

@ -2154,6 +2154,10 @@ wide-align@^1.1.0:
dependencies: dependencies:
string-width "^1.0.2" string-width "^1.0.2"
word-wrap@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
wrap-ansi@^2.0.0: wrap-ansi@^2.0.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"

7
LICENSE Normal file
View File

@ -0,0 +1,7 @@
Copyright (c) 2017 Laurent Cozic
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

7
LICENSE_fr Normal file
View File

@ -0,0 +1,7 @@
Copyright (c) 2017 Laurent Cozic
L'autorisation est accordée, gracieusement, à toute personne acquérant une copie de ce logiciel et des fichiers de documentation associés (le "Logiciel"), de commercialiser le Logiciel sans restriction, notamment les droits d'utiliser, de copier, de modifier, de fusionner, de publier, de distribuer, de sous-licencier et/ou de vendre des copies du Logiciel, ainsi que d'autoriser les personnes auxquelles le Logiciel est fourni à le faire, sous réserve des conditions suivantes :
La déclaration de copyright ci-dessus et la présente autorisation doivent être incluses dans toutes copies ou parties substantielles du Logiciel.
LE LOGICIEL EST FOURNI "TEL QUEL", SANS GARANTIE D'AUCUNE SORTE, EXPLICITE OU IMPLICITE, NOTAMMENT SANS GARANTIE DE QUALITÉ MARCHANDE, D’ADÉQUATION À UN USAGE PARTICULIER ET D'ABSENCE DE CONTREFAÇON. EN AUCUN CAS, LES AUTEURS OU TITULAIRES DU DROIT D'AUTEUR NE SERONT RESPONSABLES DE TOUT DOMMAGE, RÉCLAMATION OU AUTRE RESPONSABILITÉ, QUE CE SOIT DANS LE CADRE D'UN CONTRAT, D'UN DÉLIT OU AUTRE, EN PROVENANCE DE, CONSÉCUTIF À OU EN RELATION AVEC LE LOGICIEL OU SON UTILISATION, OU AVEC D'AUTRES ÉLÉMENTS DU LOGICIEL.

View File

@ -54,3 +54,5 @@ fastlane/screenshots
# This is generated: # This is generated:
locales locales
android/build*
android/app/build*

View File

@ -90,8 +90,8 @@ android {
applicationId "net.cozic.joplin" applicationId "net.cozic.joplin"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 22 targetSdkVersion 22
versionCode 34 versionCode 35
versionName "0.9.21" versionName "0.9.22"
ndk { ndk {
abiFilters "armeabi-v7a", "x86" abiFilters "armeabi-v7a", "x86"
} }

View File

@ -285,6 +285,10 @@ function setLocale(canonicalName) {
currentLocale_ = closestSupportedLocale(canonicalName); currentLocale_ = closestSupportedLocale(canonicalName);
} }
function languageCode() {
return languageCodeOnly(currentLocale_);
}
function _(s, ...args) { function _(s, ...args) {
let strings = localeStrings(currentLocale_); let strings = localeStrings(currentLocale_);
let result = strings[s]; let result = strings[s];
@ -292,4 +296,4 @@ function _(s, ...args) {
return sprintf(result, ...args); return sprintf(result, ...args);
} }
export { _, supportedLocales, localeStrings, setLocale, supportedLocalesToLanguages, defaultLocale, closestSupportedLocale }; export { _, supportedLocales, localeStrings, setLocale, supportedLocalesToLanguages, defaultLocale, closestSupportedLocale, languageCode };