refactor(editor): Stop using $locale in favor of the i18n composable (#11731)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Ricardo Espinoza
2024-11-15 19:11:58 -05:00
committed by GitHub
parent 54e1f62535
commit 3f9127955a
77 changed files with 529 additions and 474 deletions

View File

@@ -292,7 +292,7 @@ onMounted(() => {
data-test-id="resources-list-add"
@click="addTemporaryVariable"
>
{{ $locale.baseText(`variables.add`) }}
{{ i18n.baseText(`variables.add`) }}
</n8n-button>
</div>
<template #content>
@@ -309,15 +309,15 @@ onMounted(() => {
data-test-id="unavailable-resources-list"
emoji="👋"
:heading="
$locale.baseText(contextBasedTranslationKeys.variables.unavailable.title as BaseTextKey)
i18n.baseText(contextBasedTranslationKeys.variables.unavailable.title as BaseTextKey)
"
:description="
$locale.baseText(
i18n.baseText(
contextBasedTranslationKeys.variables.unavailable.description as BaseTextKey,
)
"
:button-text="
$locale.baseText(contextBasedTranslationKeys.variables.unavailable.button as BaseTextKey)
i18n.baseText(contextBasedTranslationKeys.variables.unavailable.button as BaseTextKey)
"
button-type="secondary"
@click:button="goToUpgrade"
@@ -329,15 +329,15 @@ onMounted(() => {
data-test-id="unavailable-resources-list"
emoji="👋"
:heading="
$locale.baseText(contextBasedTranslationKeys.variables.unavailable.title as BaseTextKey)
i18n.baseText(contextBasedTranslationKeys.variables.unavailable.title as BaseTextKey)
"
:description="
$locale.baseText(
i18n.baseText(
contextBasedTranslationKeys.variables.unavailable.description as BaseTextKey,
)
"
:button-text="
$locale.baseText(contextBasedTranslationKeys.variables.unavailable.button as BaseTextKey)
i18n.baseText(contextBasedTranslationKeys.variables.unavailable.button as BaseTextKey)
"
button-type="secondary"
@click:button="goToUpgrade"
@@ -347,11 +347,11 @@ onMounted(() => {
data-test-id="cannot-create-variables"
emoji="👋"
:heading="
$locale.baseText('variables.empty.notAllowedToCreate.heading', {
i18n.baseText('variables.empty.notAllowedToCreate.heading', {
interpolate: { name: usersStore.currentUser?.firstName ?? '' },
})
"
:description="$locale.baseText('variables.empty.notAllowedToCreate.description')"
:description="i18n.baseText('variables.empty.notAllowedToCreate.description')"
@click="goToUpgrade"
/>
</template>