Copy tweaks (#2780)

* Update en.json

* More copy tweaks and addressed PR comments

* 🔥 Remove empty strings from base text

*  Adjust `$showMessage` signature type

* 🔥 Remove message from Vue components

* ✏️ Fix typo

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
sirdavidoff
2022-02-18 16:26:44 +01:00
committed by GitHub
parent c026642f7b
commit 68c356c17c
16 changed files with 105 additions and 209 deletions

View File

@@ -264,7 +264,6 @@ export const pushConnection = mixins(
this.$titleSet(workflow.name as string, 'IDLE');
this.$showMessage({
title: this.$locale.baseText('pushConnection.showMessage.title'),
message: this.$locale.baseText('pushConnection.showMessage.message'),
type: 'success',
});
}

View File

@@ -12,13 +12,16 @@ let stickyNotificationQueue: ElNotificationComponent[] = [];
export const showMessage = mixins(externalHooks).extend({
methods: {
$showMessage(messageData: ElNotificationOptions, track = true) {
$showMessage(
messageData: Omit<ElNotificationOptions, 'message'> & { message?: string },
track = true,
) {
messageData.dangerouslyUseHTMLString = true;
if (messageData.position === undefined) {
messageData.position = 'bottom-right';
}
const notification = this.$notify(messageData);
const notification = this.$notify(messageData as ElNotificationOptions);
if (messageData.duration === 0) {
stickyNotificationQueue.push(notification);

View File

@@ -500,12 +500,12 @@ export const workflowHelpers = mixins(
this.$externalHooks().run('workflow.afterUpdate', { workflowData });
return true;
} catch (e) {
} catch (error) {
this.$store.commit('removeActiveAction', 'workflowSaving');
this.$showMessage({
title: this.$locale.baseText('workflowHelpers.showMessage.title'),
message: this.$locale.baseText('workflowHelpers.showMessage.message') + `"${e.message}"`,
message: error.message,
type: 'error',
});

View File

@@ -205,7 +205,6 @@ export const workflowRun = mixins(
this.$showError(
error,
this.$locale.baseText('workflowRun.showError.title'),
this.$locale.baseText('workflowRun.showError.message'),
);
return undefined;
}