From 6a0313b661bf385f20a83f94e0005fb3ed98b12d Mon Sep 17 00:00:00 2001 From: tsv2013 Date: Fri, 17 May 2024 10:27:44 +0300 Subject: [PATCH] Fixed #5503 - The JSON Editor tab caption appears untranslated (#5505) Co-authored-by: tsv2013 --- .../src/components/tabs/json-editor-ace.ts | 2 +- .../src/components/tabs/json-editor-textarea.ts | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/survey-creator-core/src/components/tabs/json-editor-ace.ts b/packages/survey-creator-core/src/components/tabs/json-editor-ace.ts index b460370c0a..5b082adc0c 100644 --- a/packages/survey-creator-core/src/components/tabs/json-editor-ace.ts +++ b/packages/survey-creator-core/src/components/tabs/json-editor-ace.ts @@ -107,7 +107,7 @@ export class TabJsonEditorAcePlugin creator.addPluginTab( "editor", this, - getLocString("ed.jsonEditor"), + "ed.jsonEditor", "svc-tab-json-editor-ace" ); } diff --git a/packages/survey-creator-core/src/components/tabs/json-editor-textarea.ts b/packages/survey-creator-core/src/components/tabs/json-editor-textarea.ts index 457bfd995c..296d1aacad 100644 --- a/packages/survey-creator-core/src/components/tabs/json-editor-textarea.ts +++ b/packages/survey-creator-core/src/components/tabs/json-editor-textarea.ts @@ -30,7 +30,7 @@ export class TextareaJsonEditorModel extends JsonEditorBaseModel { textareaElement.value = textareaElement.value.substring(0, start) + "\t" + textareaElement.value.substring(end); textareaElement.selectionStart = - textareaElement.selectionEnd = start + 1; + textareaElement.selectionEnd = start + 1; e.stopPropagation(); } return true; @@ -45,7 +45,7 @@ export class TextareaJsonEditorModel extends JsonEditorBaseModel { this.isProcessingImmediately = false; } protected gotoError(at: number, row: number, column: number): void { - if(!this.textElement) return; + if (!this.textElement) return; const el = this.textElement; el.selectionStart = at; el.selectionEnd = at; @@ -86,14 +86,13 @@ export class TextareaJsonEditorModel extends JsonEditorBaseModel { export class TabJsonEditorTextareaPlugin extends TabJsonEditorBasePlugin - implements ICreatorPlugin -{ + implements ICreatorPlugin { constructor(creator: SurveyCreatorModel) { super(creator); creator.addPluginTab( "editor", this, - getLocString("ed.jsonEditor"), + "ed.jsonEditor", "svc-tab-json-editor-textarea" ); }