diff --git a/packages/common/src/editors/__tests__/longTextEditor.spec.ts b/packages/common/src/editors/__tests__/longTextEditor.spec.ts index c6d587415..15be8a9fa 100644 --- a/packages/common/src/editors/__tests__/longTextEditor.spec.ts +++ b/packages/common/src/editors/__tests__/longTextEditor.spec.ts @@ -111,6 +111,7 @@ describe('LongTextEditor', () => { it('should initialize the editor', () => { gridOptionMock.translater = translateService; + gridOptionMock.enableTranslate = true; editor = new LongTextEditor(editorArguments); const editorCount = document.body.querySelectorAll('.slick-large-editor-text.editor-title textarea').length; const editorTextCounter = document.body.querySelectorAll('.slick-large-editor-text.editor-title .editor-footer .counter'); diff --git a/packages/common/src/editors/longTextEditor.ts b/packages/common/src/editors/longTextEditor.ts index 89a09d635..caab9f1cb 100644 --- a/packages/common/src/editors/longTextEditor.ts +++ b/packages/common/src/editors/longTextEditor.ts @@ -94,7 +94,7 @@ export class LongTextEditor implements Editor { init(): void { let cancelText = ''; let saveText = ''; - if (this._translater && this._translater.translate) { + if (this._translater && this._translater.translate && this.gridOptions.enableTranslate) { const translationPrefix = getTranslationPrefix(this.gridOptions); const cancelKey = this.editorOptions.buttonTexts?.cancelKey ?? `${translationPrefix}CANCEL`; const saveKey = this.editorOptions.buttonTexts?.saveKey ?? `${translationPrefix}SAVE`;