Electron: Fixed import of certain images

pull/41/head
Laurent Cozic 2017-11-29 23:27:20 +00:00
parent 97b8cad755
commit 52f09d2638
9 changed files with 20 additions and 29 deletions

View File

@ -2,7 +2,7 @@ const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js'); const { app } = require('./app.js');
const { _ } = require('lib/locale.js'); const { _ } = require('lib/locale.js');
const { Folder } = require('lib/models/folder.js'); const { Folder } = require('lib/models/folder.js');
const { importEnex } = require('import-enex'); const { importEnex } = require('lib/import-enex');
const { filename, basename } = require('lib/path-utils.js'); const { filename, basename } = require('lib/path-utils.js');
const { cliUtils } = require('./cli-utils.js'); const { cliUtils } = require('./cli-utils.js');

View File

@ -590,7 +590,7 @@ msgstr ""
msgid "Attach file" msgid "Attach file"
msgstr "" msgstr ""
msgid "Set or clear alarm" msgid "Set alarm"
msgstr "" msgstr ""
msgid "Refresh" msgid "Refresh"
@ -896,9 +896,6 @@ msgstr ""
msgid "Attach any file" msgid "Attach any file"
msgstr "" msgstr ""
msgid "Set alarm"
msgstr ""
msgid "Convert to note" msgid "Convert to note"
msgstr "" msgstr ""

View File

@ -643,7 +643,8 @@ msgstr "Lien ou message non géré : %s"
msgid "Attach file" msgid "Attach file"
msgstr "Attacher un fichier" msgstr "Attacher un fichier"
msgid "Set or clear alarm" #, fuzzy
msgid "Set alarm"
msgstr "Définir ou modifier alarme" msgstr "Définir ou modifier alarme"
msgid "Refresh" msgid "Refresh"
@ -894,11 +895,11 @@ msgid "%s: %d notes"
msgstr "%s : %d notes" msgstr "%s : %d notes"
msgid "Coming alarms" msgid "Coming alarms"
msgstr "" msgstr "Alarmes à venir"
#, fuzzy, javascript-format #, javascript-format
msgid "On %s: %s" msgid "On %s: %s"
msgstr "%s : %s" msgstr "Le %s : %s"
msgid "There are currently no notes. Create one by clicking on the (+) button." msgid "There are currently no notes. Create one by clicking on the (+) button."
msgstr "" msgstr ""
@ -953,21 +954,14 @@ msgstr "Ignorer les changements"
msgid "Unsupported image type: %s" msgid "Unsupported image type: %s"
msgstr "Type d'image non géré : %s" msgstr "Type d'image non géré : %s"
#, fuzzy
msgid "Attach photo" msgid "Attach photo"
msgstr "Attacher un fichier" msgstr "Attacher une photo"
#, fuzzy
msgid "Attach any file" msgid "Attach any file"
msgstr "Attacher un fichier" msgstr "Attacher un fichier"
#, fuzzy
msgid "Set alarm"
msgstr "Définir ou modifier alarme"
#, fuzzy
msgid "Convert to note" msgid "Convert to note"
msgstr "Convertir en tâche" msgstr "Convertir en note"
msgid "Convert to todo" msgid "Convert to todo"
msgstr "Convertir en tâche" msgstr "Convertir en tâche"
@ -978,9 +972,8 @@ msgstr "Cacher les métadonnées"
msgid "Show metadata" msgid "Show metadata"
msgstr "Afficher les métadonnées" msgstr "Afficher les métadonnées"
#, fuzzy
msgid "View on map" msgid "View on map"
msgstr "Voir l'emplacement sur la carte" msgstr "Voir emplacement sur carte"
msgid "Delete notebook" msgid "Delete notebook"
msgstr "Supprimer le carnet" msgstr "Supprimer le carnet"
@ -1003,6 +996,9 @@ msgstr ""
msgid "Welcome" msgid "Welcome"
msgstr "Bienvenue" msgstr "Bienvenue"
#~ msgid "Set or clear alarm"
#~ msgstr "Définir ou modifier alarme"
#~ msgid "Attach image" #~ msgid "Attach image"
#~ msgstr "Joindre une image ou photo" #~ msgstr "Joindre une image ou photo"

View File

@ -590,7 +590,7 @@ msgstr ""
msgid "Attach file" msgid "Attach file"
msgstr "" msgstr ""
msgid "Set or clear alarm" msgid "Set alarm"
msgstr "" msgstr ""
msgid "Refresh" msgid "Refresh"
@ -896,9 +896,6 @@ msgstr ""
msgid "Attach any file" msgid "Attach any file"
msgstr "" msgstr ""
msgid "Set alarm"
msgstr ""
msgid "Convert to note" msgid "Convert to note"
msgstr "" msgstr ""

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -275,7 +275,8 @@ function importEnex(parentFolderId, filePath, importOptions = null) {
let attr = currentNodeAttributes(); let attr = currentNodeAttributes();
noteResource.dataEncoding = attr.encoding; noteResource.dataEncoding = attr.encoding;
} }
noteResource[n] = text; if (!(n in noteResource)) noteResource[n] = '';
noteResource[n] += text;
} else if (note) { } else if (note) {
if (n == 'title') { if (n == 'title') {
note.title = text; note.title = text;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long