From a7b85b123e232f4c7a6eb2057ca2852b11e25f16 Mon Sep 17 00:00:00 2001 From: Hung Nguyen Date: Sat, 21 Apr 2018 09:40:32 +0700 Subject: [PATCH] fixed get appdata path error --- browser/lib/consts.js | 4 ++-- browser/main/modals/PreferencesModal/SnippetTab.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/browser/lib/consts.js b/browser/lib/consts.js index 197f7806..fa8232fb 100644 --- a/browser/lib/consts.js +++ b/browser/lib/consts.js @@ -14,12 +14,12 @@ themes.splice(themes.indexOf('solarized'), 1, 'solarized dark', 'solarized light const snippetFile = process.env.NODE_ENV === 'production' ? path.join(app.getPath('appData'), 'Boostnote', 'snippets.json') - : require('path').resolve(path.join(getAppData(), 'Boostnote', 'snippets.json')) + : path.join(getAppData(), 'Boostnote', 'snippets.json') function getAppData () { return process.env.APPDATA || (process.platform === 'darwin' ? process.env.HOME + 'Library/Preferences' - : '/.config') + : require('os').homedir() + '/.config') } const consts = { diff --git a/browser/main/modals/PreferencesModal/SnippetTab.js b/browser/main/modals/PreferencesModal/SnippetTab.js index f72f9a4d..9cb870e4 100644 --- a/browser/main/modals/PreferencesModal/SnippetTab.js +++ b/browser/main/modals/PreferencesModal/SnippetTab.js @@ -36,7 +36,7 @@ class SnippetTab extends React.Component { handleSnippetContextMenu (snippet) { const menu = new Menu() menu.append(new MenuItem({ - label: 'Delete', + label: i18n.__('Delete snippet'), click: () => { this.deleteSnippet(snippet.id) }