mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-07-14 17:07:22 +02:00
⚡ Switch to JSON for localization service
This commit is contained in:
@@ -34,6 +34,6 @@ export async function getNodeTranslationPath(
|
||||
const maxVersion = await getMaxVersion(nodeDir);
|
||||
|
||||
return maxVersion
|
||||
? join(nodeDir, `v${maxVersion}`, 'translations', `${language}.js`)
|
||||
: join(nodeDir, 'translations', `${language}.js`);
|
||||
? join(nodeDir, `v${maxVersion}`, 'translations', `${language}.json`)
|
||||
: join(nodeDir, 'translations', `${language}.json`);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import VueI18n from 'vue-i18n';
|
||||
import englishBaseText from './locales/en';
|
||||
const englishBaseText = require('./locales/en');
|
||||
import axios from 'axios';
|
||||
import { INodeTranslationHeaders } from '@/Interface';
|
||||
|
||||
@@ -40,7 +40,7 @@ export async function loadLanguage(language?: string) {
|
||||
return Promise.resolve(setLanguage(language));
|
||||
}
|
||||
|
||||
const { numberFormats, ...rest } = require(`./locales/${language}`).default;
|
||||
const { numberFormats, ...rest } = require(`./locales/${language}.json`);
|
||||
|
||||
i18n.setLocaleMessage(language, rest);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -51,7 +51,7 @@ function getTranslationPaths() {
|
||||
__dirname,
|
||||
cur.split('/').slice(1, -1).join('/'),
|
||||
'translations',
|
||||
`${locale}.ts`,
|
||||
`${locale}.json`,
|
||||
);
|
||||
|
||||
if (existsSync(sourcePath) && !seen[sourcePath]) {
|
||||
@@ -61,7 +61,7 @@ function getTranslationPaths() {
|
||||
__dirname,
|
||||
cur.split('/').slice(0, -1).join('/'),
|
||||
'translations',
|
||||
`${locale}.js`,
|
||||
`${locale}.json`,
|
||||
);
|
||||
|
||||
acc.push({
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"bitwarden": {
|
||||
"header": {
|
||||
"displayName": "🇩🇪 Bitwarden",
|
||||
"description": "🇩🇪 Consume Bitwarden API"
|
||||
},
|
||||
"credentialsModal": {
|
||||
"bitwardenApi": {
|
||||
"environment": {
|
||||
"displayName": "🇩🇪 Environment",
|
||||
"description": "🇩🇪 Description for environment",
|
||||
"options": {
|
||||
"cloudHosted": {
|
||||
"displayName": "🇩🇪 Cloud-hosted",
|
||||
"description": "🇩🇪 Description for cloud-hosted"
|
||||
},
|
||||
"selfHosted": {
|
||||
"displayName": "🇩🇪 Self-hosted"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nodeView": {}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
module.exports = {
|
||||
bitwarden: {
|
||||
header: {
|
||||
displayName: '🇩🇪 Bitwarden',
|
||||
description: '🇩🇪 Consume Bitwarden API',
|
||||
},
|
||||
credentialsModal: {
|
||||
bitwardenApi: {
|
||||
environment: {
|
||||
displayName: '🇩🇪 Environment',
|
||||
description: '🇩🇪 Description for environment',
|
||||
options: {
|
||||
cloudHosted: {
|
||||
displayName: '🇩🇪 Cloud-hosted',
|
||||
description: '🇩🇪 Description for cloud-hosted',
|
||||
},
|
||||
selfHosted: {
|
||||
displayName: '🇩🇪 Self-hosted',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
nodeView: {},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,147 @@
|
||||
{
|
||||
"githubTrigger": {
|
||||
"header": {
|
||||
"displayName": "🇩🇪 GitHub Trigger",
|
||||
"description": "🇩🇪 Listen to GitHub events"
|
||||
}
|
||||
},
|
||||
"github": {
|
||||
"header": {
|
||||
"displayName": "🇩🇪 GitHub",
|
||||
"description": "🇩🇪 Consume GitHub API"
|
||||
},
|
||||
"credentialsModal": {
|
||||
"githubOAuth2Api": {
|
||||
"server": {
|
||||
"displayName": "🇩🇪 Github Server",
|
||||
"description": "🇩🇪 The server to connect to. Only has to be set if Github Enterprise is used."
|
||||
}
|
||||
},
|
||||
"githubApi": {
|
||||
"server": {
|
||||
"displayName": "🇩🇪 Github Server",
|
||||
"description": "🇩🇪 The server to connect to. Only has to be set if Github Enterprise is used."
|
||||
},
|
||||
"user": {
|
||||
"placeholder": "🇩🇪 Hans"
|
||||
},
|
||||
"accessToken": {
|
||||
"placeholder": "🇩🇪 123"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nodeView": {
|
||||
"authentication": {
|
||||
"displayName": "🇩🇪 Authentication",
|
||||
"options": {
|
||||
"accessToken": {
|
||||
"displayName": "🇩🇪 Access Token"
|
||||
},
|
||||
"oAuth2": {
|
||||
"displayName": "🇩🇪 OAuth2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resource": {
|
||||
"displayName": "🇩🇪 Resource",
|
||||
"description": "🇩🇪 The resource to operate on.",
|
||||
"options": {
|
||||
"issue": {
|
||||
"displayName": "🇩🇪 Issue"
|
||||
},
|
||||
"file": {
|
||||
"displayName": "🇩🇪 File"
|
||||
},
|
||||
"repository": {
|
||||
"displayName": "🇩🇪 Repository"
|
||||
},
|
||||
"release": {
|
||||
"displayName": "🇩🇪 Release"
|
||||
},
|
||||
"review": {
|
||||
"displayName": "🇩🇪 Review"
|
||||
},
|
||||
"user": {
|
||||
"displayName": "🇩🇪 User"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operation": {
|
||||
"displayName": "🇩🇪 Operation",
|
||||
"options": {
|
||||
"create": {
|
||||
"displayName": "🇩🇪 Create",
|
||||
"description": "🇩🇪 Create a new issue."
|
||||
},
|
||||
"get": {
|
||||
"displayName": "🇩🇪 Get",
|
||||
"description": "🇩🇪 Get the data of a single issue."
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner": {
|
||||
"displayName": "🇩🇪 Repository Owner",
|
||||
"placeholder": "🇩🇪 n8n-io",
|
||||
"description": "🇩🇪 Owner of the repository."
|
||||
},
|
||||
"repository": {
|
||||
"displayName": "🇩🇪 Repository Name",
|
||||
"placeholder": "🇩🇪 n8n"
|
||||
},
|
||||
"title": {
|
||||
"displayName": "🇩🇪 Title"
|
||||
},
|
||||
"body": {
|
||||
"displayName": "🇩🇪 Body"
|
||||
},
|
||||
"labels": {
|
||||
"displayName": "🇩🇪 Labels",
|
||||
"multipleValueButtonText": "🇩🇪 Add Label"
|
||||
},
|
||||
"assignees": {
|
||||
"displayName": "🇩🇪 Assignees",
|
||||
"multipleValueButtonText": "🇩🇪 Add Assignee"
|
||||
},
|
||||
"label": {
|
||||
"displayName": "🇩🇪 Label",
|
||||
"description": "🇩🇪 Label to add to issue."
|
||||
},
|
||||
"assignee": {
|
||||
"displayName": "🇩🇪 Assignee",
|
||||
"description": "🇩🇪 User to assign issue to."
|
||||
},
|
||||
"additionalParameters": {
|
||||
"displayName": "🇩🇪 Additional Fields",
|
||||
"placeholder": "🇩🇪 Add Field",
|
||||
"options": {
|
||||
"author": {
|
||||
"displayName": "🇩🇪 Author"
|
||||
},
|
||||
"branch": {
|
||||
"displayName": "🇩🇪 Branch"
|
||||
},
|
||||
"committer": {
|
||||
"displayName": "🇩🇪 Committer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"author": {
|
||||
"displayName": "🇩🇪 Author"
|
||||
},
|
||||
"branch": {
|
||||
"displayName": "🇩🇪 Branch"
|
||||
},
|
||||
"committer": {
|
||||
"displayName": "🇩🇪 Committer"
|
||||
},
|
||||
"name": {
|
||||
"displayName": "🇩🇪 Name",
|
||||
"description": "🇩🇪 The name of the author of the commit."
|
||||
},
|
||||
"email": {
|
||||
"displayName": "🇩🇪 Email",
|
||||
"description": "🇩🇪 The email of the author of the commit."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
module.exports = {
|
||||
githubTrigger: {
|
||||
header: {
|
||||
displayName: '🇩🇪 GitHub Trigger',
|
||||
description: '🇩🇪 Listen to GitHub events',
|
||||
},
|
||||
},
|
||||
github: {
|
||||
header: {
|
||||
displayName: '🇩🇪 GitHub',
|
||||
description: '🇩🇪 Consume GitHub API',
|
||||
},
|
||||
credentialsModal: {
|
||||
githubOAuth2Api: {
|
||||
server: {
|
||||
displayName: '🇩🇪 Github Server',
|
||||
description: '🇩🇪 The server to connect to. Only has to be set if Github Enterprise is used.',
|
||||
},
|
||||
},
|
||||
githubApi: {
|
||||
server: {
|
||||
displayName: '🇩🇪 Github Server',
|
||||
description: '🇩🇪 The server to connect to. Only has to be set if Github Enterprise is used.',
|
||||
},
|
||||
user: {
|
||||
placeholder: '🇩🇪 Hans',
|
||||
},
|
||||
accessToken: {
|
||||
placeholder: '🇩🇪 123',
|
||||
},
|
||||
},
|
||||
},
|
||||
nodeView: {
|
||||
authentication: {
|
||||
displayName: '🇩🇪 Authentication',
|
||||
options: {
|
||||
accessToken: {
|
||||
displayName: '🇩🇪 Access Token',
|
||||
},
|
||||
oAuth2: {
|
||||
displayName: '🇩🇪 OAuth2',
|
||||
},
|
||||
},
|
||||
},
|
||||
resource: {
|
||||
displayName: '🇩🇪 Resource',
|
||||
description: '🇩🇪 The resource to operate on.',
|
||||
options: {
|
||||
issue: {
|
||||
displayName: '🇩🇪 Issue',
|
||||
},
|
||||
file: {
|
||||
displayName: '🇩🇪 File',
|
||||
},
|
||||
repository: {
|
||||
displayName: '🇩🇪 Repository',
|
||||
},
|
||||
release: {
|
||||
displayName: '🇩🇪 Release',
|
||||
},
|
||||
review: {
|
||||
displayName: '🇩🇪 Review',
|
||||
},
|
||||
user: {
|
||||
displayName: '🇩🇪 User',
|
||||
},
|
||||
},
|
||||
},
|
||||
operation: {
|
||||
displayName: '🇩🇪 Operation',
|
||||
options: {
|
||||
create: {
|
||||
displayName: '🇩🇪 Create',
|
||||
description: '🇩🇪 Create a new issue.',
|
||||
},
|
||||
get: {
|
||||
displayName: '🇩🇪 Get',
|
||||
description: '🇩🇪 Get the data of a single issue.',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
owner: {
|
||||
displayName: '🇩🇪 Repository Owner',
|
||||
placeholder: '🇩🇪 n8n-io',
|
||||
description: '🇩🇪 Owner of the repository.',
|
||||
},
|
||||
repository: {
|
||||
displayName: '🇩🇪 Repository Name',
|
||||
placeholder: '🇩🇪 n8n',
|
||||
},
|
||||
title: {
|
||||
displayName: '🇩🇪 Title',
|
||||
},
|
||||
body: {
|
||||
displayName: '🇩🇪 Body',
|
||||
},
|
||||
|
||||
labels: {
|
||||
displayName: '🇩🇪 Labels',
|
||||
multipleValueButtonText: '🇩🇪 Add Label',
|
||||
},
|
||||
assignees: {
|
||||
displayName: '🇩🇪 Assignees',
|
||||
multipleValueButtonText: '🇩🇪 Add Assignee',
|
||||
},
|
||||
|
||||
label: {
|
||||
displayName: '🇩🇪 Label',
|
||||
description: '🇩🇪 Label to add to issue.',
|
||||
},
|
||||
assignee: {
|
||||
displayName: '🇩🇪 Assignee',
|
||||
description: '🇩🇪 User to assign issue to.',
|
||||
},
|
||||
|
||||
additionalParameters: {
|
||||
displayName: '🇩🇪 Additional Fields',
|
||||
placeholder: '🇩🇪 Add Field',
|
||||
options: {
|
||||
author: {
|
||||
displayName: '🇩🇪 Author',
|
||||
},
|
||||
branch: {
|
||||
displayName: '🇩🇪 Branch',
|
||||
},
|
||||
committer: {
|
||||
displayName: '🇩🇪 Committer',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
author: {
|
||||
displayName: '🇩🇪 Author',
|
||||
},
|
||||
|
||||
branch: {
|
||||
displayName: '🇩🇪 Branch',
|
||||
},
|
||||
|
||||
committer: {
|
||||
displayName: '🇩🇪 Committer',
|
||||
},
|
||||
|
||||
name: {
|
||||
displayName: '🇩🇪 Name',
|
||||
description: '🇩🇪 The name of the author of the commit.',
|
||||
},
|
||||
email: {
|
||||
displayName: '🇩🇪 Email',
|
||||
description: '🇩🇪 The email of the author of the commit.',
|
||||
},
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"start": {
|
||||
"header": {
|
||||
"displayName": "🇩🇪 Start"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
start: {
|
||||
header: {
|
||||
displayName: '🇩🇪 Start',
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user