diff --git a/CliClient/locales/en_GB.po b/CliClient/locales/en_GB.po index 304980bd4..253db9f94 100644 --- a/CliClient/locales/en_GB.po +++ b/CliClient/locales/en_GB.po @@ -519,9 +519,15 @@ msgid "" "New notebook \"%s\" will be created and file \"%s\" will be imported into it" msgstr "" +msgid "Please create a notebook first." +msgstr "" + msgid "Note title:" msgstr "" +msgid "Please create a notebook first" +msgstr "" + msgid "To-do title:" msgstr "" diff --git a/CliClient/locales/fr_FR.po b/CliClient/locales/fr_FR.po index d2b294a71..0917b7e7f 100644 --- a/CliClient/locales/fr_FR.po +++ b/CliClient/locales/fr_FR.po @@ -572,10 +572,18 @@ msgstr "" "Un nouveau carnet \"%s\" va être créé et le fichier \"%s\" va être importé " "dedans. Continuer ?" +#, fuzzy +msgid "Please create a notebook first." +msgstr "Veuillez d'abord sélectionner un carnet." + #, fuzzy msgid "Note title:" msgstr "cat " +#, fuzzy +msgid "Please create a notebook first" +msgstr "Veuillez d'abord sélectionner un carnet." + #, fuzzy msgid "To-do title:" msgstr "cat " diff --git a/CliClient/locales/joplin.pot b/CliClient/locales/joplin.pot index 304980bd4..253db9f94 100644 --- a/CliClient/locales/joplin.pot +++ b/CliClient/locales/joplin.pot @@ -519,9 +519,15 @@ msgid "" "New notebook \"%s\" will be created and file \"%s\" will be imported into it" msgstr "" +msgid "Please create a notebook first." +msgstr "" + msgid "Note title:" msgstr "" +msgid "Please create a notebook first" +msgstr "" + msgid "To-do title:" msgstr "" diff --git a/CliClient/package-lock.json b/CliClient/package-lock.json index 74d44d811..b0613b0d6 100644 --- a/CliClient/package-lock.json +++ b/CliClient/package-lock.json @@ -1,6 +1,6 @@ { "name": "joplin", - "version": "0.10.66", + "version": "0.10.68", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/CliClient/package.json b/CliClient/package.json index fd79e336c..211bb6f33 100644 --- a/CliClient/package.json +++ b/CliClient/package.json @@ -18,7 +18,7 @@ ], "owner": "Laurent Cozic" }, - "version": "0.10.66", + "version": "0.10.68", "bin": { "joplin": "./main.js" }, diff --git a/ElectronClient/app/ElectronAppWrapper.js b/ElectronClient/app/ElectronAppWrapper.js index bf75f189a..7527d9430 100644 --- a/ElectronClient/app/ElectronAppWrapper.js +++ b/ElectronClient/app/ElectronAppWrapper.js @@ -6,8 +6,9 @@ const urlUtils = require('lib/urlUtils.js'); class ElectronAppWrapper { - constructor(electronApp) { + constructor(electronApp, env) { this.electronApp_ = electronApp; + this.env_ = env; this.win_ = null; } @@ -36,7 +37,7 @@ class ElectronAppWrapper { slashes: true })) - this.win_.webContents.openDevTools() + if (this.env_ === 'dev') this.win_.webContents.openDevTools(); this.win_.on('closed', () => { this.win_ = null diff --git a/ElectronClient/app/gui/NoteText.jsx b/ElectronClient/app/gui/NoteText.jsx index 39a866a18..3aa1d35ea 100644 --- a/ElectronClient/app/gui/NoteText.jsx +++ b/ElectronClient/app/gui/NoteText.jsx @@ -1,5 +1,6 @@ const React = require('react'); const { Note } = require('lib/models/note.js'); +const { Setting } = require('lib/models/setting.js'); const { IconButton } = require('./IconButton.min.js'); const { connect } = require('react-redux'); const { _ } = require('lib/locale.js'); @@ -46,7 +47,6 @@ class NoteTextComponent extends React.Component { // https://github.com/ajaxorg/ace/issues/2046 this.editorMaxScrollTop_ = 0; this.onAfterEditorRender_ = () => { - console.info('ENDER done'); const r = this.editor_.editor.renderer; this.editorMaxScrollTop_ = Math.max(0, r.layerConfig.maxHeight - r.$size.scrollerHeight); @@ -243,7 +243,7 @@ class NoteTextComponent extends React.Component { webviewReady: true, }); - this.webview_.openDevTools(); + // if (Setting.value('env') === 'dev') this.webview_.openDevTools(); } webview_ref(element) { diff --git a/ElectronClient/app/gui/NoteText.min.js b/ElectronClient/app/gui/NoteText.min.js index a74c9d7de..947f056ba 100644 --- a/ElectronClient/app/gui/NoteText.min.js +++ b/ElectronClient/app/gui/NoteText.min.js @@ -1,5 +1,6 @@ const React = require('react'); const { Note } = require('lib/models/note.js'); +const { Setting } = require('lib/models/setting.js'); const { IconButton } = require('./IconButton.min.js'); const { connect } = require('react-redux'); const { _ } = require('lib/locale.js'); @@ -46,7 +47,6 @@ class NoteTextComponent extends React.Component { // https://github.com/ajaxorg/ace/issues/2046 this.editorMaxScrollTop_ = 0; this.onAfterEditorRender_ = () => { - console.info('ENDER done'); const r = this.editor_.editor.renderer; this.editorMaxScrollTop_ = Math.max(0, r.layerConfig.maxHeight - r.$size.scrollerHeight); @@ -243,7 +243,7 @@ class NoteTextComponent extends React.Component { webviewReady: true }); - this.webview_.openDevTools(); + // if (Setting.value('env') === 'dev') this.webview_.openDevTools(); } webview_ref(element) { diff --git a/ElectronClient/app/lib/MdToHtml.js b/ElectronClient/app/lib/MdToHtml.js index 3bd0d3250..144dd5b72 100644 --- a/ElectronClient/app/lib/MdToHtml.js +++ b/ElectronClient/app/lib/MdToHtml.js @@ -347,17 +347,12 @@ class MdToHtml { width: auto; max-width: 100%; } - pre, code { - white-space: pre; - } `; const styleHtml = ''; const output = styleHtml + renderedBody; - console.info(renderedBody); - this.cachedContent_ = output; this.cachedContentKey_ = cacheKey; return this.cachedContent_; diff --git a/ElectronClient/app/lib/locale.js b/ElectronClient/app/lib/locale.js index 746587511..407fba8f4 100644 --- a/ElectronClient/app/lib/locale.js +++ b/ElectronClient/app/lib/locale.js @@ -283,7 +283,6 @@ function localeStrings(canonicalName) { function setLocale(canonicalName) { if (currentLocale_ == canonicalName) return; currentLocale_ = closestSupportedLocale(canonicalName); - console.info('Set locale to ' + currentLocale_); } function languageCode() { diff --git a/ElectronClient/app/main.js b/ElectronClient/app/main.js index 7b7ee8e72..de0cb9be3 100644 --- a/ElectronClient/app/main.js +++ b/ElectronClient/app/main.js @@ -12,7 +12,19 @@ process.on('unhandledRejection', (reason, p) => { process.exit(1); }); -const wrapper = new ElectronAppWrapper(electronApp); +// Flags are parsed properly in BaseApplication, however it's better to have +// the env as early as possible to enable debugging capabilities. +function envFromArgs(args) { + if (!args) return 'prod'; + const envIndex = args.indexOf('--env'); + const devIndex = args.indexOf('dev'); + if (envIndex === devIndex - 1) return 'dev'; + return 'prod'; +} + +const env = envFromArgs(process.argv); + +const wrapper = new ElectronAppWrapper(electronApp, env); initBridge(wrapper); diff --git a/ReactNativeClient/lib/MdToHtml.js b/ReactNativeClient/lib/MdToHtml.js index fdb91e7d7..144dd5b72 100644 --- a/ReactNativeClient/lib/MdToHtml.js +++ b/ReactNativeClient/lib/MdToHtml.js @@ -353,8 +353,6 @@ class MdToHtml { const output = styleHtml + renderedBody; - console.info(renderedBody); - this.cachedContent_ = output; this.cachedContentKey_ = cacheKey; return this.cachedContent_; diff --git a/ReactNativeClient/lib/locale.js b/ReactNativeClient/lib/locale.js index 746587511..407fba8f4 100644 --- a/ReactNativeClient/lib/locale.js +++ b/ReactNativeClient/lib/locale.js @@ -283,7 +283,6 @@ function localeStrings(canonicalName) { function setLocale(canonicalName) { if (currentLocale_ == canonicalName) return; currentLocale_ = closestSupportedLocale(canonicalName); - console.info('Set locale to ' + currentLocale_); } function languageCode() {