mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-12-23 23:02:08 +03:00
Lexical: Added UI translation support
This commit is contained in:
@@ -19,7 +19,10 @@ export function buildEditorUI(container: HTMLElement, element: HTMLElement, scro
|
||||
editorDOM: element,
|
||||
scrollDOM: scrollContainer,
|
||||
manager,
|
||||
translate: (text: string): string => text, // TODO - Implement
|
||||
translate(text: string): string {
|
||||
const translations = options.translations;
|
||||
return translations[text] || text;
|
||||
},
|
||||
error(error: string|Error): void {
|
||||
const message = error instanceof Error ? error.message : error;
|
||||
window.$events.error(message); // TODO - Translate
|
||||
|
||||
Reference in New Issue
Block a user