mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
✏️ Add i18n to reportUnsetCredential()
This commit is contained in:
parent
43f7e2c8aa
commit
760ef5a32b
|
@ -124,6 +124,23 @@ export const nodeHelpers = mixins(
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
reportUnsetCredential(credentialType: ICredentialType) {
|
||||||
|
return {
|
||||||
|
credentials: {
|
||||||
|
[credentialType.name]: [
|
||||||
|
this.$locale.baseText(
|
||||||
|
'nodeHelpers.credentialsUnset',
|
||||||
|
{
|
||||||
|
interpolate: {
|
||||||
|
credentialType: credentialType.displayName,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
// Updates the execution issues.
|
// Updates the execution issues.
|
||||||
updateNodesExecutionIssues () {
|
updateNodesExecutionIssues () {
|
||||||
const nodes = this.$store.getters.allNodes;
|
const nodes = this.$store.getters.allNodes;
|
||||||
|
@ -219,7 +236,7 @@ export const nodeHelpers = mixins(
|
||||||
selectedCredsAreUnusable(node, genericAuthType)
|
selectedCredsAreUnusable(node, genericAuthType)
|
||||||
) {
|
) {
|
||||||
const credential = this.getCredentialTypeByName(genericAuthType);
|
const credential = this.getCredentialTypeByName(genericAuthType);
|
||||||
return reportUnsetCredential(credential);
|
return this.reportUnsetCredential(credential);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
@ -232,7 +249,7 @@ export const nodeHelpers = mixins(
|
||||||
|
|
||||||
if (selectedCredsDoNotExist(node, nodeCredentialType, stored)) {
|
if (selectedCredsDoNotExist(node, nodeCredentialType, stored)) {
|
||||||
const credential = this.getCredentialTypeByName(nodeCredentialType);
|
const credential = this.getCredentialTypeByName(nodeCredentialType);
|
||||||
return reportUnsetCredential(credential);
|
return this.reportUnsetCredential(credential);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +260,7 @@ export const nodeHelpers = mixins(
|
||||||
selectedCredsAreUnusable(node, nodeCredentialType)
|
selectedCredsAreUnusable(node, nodeCredentialType)
|
||||||
) {
|
) {
|
||||||
const credential = this.getCredentialTypeByName(nodeCredentialType);
|
const credential = this.getCredentialTypeByName(nodeCredentialType);
|
||||||
return reportUnsetCredential(credential);
|
return this.reportUnsetCredential(credential);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const credentialTypeDescription of nodeType!.credentials!) {
|
for (const credentialTypeDescription of nodeType!.credentials!) {
|
||||||
|
@ -469,14 +486,6 @@ function selectedCredsDoNotExist(
|
||||||
return !storedCredsByType.find((c) => c.id === selectedCredsByType.id);
|
return !storedCredsByType.find((c) => c.id === selectedCredsByType.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function reportUnsetCredential(credentialType: ICredentialType) {
|
|
||||||
return {
|
|
||||||
credentials: {
|
|
||||||
[credentialType.name]: [`Credentials for "${credentialType.displayName}" are not set.`],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
declare namespace HttpRequestNode {
|
declare namespace HttpRequestNode {
|
||||||
namespace V2 {
|
namespace V2 {
|
||||||
type AuthParams = {
|
type AuthParams = {
|
||||||
|
|
|
@ -387,6 +387,7 @@
|
||||||
"nodeErrorView.stack": "Stack",
|
"nodeErrorView.stack": "Stack",
|
||||||
"nodeErrorView.theErrorCauseIsTooLargeToBeDisplayed": "The error cause is too large to be displayed",
|
"nodeErrorView.theErrorCauseIsTooLargeToBeDisplayed": "The error cause is too large to be displayed",
|
||||||
"nodeErrorView.time": "Time",
|
"nodeErrorView.time": "Time",
|
||||||
|
"nodeHelpers.credentialsUnset": "Credentials for '{credentialType}' are not set.",
|
||||||
"nodeSettings.alwaysOutputData.description": "If active, will output a single, empty item when the output would have been empty. Use to prevent the workflow finishing on this node.",
|
"nodeSettings.alwaysOutputData.description": "If active, will output a single, empty item when the output would have been empty. Use to prevent the workflow finishing on this node.",
|
||||||
"nodeSettings.alwaysOutputData.displayName": "Always Output Data",
|
"nodeSettings.alwaysOutputData.displayName": "Always Output Data",
|
||||||
"nodeSettings.clickOnTheQuestionMarkIcon": "Click the '?' icon to open this node on n8n.io",
|
"nodeSettings.clickOnTheQuestionMarkIcon": "Click the '?' icon to open this node on n8n.io",
|
||||||
|
|
Loading…
Reference in a new issue