/** * Translations for plugin-supplied text. * * A plugin's catalog is merged under `plugins.`, giving the locale * fallbacks for free. What this module adds is the last one: a plugin may ship no * catalog, or one missing the key, and the manifest's own string is shown rather * than `plugins.foo.name`. An untranslated plugin stays usable. */ /** Reads `plugins..` out of the merged catalog, if it is there. */ declare function lookupPluginMessage(messages: Record | undefined, pluginId: string, key: string): string | undefined; /** * One piece of plugin-supplied text, with the manifest string as the fallback. * For anything core renders on a plugin's behalf — its name, description, a * contributed tool's label. */ export declare function usePluginMessage(pluginId: string, key: string, fallback: string): string; export type PluginTranslator = (key: string, fallback?: string) => string; /** * A `t()` scoped to the calling plugin's namespace. Only valid inside a plugin * subtree, so a plugin cannot read another's strings. Without a `fallback`, a * missing key renders as `plugins..` rather than throwing. */ export declare function usePluginTranslations(): PluginTranslator; export type PluginMessageLookup = (pluginId: string, key: string, fallback: string) => string; /** * Text for several plugins at once, for a host rendering a list of contributions — a hook * cannot be called per row. Host-side only; a plugin has `usePluginTranslations`. */ export declare function usePluginMessageLookup(): PluginMessageLookup; /** Core's own strings, kept a separate call so plugin and core text differ at the point of use. */ export declare function useCoreTranslations(namespace: string): import("use-intl")._Translator, string>; export { lookupPluginMessage as __lookupPluginMessage }; //# sourceMappingURL=messages.d.ts.map