🚚 Rename $i18n2 to $i
This commit is contained in:
@@ -22,23 +22,23 @@ export const genericHelpers = mixins(showMessage).extend({
|
||||
displayTimer (msPassed: number, showMs = false): string {
|
||||
if (msPassed < 60000) {
|
||||
if (showMs === false) {
|
||||
return `${this.$n(Math.floor(msPassed / 1000), 'decimal')} ${this.$i18n2.baseText('genericHelpers.sec')}`;
|
||||
return `${this.$n(Math.floor(msPassed / 1000), 'decimal')} ${this.$i.baseText('genericHelpers.sec')}`;
|
||||
}
|
||||
|
||||
return `${this.$i18n2.number(msPassed / 1000, 'decimal')} ${this.$i18n2.baseText('genericHelpers.sec')}`;
|
||||
return `${this.$i.number(msPassed / 1000, 'decimal')} ${this.$i.baseText('genericHelpers.sec')}`;
|
||||
}
|
||||
|
||||
const secondsPassed = Math.floor(msPassed / 1000);
|
||||
const minutesPassed = Math.floor(secondsPassed / 60);
|
||||
|
||||
return `${this.$i18n2.number(minutesPassed, 'decimal')}:${this.$i18n2.number(secondsPassed, 'decimal')} ${this.$i18n2.baseText('genericHelpers.min')}`;
|
||||
return `${this.$i.number(minutesPassed, 'decimal')}:${this.$i.number(secondsPassed, 'decimal')} ${this.$i.baseText('genericHelpers.min')}`;
|
||||
},
|
||||
editAllowedCheck (): boolean {
|
||||
if (this.isReadOnly) {
|
||||
this.$showMessage({
|
||||
// title: 'Workflow can not be changed!',
|
||||
title: this.$i18n2.baseText('genericHelpers.showMessage.title'),
|
||||
message: this.$i18n2.baseText('genericHelpers.showMessage.message'),
|
||||
title: this.$i.baseText('genericHelpers.showMessage.title'),
|
||||
message: this.$i.baseText('genericHelpers.showMessage.message'),
|
||||
type: 'error',
|
||||
duration: 0,
|
||||
});
|
||||
@@ -57,7 +57,7 @@ export const genericHelpers = mixins(showMessage).extend({
|
||||
this.loadingService = this.$loading(
|
||||
{
|
||||
lock: true,
|
||||
text: text || this.$i18n2.baseText('genericHelpers.loading'),
|
||||
text: text || this.$i.baseText('genericHelpers.loading'),
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(255, 255, 255, 0.8)',
|
||||
},
|
||||
|
||||
@@ -179,7 +179,7 @@ export const nodeBase = mixins(
|
||||
hover: false,
|
||||
showOutputLabel: nodeTypeData.outputs.length === 1,
|
||||
size: nodeTypeData.outputs.length >= 3 ? 'small' : 'medium',
|
||||
hoverMessage: this.$i18n2.baseText('nodeBase.clickToAddNodeOrDragToConnect'),
|
||||
hoverMessage: this.$i.baseText('nodeBase.clickToAddNodeOrDragToConnect'),
|
||||
},
|
||||
endpointHoverStyle: {
|
||||
fill: getStyleTokenValue('--color-primary'),
|
||||
|
||||
@@ -263,8 +263,8 @@ export const pushConnection = mixins(
|
||||
// Workflow did execute without a problem
|
||||
this.$titleSet(workflow.name as string, 'IDLE');
|
||||
this.$showMessage({
|
||||
title: this.$i18n2.baseText('pushConnection.showMessage.title'),
|
||||
message: this.$i18n2.baseText('pushConnection.showMessage.message'),
|
||||
title: this.$i.baseText('pushConnection.showMessage.title'),
|
||||
message: this.$i.baseText('pushConnection.showMessage.message'),
|
||||
type: 'success',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -134,8 +134,8 @@ export const showMessage = mixins(externalHooks).extend({
|
||||
async confirmMessage (message: string, headline: string, type: MessageType | null = 'warning', confirmButtonText?: string, cancelButtonText?: string): Promise<boolean> {
|
||||
try {
|
||||
const options: ElMessageBoxOptions = {
|
||||
confirmButtonText: confirmButtonText || this.$i18n2.baseText('showMessage.ok'),
|
||||
cancelButtonText: cancelButtonText || this.$i18n2.baseText('showMessage.cancel'),
|
||||
confirmButtonText: confirmButtonText || this.$i.baseText('showMessage.ok'),
|
||||
cancelButtonText: cancelButtonText || this.$i.baseText('showMessage.cancel'),
|
||||
dangerouslyUseHTMLString: true,
|
||||
...(type && { type }),
|
||||
};
|
||||
@@ -173,7 +173,7 @@ export const showMessage = mixins(externalHooks).extend({
|
||||
<summary
|
||||
style="color: #ff6d5a; font-weight: bold; cursor: pointer;"
|
||||
>
|
||||
${this.$i18n2.baseText('showMessage.showDetails')}
|
||||
${this.$i.baseText('showMessage.showDetails')}
|
||||
</summary>
|
||||
<p>${node.name}: ${errorDescription}</p>
|
||||
</details>
|
||||
|
||||
@@ -478,8 +478,8 @@ export const workflowHelpers = mixins(
|
||||
this.$store.commit('removeActiveAction', 'workflowSaving');
|
||||
|
||||
this.$showMessage({
|
||||
title: this.$i18n2.baseText('workflowHelpers.showMessage.title'),
|
||||
message: this.$i18n2.baseText('workflowHelpers.showMessage.message') + `: "${e.message}"`,
|
||||
title: this.$i.baseText('workflowHelpers.showMessage.title'),
|
||||
message: this.$i.baseText('workflowHelpers.showMessage.message') + `: "${e.message}"`,
|
||||
type: 'error',
|
||||
});
|
||||
|
||||
@@ -552,8 +552,8 @@ export const workflowHelpers = mixins(
|
||||
this.$store.commit('removeActiveAction', 'workflowSaving');
|
||||
|
||||
this.$showMessage({
|
||||
title: this.$i18n2.baseText('workflowHelpers.showMessage.title'),
|
||||
message: this.$i18n2.baseText('workflowHelpers.showMessage.message') + `: "${e.message}"`,
|
||||
title: this.$i.baseText('workflowHelpers.showMessage.title'),
|
||||
message: this.$i.baseText('workflowHelpers.showMessage.message') + `: "${e.message}"`,
|
||||
type: 'error',
|
||||
});
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export const workflowRun = mixins(
|
||||
// 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(
|
||||
this.$i18n2.baseText('workflowRun.noActiveConnectionToTheServer'),
|
||||
this.$i.baseText('workflowRun.noActiveConnectionToTheServer'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@ export const workflowRun = mixins(
|
||||
}
|
||||
|
||||
this.$showMessage({
|
||||
title: this.$i18n2.baseText('workflowRun.showMessage.title'),
|
||||
message: this.$i18n2.baseText('workflowRun.showMessage.message') + ':<br /> - ' + errorMessages.join('<br /> - '),
|
||||
title: this.$i.baseText('workflowRun.showMessage.title'),
|
||||
message: this.$i.baseText('workflowRun.showMessage.message') + ':<br /> - ' + errorMessages.join('<br /> - '),
|
||||
type: 'error',
|
||||
duration: 0,
|
||||
});
|
||||
@@ -204,8 +204,8 @@ export const workflowRun = mixins(
|
||||
this.$titleSet(workflow.name as string, 'ERROR');
|
||||
this.$showError(
|
||||
error,
|
||||
this.$i18n2.baseText('workflowRun.showError.title'),
|
||||
this.$i18n2.baseText('workflowRun.showError.message') + ':',
|
||||
this.$i.baseText('workflowRun.showError.title'),
|
||||
this.$i.baseText('workflowRun.showError.message') + ':',
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user