fix(editor): Upgrade vue-i18n to latest version (no-changelog) (#14130)

This commit is contained in:
Alex Grozav
2025-03-26 15:20:43 +02:00
committed by GitHub
parent c9b806d30b
commit ee64fdc5cb
11 changed files with 51 additions and 75 deletions

View File

@@ -82,7 +82,7 @@
"vue-agile": "^2.0.0",
"vue-chartjs": "^5.2.0",
"vue-github-button": "^3.1.3",
"vue-i18n": "^9.2.2",
"vue-i18n": "^11.1.2",
"vue-json-pretty": "2.2.4",
"vue-markdown-render": "catalog:frontend",
"vue-router": "catalog:frontend",

View File

@@ -253,7 +253,7 @@ onMounted(async () => {
i18n.baseText('projects.move.resource.modal.message.sharingInfo', {
adjustToNumber: props.data.resource.sharedWithProjects?.length,
interpolate: {
numberOfProjects: props.data.resource.sharedWithProjects?.length ?? 0,
count: props.data.resource.sharedWithProjects?.length ?? 0,
},
})
}}</span
@@ -271,7 +271,7 @@ onMounted(async () => {
{{
i18n.baseText('projects.move.resource.modal.message.usedCredentials.number', {
adjustToNumber: shareableCredentials.length,
interpolate: { number: shareableCredentials.length },
interpolate: { count: shareableCredentials.length },
})
}}
</span>

View File

@@ -30,7 +30,7 @@ const goToUpgrade = async () => {
{{
locale.baseText('projects.create.limit', {
adjustToNumber: props.limit,
interpolate: { num: String(props.limit) },
interpolate: { count: String(props.limit) },
})
}}
</template>

View File

@@ -1572,7 +1572,7 @@ defineExpose({ enterEditMode });
{{
i18n.baseText('ndv.search.items', {
adjustToNumber: unfilteredDataCount,
interpolate: { matched: dataCount, total: unfilteredDataCount },
interpolate: { matched: dataCount, count: unfilteredDataCount },
})
}}
</N8nText>

View File

@@ -375,7 +375,7 @@ const goToUpgrade = () => {
{{
i18n.baseText('executionsList.selectAll', {
adjustToNumber: total,
interpolate: { executionNum: `${total}` },
interpolate: { count: `${total}` },
})
}}
</th>

View File

@@ -204,7 +204,6 @@ export const useGlobalEntityCreation = () => {
const projectsLimitReachedMessage = computed(() => {
if (settingsStore.isCloudDeployment) {
return i18n.baseText('projects.create.limitReached.cloud', {
adjustToNumber: projectsStore.teamProjectsLimit,
interpolate: {
planName: cloudPlanStore.currentPlanData?.displayName ?? '',
limit: projectsStore.teamProjectsLimit,
@@ -221,7 +220,6 @@ export const useGlobalEntityCreation = () => {
}
return i18n.baseText('projects.create.limitReached', {
adjustToNumber: projectsStore.teamProjectsLimit,
interpolate: {
limit: projectsStore.teamProjectsLimit,
},

View File

@@ -66,11 +66,12 @@ export class I18nClass {
return this.baseTextCache.get(cacheKey) ?? key;
}
const interpolate = { ...options?.interpolate };
let result: string;
if (options?.adjustToNumber !== undefined) {
result = this.i18n.tc(key, options.adjustToNumber, options?.interpolate ?? {}).toString();
result = this.i18n.t(key, interpolate, options.adjustToNumber).toString();
} else {
result = this.i18n.t(key, options?.interpolate ?? {}).toString();
result = this.i18n.t(key, interpolate).toString();
}
// Store the result in the cache

View File

@@ -772,7 +772,7 @@
"executionsList.selectStatus": "Select Status",
"executionsList.selectWorkflow": "Select Workflow",
"executionsList.selected": "{count} execution selected: | {count} executions selected:",
"executionsList.selectAll": "Select {executionNum} finished execution | Select all {executionNum} finished executions",
"executionsList.selectAll": "Select {count} finished execution | Select all {count} finished executions",
"executionsList.test": "Test execution",
"executionsList.evaluation": "Evaluation execution",
"executionsList.showError.handleDeleteSelected.title": "Problem deleting executions",
@@ -2255,7 +2255,7 @@
"ndv.search.noMatch.description.link": "clearing",
"ndv.search.noMatchSchema.description": "To search field values, switch to table or JSON view. {link}",
"ndv.search.noMatchSchema.description.link": "Clear filter",
"ndv.search.items": "{matched} of {total} item | {matched} of {total} items",
"ndv.search.items": "{matched} of {count} item | {matched} of {count} items",
"updatesPanel.andIs": "and is",
"updatesPanel.behindTheLatest": "behind the latest and greatest n8n",
"updatesPanel.howToUpdateYourN8nVersion": "How to update your n8n version",
@@ -2731,7 +2731,7 @@
"projects.sharing.select.placeholder.user": "Share with user(s)",
"projects.sharing.select.placeholder.project": "Share with projects or users",
"projects.error.title": "Project error",
"projects.create.limit": "{num} project | {num} projects",
"projects.create.limit": "{count} project | {count} projects",
"projects.create.limitReached": "You have reached the {planName} plan limit of {limit}. Upgrade your plan to unlock more projects. {link}",
"projects.create.limitReached.cloud": "You have reached the {planName} plan limit of {limit}. Upgrade your plan to unlock more projects.",
"projects.create.limitReached.self": "Upgrade to unlock projects for more granular control over sharing, access and organisation of workflows",
@@ -2743,9 +2743,9 @@
"projects.move.resource.modal.message.personal": "owned by \"{resourceHomeProjectName}\".",
"projects.move.resource.modal.message.note": "Note",
"projects.move.resource.modal.message.sharingNote": "{note}: Moving will remove any existing sharing for this {resourceTypeLabel}.",
"projects.move.resource.modal.message.sharingInfo": "(Currently shared with {numberOfProjects} project) | (Currently shared with {numberOfProjects} projects)",
"projects.move.resource.modal.message.sharingInfo": "(Currently shared with {count} project) | (Currently shared with {count} projects)",
"projects.move.resource.modal.message.usedCredentials": "Also share the {usedCredentials} used by this workflow to ensure it will continue to run correctly",
"projects.move.resource.modal.message.usedCredentials.number": "{number} credential | {number} credentials",
"projects.move.resource.modal.message.usedCredentials.number": "{count} credential | {count} credentials",
"projects.move.resource.modal.message.unAccessibleCredentials": "Some credentials",
"projects.move.resource.modal.message.unAccessibleCredentials.note": "{credentials} used in this workflow will not be shared",
"projects.move.resource.modal.message.noProjects": "Currently there are not any projects or users available for you to move this {resourceTypeLabel} to.",

View File

@@ -16,6 +16,7 @@ import { useSettingsStore } from '@/stores/settings.store';
import { createFormEventBus } from '@n8n/design-system/utils';
import type { MfaModalEvents } from '@/event-bus/mfa';
import { promptMfaCodeBus } from '@/event-bus/mfa';
import type { BaseTextKey } from '@/plugins/i18n';
type UserBasicDetailsForm = {
firstName: string;
@@ -36,7 +37,7 @@ const formInputs = ref<null | IFormInputs>(null);
const formBus = createFormEventBus();
const readyToSubmit = ref(false);
const currentSelectedTheme = ref(useUIStore().theme);
const themeOptions = ref<Array<{ name: ThemeOption; label: string }>>([
const themeOptions = ref<Array<{ name: ThemeOption; label: BaseTextKey }>>([
{
name: 'system',
label: 'settings.personal.theme.systemDefault',
@@ -345,7 +346,7 @@ onBeforeUnmount(() => {
<n8n-option
v-for="item in themeOptions"
:key="item.name"
:label="$t(item.label)"
:label="i18n.baseText(item.label)"
:value="item.name"
>
</n8n-option>

View File

@@ -103,9 +103,10 @@ const testRunErrorDictionary: Partial<Record<TestRunErrorCode, BaseTextKey>> = {
EVALUATION_WORKFLOW_NOT_FOUND: 'testDefinition.listRuns.error.evaluationWorkflowNotFound',
} as const;
const getErrorBaseKey = (errorCode?: string) =>
const getErrorBaseKey = (errorCode?: string): string =>
testCaseErrorDictionary[errorCode as TestCaseExecutionErrorCodes] ??
testRunErrorDictionary[errorCode as TestRunErrorCode];
testRunErrorDictionary[errorCode as TestRunErrorCode] ??
'';
const getErrorTooltipLinkRoute = (row: TestCaseExecutionRecord) => {
if (row.errorCode === TEST_CASE_EXECUTION_ERROR_CODE.FAILED_TO_EXECUTE_EVALUATION_WORKFLOW) {

87
pnpm-lock.yaml generated
View File

@@ -1749,8 +1749,8 @@ importers:
specifier: ^3.1.3
version: 3.1.3
vue-i18n:
specifier: ^9.2.2
version: 9.2.2(vue@3.5.13(typescript@5.8.2))
specifier: ^11.1.2
version: 11.1.2(vue@3.5.13(typescript@5.8.2))
vue-json-pretty:
specifier: 2.2.4
version: 2.2.4(vue@3.5.13(typescript@5.8.2))
@@ -3785,25 +3785,17 @@ packages:
cpu: [x64]
os: [win32]
'@intlify/core-base@9.2.2':
resolution: {integrity: sha512-JjUpQtNfn+joMbrXvpR4hTF8iJQ2sEFzzK3KIESOx+f+uwIjgw20igOyaIdhfsVVBCds8ZM64MoeNSx+PHQMkA==}
engines: {node: '>= 14'}
'@intlify/core-base@11.1.2':
resolution: {integrity: sha512-nmG512G8QOABsserleechwHGZxzKSAlggGf9hQX0nltvSwyKNVuB/4o6iFeG2OnjXK253r8p8eSDOZf8PgFdWw==}
engines: {node: '>= 16'}
'@intlify/devtools-if@9.2.2':
resolution: {integrity: sha512-4ttr/FNO29w+kBbU7HZ/U0Lzuh2cRDhP8UlWOtV9ERcjHzuyXVZmjyleESK6eVP60tGC9QtQW9yZE+JeRhDHkg==}
engines: {node: '>= 14'}
'@intlify/message-compiler@11.1.2':
resolution: {integrity: sha512-T/xbNDzi+Yv0Qn2Dfz2CWCAJiwNgU5d95EhhAEf4YmOgjCKktpfpiUSmLcBvK1CtLpPQ85AMMQk/2NCcXnNj1g==}
engines: {node: '>= 16'}
'@intlify/message-compiler@9.2.2':
resolution: {integrity: sha512-IUrQW7byAKN2fMBe8z6sK6riG1pue95e5jfokn8hA5Q3Bqy4MBJ5lJAofUsawQJYHeoPJ7svMDyBaVJ4d0GTtA==}
engines: {node: '>= 14'}
'@intlify/shared@9.2.2':
resolution: {integrity: sha512-wRwTpsslgZS5HNyM7uDQYZtxnbI12aGiBZURX3BTR9RFIKKRWpllTsgzHWvj3HKm3Y2Sh5LPC1r0PDCKEhVn9Q==}
engines: {node: '>= 14'}
'@intlify/vue-devtools@9.2.2':
resolution: {integrity: sha512-+dUyqyCHWHb/UcvY1MlIpO87munedm3Gn6E9WWYdWrMuYLcoIoOEVDWSS8xSwtlPU+kA+MEQTP6Q1iI/ocusJg==}
engines: {node: '>= 14'}
'@intlify/shared@11.1.2':
resolution: {integrity: sha512-dF2iMMy8P9uKVHV/20LA1ulFLL+MKSbfMiixSmn6fpwqzvix38OIc7ebgnFbBqElvghZCW9ACtzKTGKsTGTWGA==}
engines: {node: '>= 16'}
'@ioredis/as-callback@3.0.0':
resolution: {integrity: sha512-Kqv1rZ3WbgOrS+hgzJ5xG5WQuhvzzSTRYvNeyPMLOAM78MHSnuKI20JeJGbpuAt//LCuP0vsexZcorqW7kWhJg==}
@@ -13369,9 +13361,6 @@ packages:
vue-component-type-helpers@2.2.8:
resolution: {integrity: sha512-4bjIsC284coDO9om4HPA62M7wfsTvcmZyzdfR0aUlFXqq4tXxM1APyXpNVxPC8QazKw9OhmZNHBVDA6ODaZsrA==}
vue-component-type-helpers@3.0.0-alpha.2:
resolution: {integrity: sha512-dv9YzsuJFLnpRNxKU0exwIlCIA/v+rXrgCsEtaENsFJLPFMw1Sr4IRctilwfjnjCzoJGgGACHRZfxo6ZwlH2fQ==}
vue-demi@0.14.10:
resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==}
engines: {node: '>=12'}
@@ -13397,9 +13386,9 @@ packages:
vue-github-button@3.1.3:
resolution: {integrity: sha512-ZdOnUuYJL/wUsxISsC96TARzCdf1twaWooZoI14+g4RHsJltPY+Agw6Ox6pjuMqMX0uhSK1JOMFUFNCQGlcZGA==}
vue-i18n@9.2.2:
resolution: {integrity: sha512-yswpwtj89rTBhegUAv9Mu37LNznyu3NpyLQmozF3i1hYOhwpG8RjcjIFIIfnu+2MDZJGSZPXaKWvnQA71Yv9TQ==}
engines: {node: '>= 14'}
vue-i18n@11.1.2:
resolution: {integrity: sha512-MfdkdKGUHN+jkkaMT5Zbl4FpRmN7kfelJIwKoUpJ32ONIxdFhzxZiLTVaAXkAwvH3y9GmWpoiwjDqbPIkPIMFA==}
engines: {node: '>= 16'}
peerDependencies:
vue: ^3.0.0
@@ -16200,28 +16189,17 @@ snapshots:
'@img/sharp-win32-x64@0.33.5':
optional: true
'@intlify/core-base@9.2.2':
'@intlify/core-base@11.1.2':
dependencies:
'@intlify/devtools-if': 9.2.2
'@intlify/message-compiler': 9.2.2
'@intlify/shared': 9.2.2
'@intlify/vue-devtools': 9.2.2
'@intlify/message-compiler': 11.1.2
'@intlify/shared': 11.1.2
'@intlify/devtools-if@9.2.2':
'@intlify/message-compiler@11.1.2':
dependencies:
'@intlify/shared': 9.2.2
'@intlify/shared': 11.1.2
source-map-js: 1.2.1
'@intlify/message-compiler@9.2.2':
dependencies:
'@intlify/shared': 9.2.2
source-map: 0.6.1
'@intlify/shared@9.2.2': {}
'@intlify/vue-devtools@9.2.2':
dependencies:
'@intlify/core-base': 9.2.2
'@intlify/shared': 9.2.2
'@intlify/shared@11.1.2': {}
'@ioredis/as-callback@3.0.0': {}
@@ -18423,7 +18401,7 @@ snapshots:
ts-dedent: 2.2.0
type-fest: 2.19.0
vue: 3.5.13(typescript@5.8.2)
vue-component-type-helpers: 3.0.0-alpha.2
vue-component-type-helpers: 2.2.8
'@supabase/auth-js@2.65.0':
dependencies:
@@ -21562,7 +21540,7 @@ snapshots:
eslint-import-resolver-node@0.3.9:
dependencies:
debug: 3.2.7(supports-color@8.1.1)
debug: 3.2.7(supports-color@5.5.0)
is-core-module: 2.13.1
resolve: 1.22.8
transitivePeerDependencies:
@@ -21587,7 +21565,7 @@ snapshots:
eslint-module-utils@2.8.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0):
dependencies:
debug: 3.2.7(supports-color@8.1.1)
debug: 3.2.7(supports-color@5.5.0)
optionalDependencies:
'@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.8.2)
eslint: 8.57.0
@@ -21607,7 +21585,7 @@ snapshots:
array.prototype.findlastindex: 1.2.3
array.prototype.flat: 1.3.2
array.prototype.flatmap: 1.3.2
debug: 3.2.7(supports-color@8.1.1)
debug: 3.2.7(supports-color@5.5.0)
doctrine: 2.1.0
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
@@ -22385,7 +22363,7 @@ snapshots:
array-parallel: 0.1.3
array-series: 0.1.5
cross-spawn: 4.0.2
debug: 3.2.7(supports-color@8.1.1)
debug: 3.2.7(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
@@ -25257,7 +25235,7 @@ snapshots:
pdf-parse@1.1.1:
dependencies:
debug: 3.2.7(supports-color@8.1.1)
debug: 3.2.7(supports-color@5.5.0)
node-ensure: 0.0.0
transitivePeerDependencies:
- supports-color
@@ -26112,7 +26090,7 @@ snapshots:
rhea@1.0.24:
dependencies:
debug: 3.2.7(supports-color@8.1.1)
debug: 3.2.7(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
@@ -27736,8 +27714,6 @@ snapshots:
vue-component-type-helpers@2.2.8: {}
vue-component-type-helpers@3.0.0-alpha.2: {}
vue-demi@0.14.10(vue@3.5.13(typescript@5.8.2)):
dependencies:
vue: 3.5.13(typescript@5.8.2)
@@ -27775,11 +27751,10 @@ snapshots:
dependencies:
github-buttons: 2.29.1
vue-i18n@9.2.2(vue@3.5.13(typescript@5.8.2)):
vue-i18n@11.1.2(vue@3.5.13(typescript@5.8.2)):
dependencies:
'@intlify/core-base': 9.2.2
'@intlify/shared': 9.2.2
'@intlify/vue-devtools': 9.2.2
'@intlify/core-base': 11.1.2
'@intlify/shared': 11.1.2
'@vue/devtools-api': 6.6.4
vue: 3.5.13(typescript@5.8.2)