TagSpaces is an offline, open source, document manager with tagging support
TSN253 Extract strings for i18n
Mladen Sapundshiev82fa0b3e081b
diff --git a/app/components/Search.js b/app/components/Search.jsindex 0aea71563..9c4713983 100644--- a/app/components/Search.js+++ b/app/components/Search.js@@ -200,7 +200,7 @@ class Search extends React.Component<Props, State> {{i18n.t('core:tagSearchType')}</FormHelperText><RadioGroup- aria-label="Tag Search Type"+ aria-label={i18n.t('core:tagSearchType')}name="tagConjunction"value={this.state.tagConjunction}onChange={this.handleInputChange}diff --git a/app/components/dialogs/CreateLocationDialog.js b/app/components/dialogs/CreateLocationDialog.jsindex 68c7db907..b6713c873 100644--- a/app/components/dialogs/CreateLocationDialog.js+++ b/app/components/dialogs/CreateLocationDialog.js@@ -334,14 +334,14 @@ class CreateLocationDialog extends React.Component<Props, State> {<DialogContent><Grid container spacing={32}><Grid item xs={2} style={{ marginTop: 13, textAlign: 'left' }}>- <Typography>Type</Typography>+ <Typography>{i18n.t('core:locationType')}</Typography></Grid><Grid item xs={10}><FormControl disabled={!Pro}><RadioGrouptitle={Pro ? '' : i18n.t('core:thisFunctionalityIsAvailableInPro')}component="label"- aria-label="Type"+ aria-label={i18n.t('core:locationType')}name="type"value={this.state.type}onChange={this.handleInputChange}diff --git a/app/components/dialogs/EditLocationDialog.js b/app/components/dialogs/EditLocationDialog.jsindex 25819df8b..b02fd3c85 100644--- a/app/components/dialogs/EditLocationDialog.js+++ b/app/components/dialogs/EditLocationDialog.js@@ -286,14 +286,14 @@ class EditLocationDialog extends React.Component<Props, State> {<DialogContent><Grid container spacing={32}><Grid item xs={2} style={{ marginTop: 13, textAlign: 'left' }}>- <Typography>Type</Typography>+ <Typography>{i18n.t('core:locationType')}</Typography></Grid><Grid item xs={10}><FormControl disabled={!Pro}><RadioGrouptitle={Pro ? '' : i18n.t('core:thisFunctionalityIsAvailableInPro')}component="label"- aria-label="Type"+ aria-label={i18n.t('core:locationType')}name="type"value={this.state.type}onChange={this.handleInputChange}diff --git a/app/containers/MainPage.js b/app/containers/MainPage.jsindex bd509299c..f4b4897c3 100644--- a/app/containers/MainPage.js+++ b/app/containers/MainPage.js@@ -67,6 +67,7 @@ import AppConfig from '../config';// import i18n from '../services/i18n';import buildDesktopMenu from '../services/electron-menus';import buildTrayIconMenu from '../services/electron-tray-menu';+import i18n from '../services/i18n';const initialSplitSize = 44;const drawerWidth = 300;@@ -471,7 +472,7 @@ class MainPage extends Component<Props, State> {action={[<IconButtonkey="close"- aria-label="Close"+ aria-label={i18n.t('core:closeButton')}color="inherit"onClick={this.props.hideNotifications}>diff --git a/app/locales/en/core.json b/app/locales/en/core.jsonindex df8e42c4b..4268db669 100644--- a/app/locales/en/core.json+++ b/app/locales/en/core.json@@ -354,5 +354,8 @@"loading": "Loading...","cancelEditing": "Cancel editing","upgradeToPro": "See what's in the PRO version",+ "locationType": "Type",+ "firstOpenaFolder": "Please first open a folder!",+ "errorLoadingFolder": "Error loading directory","-": "-"}diff --git a/app/reducers/app.js b/app/reducers/app.jsindex 6b291b988..aa6aff1e6 100644--- a/app/reducers/app.js+++ b/app/reducers/app.js@@ -476,7 +476,7 @@ export const actions = {const { app } = getState();if (!app.currentDirectoryPath) {dispatch(- actions.showNotification('Please first open a folder!', 'warning', true)+ actions.showNotification(i18n.t('core:firstOpenaFolder'), 'warning', true));} else {dispatch(actions.toggleCreateDirectoryDialog());@@ -489,7 +489,7 @@ export const actions = {const { app } = getState();if (!app.currentDirectoryPath) {dispatch(- actions.showNotification('Please first open a folder!', 'warning', true)+ actions.showNotification(i18n.t('core:firstOpenaFolder'), 'warning', true));} else {dispatch(actions.toggleCreateFileDialog());@@ -502,7 +502,7 @@ export const actions = {const { app } = getState();// if (!app.currentDirectoryPath) {// dispatch(- // actions.showNotification('Please first open a folder!', 'warning', true)+ // actions.showNotification(i18n.t('core:firstOpenaFolder'), 'warning', true)// );// } else {dispatch(actions.toggleSelectDirectoryDialog());@@ -525,7 +525,7 @@ export const actions = {const parentDirectory = extractParentDirectoryPath(app.currentDirectoryPath);dispatch(actions.loadDirectoryContent(parentDirectory));} else {- dispatch(actions.showNotification('Please first open a folder!', 'warning', true));+ dispatch(actions.showNotification(i18n.t('core:firstOpenaFolder'), 'warning', true));}},loadDirectoryContent: (directoryPath: string) => (@@ -643,7 +643,7 @@ export const actions = {console.warn('Error loading directory: ' + error);dispatch(actions.hideNotifications());dispatch(- actions.showNotification('Error loading directory', 'warning', true)+ actions.showNotification(i18n.t('core:errorLoadingFolder'), 'warning', true));dispatch(actions.loadDirectorySuccess(directoryPath, []));},@@ -774,7 +774,7 @@ export const actions = {dispatch(actions.showNotification('Error creating file', 'warning', true));});} else {- dispatch(actions.showNotification('Please first open a folder!', 'warning', true));+ dispatch(actions.showNotification(i18n.t('core:firstOpenaFolder'), 'warning', true));}},createFileAdvanced: (targetPath: string, fileName: string, content: string, fileType: 'md' | 'txt' | 'html') => (