diff --git a/browser/main/Detail/SnippetNoteDetail.js b/browser/main/Detail/SnippetNoteDetail.js index 6f8bbb3d..9b5c7456 100644 --- a/browser/main/Detail/SnippetNoteDetail.js +++ b/browser/main/Detail/SnippetNoteDetail.js @@ -26,6 +26,7 @@ import InfoButton from './InfoButton' import InfoPanel from './InfoPanel' import InfoPanelTrashed from './InfoPanelTrashed' import { formatDate } from 'browser/lib/date-formatter' +import i18n from 'browser/lib/i18n' function pass (name) { switch (name) { @@ -264,9 +265,9 @@ class SnippetNoteDetail extends React.Component { if (this.state.note.snippets[index].content.trim().length > 0) { const dialogIndex = dialog.showMessageBox(remote.getCurrentWindow(), { type: 'warning', - message: 'Delete a snippet', - detail: 'This work cannot be undone.', - buttons: ['Confirm', 'Cancel'] + message: i18n.__('Delete a snippet'), + detail: i18n.__('This work cannot be undone.'), + buttons: [ i18n.__('Confirm'), i18n.__('Cancel')] }) if (dialogIndex === 0) { this.deleteSnippetByIndex(index) @@ -507,8 +508,8 @@ class SnippetNoteDetail extends React.Component { showWarning () { dialog.showMessageBox(remote.getCurrentWindow(), { type: 'warning', - message: 'Sorry!', - detail: 'md/text import is available only a markdown note.', + message: i18n.__('Sorry!'), + detail: i18n.__('md/text import is available only a markdown note.'), buttons: ['OK'] }) } diff --git a/browser/main/Detail/index.js b/browser/main/Detail/index.js index 89b1dd75..70084cf9 100644 --- a/browser/main/Detail/index.js +++ b/browser/main/Detail/index.js @@ -41,9 +41,9 @@ class Detail extends React.Component { const alertConfig = { type: 'warning', - message: 'Confirm note deletion', - detail: 'This will permanently remove this note.', - buttons: ['Confirm', 'Cancel'] + message: i18n.__('Confirm note deletion'), + detail: i18n.__('This will permanently remove this note.'), + buttons: [ i18n.__('Confirm'), i18n.__('Cancel')] } const dialogueButtonIndex = dialog.showMessageBox(remote.getCurrentWindow(), alertConfig) diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index b1f2d092..aeac4589 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -16,6 +16,7 @@ import { hashHistory } from 'react-router' import copy from 'copy-to-clipboard' import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig' import markdown from '../../lib/markdown' +import i18n from 'browser/lib/i18n' const { remote } = require('electron') const { Menu, MenuItem, dialog } = remote @@ -996,13 +997,13 @@ class NoteList extends React.Component { value={config.sortBy} onChange={(e) => this.handleSortByChange(e)} > - - - + + +
- - {blogAlertElement}
-
Auth
+
{i18n.__('Auth')}
- Authentication Method + {i18n.__('Authentication Method')}
{ config.blog.authMethod === 'JWT' &&
-
Token
+
{i18n.__('Token')}
this.handleBlogChange(e)} @@ -164,7 +165,7 @@ class Blog extends React.Component { { config.blog.authMethod === 'USER' &&
-
UserName
+
{i18n.__('UserName')}
this.handleBlogChange(e)} @@ -174,7 +175,7 @@ class Blog extends React.Component {
-
Password
+
{i18n.__('Password')}
this.handleBlogChange(e)} diff --git a/browser/main/modals/PreferencesModal/HotkeyTab.js b/browser/main/modals/PreferencesModal/HotkeyTab.js index 32552d48..91473c3b 100644 --- a/browser/main/modals/PreferencesModal/HotkeyTab.js +++ b/browser/main/modals/PreferencesModal/HotkeyTab.js @@ -5,6 +5,7 @@ import styles from './ConfigTab.styl' import ConfigManager from 'browser/main/lib/ConfigManager' import store from 'browser/main/store' import _ from 'lodash' +import i18n from 'browser/lib/i18n' const electron = require('electron') const ipc = electron.ipcRenderer @@ -23,7 +24,7 @@ class HotkeyTab extends React.Component { this.handleSettingDone = () => { this.setState({keymapAlert: { type: 'success', - message: 'Successfully applied!' + message: i18n.__('Successfully applied!') }}) } this.handleSettingError = (err) => { @@ -77,7 +78,7 @@ class HotkeyTab extends React.Component { this.props.haveToSave({ tab: 'Hotkey', type: 'warning', - message: 'You have to save!' + message: i18n.__('You have to save!') }) } } @@ -102,9 +103,9 @@ class HotkeyTab extends React.Component { return (
-
Hotkeys
+
{i18n.__('Hotkeys')}
-
Show/Hide Boostnote
+
{i18n.__('Show/Hide Boostnote')}
this.handleHotkeyChange(e)} @@ -124,7 +125,7 @@ class HotkeyTab extends React.Component { } {keymapAlertElement}
diff --git a/browser/main/modals/PreferencesModal/InfoTab.js b/browser/main/modals/PreferencesModal/InfoTab.js index 964b02f3..1173389e 100644 --- a/browser/main/modals/PreferencesModal/InfoTab.js +++ b/browser/main/modals/PreferencesModal/InfoTab.js @@ -39,11 +39,11 @@ class InfoTab extends React.Component { if (!newConfig.amaEnabled) { AwsMobileAnalyticsConfig.recordDynamicCustomEvent('DISABLE_AMA') this.setState({ - amaMessage: 'We hope we will gain your trust' + amaMessage: i18n.__('We hope we will gain your trust') }) } else { this.setState({ - amaMessage: 'Thank\'s for trust us' + amaMessage: i18n.__('Thank\'s for trust us') }) } @@ -149,7 +149,7 @@ class InfoTab extends React.Component { type='checkbox' /> {i18n.__('Enable analytics to help improve Boostnote')}
- +
{this.infoMessage()}
diff --git a/browser/main/modals/PreferencesModal/StorageItem.js b/browser/main/modals/PreferencesModal/StorageItem.js index 28675860..bbd082c6 100644 --- a/browser/main/modals/PreferencesModal/StorageItem.js +++ b/browser/main/modals/PreferencesModal/StorageItem.js @@ -47,9 +47,9 @@ class StorageItem extends React.Component { handleUnlinkButtonClick (e) { const index = dialog.showMessageBox(remote.getCurrentWindow(), { type: 'warning', - message: 'Unlink Storage', - detail: 'Unlinking removes this linked storage from Boostnote. No data is removed, please manually delete the folder from your hard drive if needed.', - buttons: ['Unlink', 'Cancel'] + message: i18n.__('Unlink Storage'), + detail: i18n.__('Unlinking removes this linked storage from Boostnote. No data is removed, please manually delete the folder from your hard drive if needed.'), + buttons: [i18n.__('Unlink'), i18n.__('Cancel')] }) if (index === 0) { diff --git a/browser/main/modals/PreferencesModal/UiTab.js b/browser/main/modals/PreferencesModal/UiTab.js index 1939e0a9..fbcae1d0 100644 --- a/browser/main/modals/PreferencesModal/UiTab.js +++ b/browser/main/modals/PreferencesModal/UiTab.js @@ -30,7 +30,7 @@ class UiTab extends React.Component { this.handleSettingDone = () => { this.setState({UiAlert: { type: 'success', - message: 'Successfully applied!' + message: i18n.__('Successfully applied!') }}) } this.handleSettingError = (err) => { @@ -108,7 +108,7 @@ class UiTab extends React.Component { this.props.haveToSave({ tab: 'UI', type: 'warning', - message: 'You have to save!' + message: i18n.__('You have to save!') }) } }) @@ -474,7 +474,7 @@ class UiTab extends React.Component {
{UiAlertElement}
diff --git a/browser/main/modals/PreferencesModal/index.js b/browser/main/modals/PreferencesModal/index.js index 490237ab..70e25a88 100644 --- a/browser/main/modals/PreferencesModal/index.js +++ b/browser/main/modals/PreferencesModal/index.js @@ -118,12 +118,12 @@ class Preferences extends React.Component { const content = this.renderContent() const tabs = [ - {target: 'STORAGES', label: 'Storage'}, - {target: 'HOTKEY', label: 'Hotkeys', Hotkey: this.state.HotkeyAlert}, - {target: 'UI', label: 'Interface', UI: this.state.UIAlert}, - {target: 'INFO', label: 'About'}, - {target: 'CROWDFUNDING', label: 'Crowdfunding'}, - {target: 'BLOG', label: 'Blog', Blog: this.state.BlogAlert} + {target: 'STORAGES', label: i18n.__('Storage')}, + {target: 'HOTKEY', label: i18n.__('Hotkeys'), Hotkey: this.state.HotkeyAlert}, + {target: 'UI', label: i18n.__('Interface'), UI: this.state.UIAlert}, + {target: 'INFO', label: i18n.__('About')}, + {target: 'CROWDFUNDING', label: i18n.__('Crowdfunding')}, + {target: 'BLOG', label: i18n.__('Blog'), Blog: this.state.BlogAlert} ] const navButtons = tabs.map((tab) => { diff --git a/locales/de.json b/locales/de.json index 70bd3c76..3e7138a5 100644 --- a/locales/de.json +++ b/locales/de.json @@ -88,8 +88,8 @@ "we would like to invest more time and resources in this project.": "we would like to invest more time and resources in this project.", "If you like this project and see its potential, you can help by supporting us on OpenCollective!": "If you like this project and see its potential, you can help by supporting us on OpenCollective!", "Thanks,": "Thanks,", - "Boostnote maintainers": "Boostnote maintainers", - "Support via OpenCollective": "Support via OpenCollective", + "Boostnote maintainers": "Boostnote Betreuer", + "Support via OpenCollective": "Support per OpenCollective", "Language": "Sprache", "English": "Englisch", "German": "Deutsch", @@ -106,5 +106,26 @@ "This format is for creating text documents. Checklists, code blocks and Latex blocks are available.": "Dieses Format dient der Erstellung von Text Dokumenten. Checklisten, Code-Blöcke und Latex-Blöcke sind verfügbar.", "Snippet Note": "Snippet Notiz", "This format is for creating code snippets. Multiple snippets can be grouped into a single note.": "Dieses Format dient der Erstellung von Code-Schnipslen. Mehrere snippets können zu einer Notiz zusammengefasst werden.", - "Tab to switch format": "Tab drücken, um das Format zu wechseln" + "Tab to switch format": "Tab drücken, um das Format zu wechseln", + "Updated": "Bearbeitet", + "Created": "Erstellt", + "Alphabetically": "Alphabetisch", + "Default View": "Standardansicht", + "Compressed View": "Komprimierte Ansicht", + "Search": "Suchen", + "Blog Type": "Blog-Typ", + "Blog Address": "Blog Adresse", + "Save": "Speichern", + "Auth": "Authentifizierung", + "Authentication Method": "Authentifizierungsmethode", + "JWT": "JWT", + "USER": "BENUTZER", + "Token": "Token", + "Storage": "Speicherorte", + "Hotkeys": "Hotkeys", + "Show/Hide Boostnote": "Boostnote anzeigen/verstecken", + "Restore": "Restore", + "Permanent Delete": "Dauerhaft Löschen", + "Confirm note deletion": "Löschen bestätigen", + "This will permanently remove this note.": "Notiz wird dauerhaft gelöscht" } \ No newline at end of file diff --git a/locales/en.json b/locales/en.json index 95701092..aba9be61 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1,6 +1,13 @@ { + "Notes": "Notes", + "Tags": "Tags", + "Preferences": "Preferences", + "Make a note": "Make a note", + "Ctrl": "Ctrl", "Ctrl(^)": "Ctrl", "to create a new note": "to create a new note", + "Toggle Mode": "Toggle Mode", + "Trash": "Trash", "MODIFICATION DATE": "MODIFICATION DATE", "Words": "Words", "Letters": "Letters", @@ -12,57 +19,20 @@ ".txt": ".txt", ".html": ".html", "Print": "Print", - "Toggle Mode": "Toggle Mode", - "Trash": "Trash", "Your preferences for Boostnote": "Your preferences for Boostnote", - "Edit": "Edit", - "Delete": "Delete", - "Crowdfunding": "Crowdfunding", - "Dear everyone,": "Dear everyone,", - "Thank you for using Boostnote!": "Thank you for using Boostnote!", - "Boostnote is used in about 200 different countries and regions by an awesome community of developers.": "Boostnote is used in about 200 different countries and regions by an awesome community of developers.", - "To continue supporting this growth, and to satisfy community expectations,": "To continue supporting this growth, and to satisfy community expectations,", - "we would like to invest more time and resources in this project.": "we would like to invest more time and resources in this project.", - "If you like this project and see its potential, you can help by supporting us on OpenCollective!": "If you like this project and see its potential, you can help by supporting us on OpenCollective!", - "Thanks,": "Thanks,", - "Boostnote maintainers": "Boostnote maintainers", - "Support via OpenCollective": "Support via OpenCollective", - "Make a note": "Make a note", - "Ctrl": "Ctrl", - "Notes": "Notes", - "Tags": "Tags", - "Preferences": "Preferences", "Storages": "Storages", "Add Storage Location": "Add Storage Location", "Add Folder": "Add Folder", "Open Storage folder": "Open Storage folder", "Unlink": "Unlink", - "Community": "Community", - "Subscribe to Newsletter": "Subscribe to Newsletter", - "GitHub": "GitHub", - "Blog": "Blog", - "Facebook Group": "Facebook Group", - "Twitter": "Twitter", - "About": "About", - "Boostnote": "Boostnote", - "An open source note-taking app made for programmers just like you.": "An open source note-taking app made for programmers just like you.", - "Website": "Website", - "Development": "Development", - " : Development configurations for Boostnote.": " : Development configurations for Boostnote.", - "Copyright (C) 2017 - 2018 BoostIO": "Copyright (C) 2017 - 2018 BoostIO", - "License: GPL v3": "License: GPL v3", - "Analytics": "Analytics", - "Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.": "Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.", - "You can see how it works on ": "You can see how it works on ", - "You can choose to enable or disable this option.": "You can choose to enable or disable this option.", - "Enable analytics to help improve Boostnote": "Enable analytics to help improve Boostnote", + "Edit": "Edit", + "Delete": "Delete", "Interface": "Interface", "Interface Theme": "Interface Theme", - "Default": "Default", + "Default": "Delete", "White": "White", "Solarized Dark": "Solarized Dark", "Dark": "Dark", - "Show "Saved to Clipboard" notification when copying": "Show "Saved to Clipboard" notification when copying", "Show a confirmation dialog when deleting notes": "Show a confirmation dialog when deleting notes", "Editor Theme": "Editor Theme", "Editor Font Size": "Editor Font Size", @@ -91,11 +61,71 @@ "LaTeX Inline Close Delimiter": "LaTeX Inline Close Delimiter", "LaTeX Block Open Delimiter": "LaTeX Block Open Delimiter", "LaTeX Block Close Delimiter": "LaTeX Block Close Delimiter", - "Show \"Saved to Clipboard\" notification when copying": "Show \"Saved to Clipboard\" notification when copying", + "Community": "Community", + "Subscribe to Newsletter": "Subscribe to Newsletter", + "GitHub": "GitHub", + "Blog": "Blog", + "Facebook Group": "Facebook Group", + "Twitter": "Twitter", + "About": "About", + "Boostnote": "Boostnote", + "An open source note-taking app made for programmers just like you.": "An open source note-taking app made for programmers just like you.", + "Website": "Website", + "Development": "Development", + " : Development configurations for Boostnote.": " : Development configurations for Boostnote.", + "Copyright (C) 2017 - 2018 BoostIO": "Copyright (C) 2017 - 2018 BoostIO", + "License: GPL v3": "License: GPL v3", + "Analytics": "Analytics", + "Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.": "Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.", + "You can see how it works on ": "You can see how it works on ", + "You can choose to enable or disable this option.": "You can choose to enable or disable this option.", + "Enable analytics to help improve Boostnote": "Enable analytics to help improve Boostnote", + "Crowdfunding": "Crowdfunding", + "Dear everyone,": "Dear everyone,", + "Thank you for using Boostnote!": "Thank you for using Boostnote!", + "Boostnote is used in about 200 different countries and regions by an awesome community of developers.": "Boostnote is used in about 200 different countries and regions by an awesome community of developers.", + "To continue supporting this growth, and to satisfy community expectations,": "To continue supporting this growth, and to satisfy community expectations,", + "we would like to invest more time and resources in this project.": "we would like to invest more time and resources in this project.", + "If you like this project and see its potential, you can help by supporting us on OpenCollective!": "If you like this project and see its potential, you can help by supporting us on OpenCollective!", + "Thanks,": "Thanks,", + "Boostnote maintainers": "Boostnote maintainers", + "Support via OpenCollective": "Support via OpenCollective", "Language": "Language", "English": "English", "German": "German", "French": "French", + "Show \"Saved to Clipboard\" notification when copying": "Show \"Saved to Clipboard\" notification when copying", "All Notes": "All Notes", - "Starred": "Starred" + "Starred": "Starred", + "Are you sure to ": "Are you sure to ", + " delete": " delete", + "this folder?": "this folder?", + "Confirm": "Confirm", + "Cancel": "Cancel", + "Markdown Note": "Markdown Note", + "This format is for creating text documents. Checklists, code blocks and Latex blocks are available.": "This format is for creating text documents. Checklists, code blocks and Latex blocks are available.", + "Snippet Note": "Snippet Note", + "This format is for creating code snippets. Multiple snippets can be grouped into a single note.": "This format is for creating code snippets. Multiple snippets can be grouped into a single note.", + "Tab to switch format": "Tab to switch format", + "Updated": "Updated", + "Created": "Created", + "Alphabetically": "Alphabetically", + "Default View": "Default View", + "Compressed View": "Compressed View", + "Search": "Search", + "Blog Type": "Blog Type", + "Blog Address": "Blog Address", + "Save": "Save", + "Auth": "Auth", + "Authentication Method": "Authentication Method", + "JWT": "JWT", + "USER": "USER", + "Token": "Token", + "Storage": "Storage", + "Hotkeys": "Hotkeys", + "Show/Hide Boostnote": "Show/Hide Boostnote", + "Restore": "Restore", + "Permanent Delete": "Permanent Delete", + "Confirm note deletion": "Confirm note deletion", + "This will permanently remove this note.": "This will permanently remove this note." } \ No newline at end of file diff --git a/locales/fr.json b/locales/fr.json index cfcca1a5..aba9be61 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -4,6 +4,8 @@ "Preferences": "Preferences", "Make a note": "Make a note", "Ctrl": "Ctrl", + "Ctrl(^)": "Ctrl", + "to create a new note": "to create a new note", "Toggle Mode": "Toggle Mode", "Trash": "Trash", "MODIFICATION DATE": "MODIFICATION DATE", @@ -18,17 +20,19 @@ ".html": ".html", "Print": "Print", "Your preferences for Boostnote": "Your preferences for Boostnote", + "Storages": "Storages", + "Add Storage Location": "Add Storage Location", + "Add Folder": "Add Folder", + "Open Storage folder": "Open Storage folder", + "Unlink": "Unlink", + "Edit": "Edit", + "Delete": "Delete", "Interface": "Interface", "Interface Theme": "Interface Theme", - "Default": "Default", + "Default": "Delete", "White": "White", "Solarized Dark": "Solarized Dark", "Dark": "Dark", - "Language": "Language", - "English": "English", - "German": "German", - "French": "French", - "Show \"Saved to Clipboard\" notification when copying": "Show \"Saved to Clipboard\" notification when copying", "Show a confirmation dialog when deleting notes": "Show a confirmation dialog when deleting notes", "Editor Theme": "Editor Theme", "Editor Font Size": "Editor Font Size", @@ -56,5 +60,72 @@ "LaTeX Inline Open Delimiter": "LaTeX Inline Open Delimiter", "LaTeX Inline Close Delimiter": "LaTeX Inline Close Delimiter", "LaTeX Block Open Delimiter": "LaTeX Block Open Delimiter", - "LaTeX Block Close Delimiter": "LaTeX Block Close Delimiter" + "LaTeX Block Close Delimiter": "LaTeX Block Close Delimiter", + "Community": "Community", + "Subscribe to Newsletter": "Subscribe to Newsletter", + "GitHub": "GitHub", + "Blog": "Blog", + "Facebook Group": "Facebook Group", + "Twitter": "Twitter", + "About": "About", + "Boostnote": "Boostnote", + "An open source note-taking app made for programmers just like you.": "An open source note-taking app made for programmers just like you.", + "Website": "Website", + "Development": "Development", + " : Development configurations for Boostnote.": " : Development configurations for Boostnote.", + "Copyright (C) 2017 - 2018 BoostIO": "Copyright (C) 2017 - 2018 BoostIO", + "License: GPL v3": "License: GPL v3", + "Analytics": "Analytics", + "Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.": "Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.", + "You can see how it works on ": "You can see how it works on ", + "You can choose to enable or disable this option.": "You can choose to enable or disable this option.", + "Enable analytics to help improve Boostnote": "Enable analytics to help improve Boostnote", + "Crowdfunding": "Crowdfunding", + "Dear everyone,": "Dear everyone,", + "Thank you for using Boostnote!": "Thank you for using Boostnote!", + "Boostnote is used in about 200 different countries and regions by an awesome community of developers.": "Boostnote is used in about 200 different countries and regions by an awesome community of developers.", + "To continue supporting this growth, and to satisfy community expectations,": "To continue supporting this growth, and to satisfy community expectations,", + "we would like to invest more time and resources in this project.": "we would like to invest more time and resources in this project.", + "If you like this project and see its potential, you can help by supporting us on OpenCollective!": "If you like this project and see its potential, you can help by supporting us on OpenCollective!", + "Thanks,": "Thanks,", + "Boostnote maintainers": "Boostnote maintainers", + "Support via OpenCollective": "Support via OpenCollective", + "Language": "Language", + "English": "English", + "German": "German", + "French": "French", + "Show \"Saved to Clipboard\" notification when copying": "Show \"Saved to Clipboard\" notification when copying", + "All Notes": "All Notes", + "Starred": "Starred", + "Are you sure to ": "Are you sure to ", + " delete": " delete", + "this folder?": "this folder?", + "Confirm": "Confirm", + "Cancel": "Cancel", + "Markdown Note": "Markdown Note", + "This format is for creating text documents. Checklists, code blocks and Latex blocks are available.": "This format is for creating text documents. Checklists, code blocks and Latex blocks are available.", + "Snippet Note": "Snippet Note", + "This format is for creating code snippets. Multiple snippets can be grouped into a single note.": "This format is for creating code snippets. Multiple snippets can be grouped into a single note.", + "Tab to switch format": "Tab to switch format", + "Updated": "Updated", + "Created": "Created", + "Alphabetically": "Alphabetically", + "Default View": "Default View", + "Compressed View": "Compressed View", + "Search": "Search", + "Blog Type": "Blog Type", + "Blog Address": "Blog Address", + "Save": "Save", + "Auth": "Auth", + "Authentication Method": "Authentication Method", + "JWT": "JWT", + "USER": "USER", + "Token": "Token", + "Storage": "Storage", + "Hotkeys": "Hotkeys", + "Show/Hide Boostnote": "Show/Hide Boostnote", + "Restore": "Restore", + "Permanent Delete": "Permanent Delete", + "Confirm note deletion": "Confirm note deletion", + "This will permanently remove this note.": "This will permanently remove this note." } \ No newline at end of file