diff --git a/.gitignore b/.gitignore index 359d346dea..f1cb86f2ed 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,5 @@ yarn.lock google-generated-credentials.json _START_PACKAGE .env -.vscode/* -!.vscode/extensions.json .idea -vetur.config.js nodelinter.config.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..4e85cee348 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "vetur.experimental.templateInterpolationService": true, +} \ No newline at end of file diff --git a/packages/cli/config/index.ts b/packages/cli/config/index.ts index c4b822ffa8..c06c1e200e 100644 --- a/packages/cli/config/index.ts +++ b/packages/cli/config/index.ts @@ -689,6 +689,13 @@ const config = convict({ }, }, }, + + defaultLocale: { + doc: 'Default locale for the UI', + format: String, + default: 'en', + env: 'N8N_DEFAULT_LOCALE', + }, }); // Overwrite default configuration with settings which got defined in diff --git a/packages/cli/src/Interfaces.ts b/packages/cli/src/Interfaces.ts index d5c11a8f3f..0424f9751b 100644 --- a/packages/cli/src/Interfaces.ts +++ b/packages/cli/src/Interfaces.ts @@ -394,6 +394,7 @@ export interface IN8nUISettings { instanceId: string; telemetry: ITelemetrySettings; personalizationSurvey: IPersonalizationSurvey; + defaultLocale: string; } export interface IPersonalizationSurveyAnswers { diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index e9de494f44..2f095006f6 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -280,6 +280,7 @@ class App { personalizationSurvey: { shouldShow: false, }, + defaultLocale: config.get('defaultLocale'), }; } diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index 60e7485c89..94b10f17a3 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -29,7 +29,8 @@ "n8n-design-system": "~0.6.0", "timeago.js": "^4.0.2", "v-click-outside": "^3.1.2", - "vue-fragment": "^1.5.2" + "vue-fragment": "^1.5.2", + "vue-i18n": "^8.26.7" }, "devDependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.35", diff --git a/packages/editor-ui/src/Interface.ts b/packages/editor-ui/src/Interface.ts index 02fe67ec4f..055603a471 100644 --- a/packages/editor-ui/src/Interface.ts +++ b/packages/editor-ui/src/Interface.ts @@ -470,6 +470,7 @@ export interface IN8nUISettings { instanceId: string; personalizationSurvey?: IPersonalizationSurvey; telemetry: ITelemetrySettings; + defaultLocale: string; } export interface IWorkflowSettings extends IWorkflowSettingsWorkflow { @@ -583,6 +584,7 @@ export interface IRootState { activeActions: string[]; activeNode: string | null; baseUrl: string; + defaultLocale: string; endpointWebhook: string; endpointWebhookTest: string; executionId: string | null; diff --git a/packages/editor-ui/src/components/About.vue b/packages/editor-ui/src/components/About.vue index b2c079dbf2..79c60f8213 100644 --- a/packages/editor-ui/src/components/About.vue +++ b/packages/editor-ui/src/components/About.vue @@ -1,18 +1,18 @@