mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(editor): Extract @n8n/i18n package for internationalization (no-changelog) (#15466)
This commit is contained in:
@@ -4,12 +4,14 @@ import { get } from 'lodash-es';
|
||||
import type { INodeParameters, INodeProperties } from 'n8n-workflow';
|
||||
import { deepCopy } from 'n8n-workflow';
|
||||
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
import { useI18n } from '@n8n/i18n';
|
||||
import type { IUpdateInformation } from '@/Interface';
|
||||
import CollectionParameter from '@/components/CollectionParameter.vue';
|
||||
import ParameterInputFull from '@/components/ParameterInputFull.vue';
|
||||
import { N8nButton, N8nInputLabel, N8nText } from '@n8n/design-system';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { storeToRefs } from 'pinia';
|
||||
|
||||
defineOptions({ name: 'MultipleParameter' });
|
||||
|
||||
@@ -31,8 +33,11 @@ const emit = defineEmits<{
|
||||
valueChanged: [parameterData: IUpdateInformation];
|
||||
}>();
|
||||
|
||||
const ndvStore = useNDVStore();
|
||||
const i18n = useI18n();
|
||||
|
||||
const { activeNode } = storeToRefs(ndvStore);
|
||||
|
||||
const mutableValues = ref<INodeParameters[]>(deepCopy(props.values));
|
||||
|
||||
watch(
|
||||
@@ -48,7 +53,7 @@ const addButtonText = computed(() => {
|
||||
return i18n.baseText('multipleParameter.addItem');
|
||||
}
|
||||
|
||||
return i18n.nodeText().multipleValueButtonText(props.parameter);
|
||||
return i18n.nodeText(activeNode.value?.type).multipleValueButtonText(props.parameter);
|
||||
});
|
||||
|
||||
const hideDelete = computed(() => props.parameter.options?.length === 1);
|
||||
@@ -108,8 +113,8 @@ const valueChanged = (parameterData: IUpdateInformation) => {
|
||||
<template>
|
||||
<div class="duplicate-parameter" @keydown.stop>
|
||||
<N8nInputLabel
|
||||
:label="i18n.nodeText().inputLabelDisplayName(parameter, path)"
|
||||
:tooltip-text="i18n.nodeText().inputLabelDescription(parameter, path)"
|
||||
:label="i18n.nodeText(activeNode?.type).inputLabelDisplayName(parameter, path)"
|
||||
:tooltip-text="i18n.nodeText(activeNode?.type).inputLabelDescription(parameter, path)"
|
||||
:underline="true"
|
||||
size="small"
|
||||
color="text-dark"
|
||||
|
||||
Reference in New Issue
Block a user