mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Account for multiple headers in single translation file
This commit is contained in:
@@ -85,7 +85,9 @@ function getTranslationPaths() {
|
||||
function getHeadersAndTranslations(paths) {
|
||||
return paths.reduce((acc, cur) => {
|
||||
const translation = require(cur.source);
|
||||
const nodeType = Object.keys(translation).pop();
|
||||
const nodeTypes = Object.keys(translation);
|
||||
|
||||
for (const nodeType of nodeTypes) {
|
||||
const { header } = translation[nodeType];
|
||||
|
||||
if (isValidHeader(header, ALLOWED_HEADER_KEYS)) {
|
||||
@@ -96,6 +98,7 @@ function getHeadersAndTranslations(paths) {
|
||||
destinationPath: cur.destination,
|
||||
content: translation,
|
||||
});
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, { headers: {}, translations: [] });
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
module.exports = {
|
||||
githubTrigger: {
|
||||
header: {
|
||||
displayName: '🇩🇪 GitHub Trigger',
|
||||
description: '🇩🇪 Listen to GitHub events',
|
||||
},
|
||||
},
|
||||
github: {
|
||||
header: {
|
||||
displayName: '🇩🇪 GitHub',
|
||||
|
||||
Reference in New Issue
Block a user