1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Lexical: Added UI translation support

This commit is contained in:
Dan Brown
2024-09-22 12:29:06 +01:00
parent 2add15bd72
commit ef3de1050f
9 changed files with 20 additions and 14 deletions

View File

@ -54,7 +54,7 @@ export class EditorFormField extends EditorUiElement {
if (this.definition.type === 'select') {
const options = (this.definition as EditorSelectFormFieldDefinition).valuesByLabel
const labels = Object.keys(options);
const optionElems = labels.map(label => el('option', {value: options[label]}, [label]));
const optionElems = labels.map(label => el('option', {value: options[label]}, [this.trans(label)]));
input = el('select', {id, name: this.definition.name, class: 'editor-form-field-input'}, optionElems);
} else if (this.definition.type === 'textarea') {
input = el('textarea', {id, name: this.definition.name, class: 'editor-form-field-input'});