From 3f9127955a357bfcaff8ee6e22cdb04ab1010bd5 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Fri, 15 Nov 2024 19:11:58 -0500 Subject: [PATCH] refactor(editor): Stop using `$locale` in favor of the `i18n` composable (#11731) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ --- packages/editor-ui/src/__tests__/render.ts | 3 +- .../AskAssistant/NewAssistantSessionModal.vue | 4 +- .../src/components/BinaryDataDisplay.vue | 9 +- .../src/components/BinaryDataDisplayEmbed.vue | 7 +- .../src/components/CanvasControls.vue | 16 +- .../CodeNodeEditor/CodeNodeEditor.vue | 4 +- .../src/components/CodeNodeEditor/types.ts | 2 - .../src/components/CollectionParameter.vue | 2 +- .../CommunityPlusEnrollmentModal.vue | 2 +- .../CredentialEdit/AuthTypeSelector.vue | 7 +- .../CredentialEdit/CredentialConfig.vue | 48 +++--- .../CredentialEdit/CredentialEdit.vue | 6 +- .../CredentialEdit/GoogleAuthButton.vue | 4 +- .../components/CredentialEdit/OauthButton.vue | 4 +- .../src/components/CredentialsSelect.vue | 5 +- .../src/components/CredentialsSelectModal.vue | 10 +- .../editor-ui/src/components/GoBackButton.vue | 4 +- .../src/components/ImportCurlParameter.vue | 4 +- .../editor-ui/src/components/InputPanel.vue | 28 ++-- .../components/MainHeader/WorkflowDetails.vue | 17 ++- .../editor-ui/src/components/MainSidebar.vue | 30 ++-- .../src/components/MfaSetupModal.vue | 48 +++--- .../src/components/NDVSubConnections.vue | 6 +- .../src/components/Node/NodeCreation.vue | 6 +- .../Node/NodeCreator/Modes/NodesMode.vue | 2 +- .../Node/NodeCreator/Panel/NoResults.vue | 18 ++- .../Node/NodeCreator/Panel/NodesListPanel.vue | 4 +- .../src/components/NodeCredentials.vue | 5 +- .../src/components/NodeDetailsView.vue | 6 +- .../editor-ui/src/components/NodeSettings.vue | 14 +- .../editor-ui/src/components/NodeTitle.vue | 9 +- .../src/components/ParameterInput.vue | 12 +- .../src/components/ParameterInputExpanded.vue | 8 +- .../src/components/ParameterInputList.vue | 16 +- .../src/components/ParameterIssues.vue | 5 +- .../src/components/PersonalizationModal.vue | 6 +- .../ResourceLocator/ResourceLocator.vue | 12 +- .../ResourceLocatorDropdown.vue | 11 +- .../ResourceMapper/MappingFields.vue | 5 +- packages/editor-ui/src/components/RunData.vue | 74 +++++---- .../RunDataAi/AiRunContentBlock.vue | 2 +- .../src/components/RunDataAi/RunDataAi.vue | 8 +- .../components/RunDataAi/RunDataAiContent.vue | 16 +- .../src/components/RunDataSchema.vue | 14 +- .../editor-ui/src/components/SaveButton.vue | 2 +- .../EventSelection.ee.vue | 21 ++- packages/editor-ui/src/components/Sticky.vue | 6 +- .../src/components/TagsManager/NoTagsView.vue | 7 +- .../TagsManager/TagsView/TagsTable.vue | 27 ++-- .../TagsManager/TagsView/TagsTableHeader.vue | 7 +- .../src/components/TemplateDetails.vue | 2 +- .../editor-ui/src/components/TemplateList.vue | 5 +- .../editor-ui/src/components/TextEdit.vue | 9 +- .../editor-ui/src/components/VersionCard.vue | 10 +- .../src/components/Workers/WorkerCard.ee.vue | 5 +- .../Workers/WorkerChartsAccordion.ee.vue | 5 +- .../Workers/WorkerJobAccordion.ee.vue | 7 +- .../Workers/WorkerNetAccordion.ee.vue | 2 +- .../src/components/WorkflowSettings.vue | 44 +++--- .../elements/buttons/CanvasControlButtons.vue | 18 +-- .../nodes/render-types/CanvasNodeAddNodes.vue | 6 +- .../nodes/render-types/CanvasNodeDefault.vue | 2 +- .../parts/CanvasNodeStatusIcons.vue | 4 +- .../components/executions/ExecutionsTime.vue | 2 +- .../WorkflowExecutionAnnotationPanel.ee.vue | 14 +- .../WorkflowExecutionsInfoAccordion.vue | 13 +- .../workflow/WorkflowExecutionsSidebar.vue | 8 +- packages/editor-ui/src/main.ts | 3 +- .../editor-ui/src/plugins/i18n/docs/README.md | 2 +- packages/editor-ui/src/plugins/i18n/index.ts | 14 +- packages/editor-ui/src/shims-vue.d.ts | 1 - .../editor-ui/src/views/CanvasAddButton.vue | 7 +- packages/editor-ui/src/views/ErrorView.vue | 9 +- packages/editor-ui/src/views/NodeView.vue | 141 +++++++++--------- .../editor-ui/src/views/ProjectSettings.vue | 45 +++--- .../editor-ui/src/views/VariablesView.vue | 18 +-- packages/editor-ui/src/views/WorkerView.vue | 14 +- 77 files changed, 529 insertions(+), 474 deletions(-) diff --git a/packages/editor-ui/src/__tests__/render.ts b/packages/editor-ui/src/__tests__/render.ts index e46b615993..3bc310f790 100644 --- a/packages/editor-ui/src/__tests__/render.ts +++ b/packages/editor-ui/src/__tests__/render.ts @@ -1,6 +1,6 @@ import type { Plugin } from 'vue'; import { render } from '@testing-library/vue'; -import { i18nInstance, I18nPlugin } from '@/plugins/i18n'; +import { i18nInstance } from '@/plugins/i18n'; import { GlobalComponentsPlugin } from '@/plugins/components'; import { GlobalDirectivesPlugin } from '@/plugins/directives'; import { FontAwesomePlugin } from '@/plugins/icons'; @@ -32,7 +32,6 @@ const defaultOptions = { 'vue-json-pretty': vueJsonPretty, }, plugins: [ - I18nPlugin, i18nInstance, PiniaVuePlugin, FontAwesomePlugin, diff --git a/packages/editor-ui/src/components/AskAssistant/NewAssistantSessionModal.vue b/packages/editor-ui/src/components/AskAssistant/NewAssistantSessionModal.vue index 27e0054d77..4113aeecf4 100644 --- a/packages/editor-ui/src/components/AskAssistant/NewAssistantSessionModal.vue +++ b/packages/editor-ui/src/components/AskAssistant/NewAssistantSessionModal.vue @@ -66,9 +66,9 @@ const startNewSession = async () => {