Render base strings

This commit is contained in:
Iván Ovejero
2021-11-10 19:41:40 +01:00
parent 61bb8de352
commit 2d8e158012
57 changed files with 2203 additions and 1456 deletions

View File

@@ -14,6 +14,7 @@ import { externalHooks } from '@/components/mixins/externalHooks';
import { restApi } from '@/components/mixins/restApi';
import { workflowHelpers } from '@/components/mixins/workflowHelpers';
import { showMessage } from '@/components/mixins/showMessage';
import { renderText } from '@/components/mixins/renderText';
import mixins from 'vue-typed-mixins';
import { titleChange } from './titleChange';
@@ -21,6 +22,7 @@ import { titleChange } from './titleChange';
export const workflowRun = mixins(
externalHooks,
restApi,
renderText,
workflowHelpers,
showMessage,
titleChange,
@@ -31,7 +33,9 @@ export const workflowRun = mixins(
if (this.$store.getters.pushConnectionActive === false) {
// Do not start if the connection to server is not active
// because then it can not receive the data as it executes.
throw new Error('No active connection to server. It is maybe down.');
throw new Error(
this.$baseText('workflowRun.noActiveConnectionToTheServer'),
);
}
this.$store.commit('addActiveAction', 'workflowRunning');
@@ -89,8 +93,8 @@ export const workflowRun = mixins(
}
this.$showMessage({
title: 'Workflow can not be executed',
message: 'The workflow has issues. Please fix them first:<br />&nbsp;&nbsp;- ' + errorMessages.join('<br />&nbsp;&nbsp;- '),
title: this.$baseText('workflowRun.showMessage.title'),
message: this.$baseText('workflowRun.showMessage.message') + ':<br />&nbsp;&nbsp;- ' + errorMessages.join('<br />&nbsp;&nbsp;- '),
type: 'error',
duration: 0,
});
@@ -199,7 +203,11 @@ export const workflowRun = mixins(
return runWorkflowApiResponse;
} catch (error) {
this.$titleSet(workflow.name as string, 'ERROR');
this.$showError(error, 'Problem running workflow', 'There was a problem running the workflow:');
this.$showError(
error,
this.$baseText('workflowRun.showError.title'),
this.$baseText('workflowRun.showError.message') + ':',
);
return undefined;
}
},