@mocanvas/editor · function

resolveUiMessage

declare function resolveUiMessage(translations: TLUiTranslations | undefined, locale: string, id: string): string

The display text for id, or id itself when no dictionary has it.

Falling through to the id rather than to an empty string is deliberate: a missing translation should show something a developer can grep for, and it makes a localized literal (msg("Comment")) safe to use as a label without registering anything at all.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.