import { LocaleService } from 'tabby-core'; /** * What this plugin uses of `TranslateService`, declared here for lack of * types: tabby-core re-exports the class from `@ngx-translate/core`, which is * not installed here, and `skipLibCheck` silently degenerates the type to * `any` (measured on the vault). This interface gives the three members we * use their checking back — notably `setTranslation()`'s third argument, * whose omission would ERASE all of Tabby's own translations. */ interface TranslateApi { langs: string[]; setTranslation(lang: string, translations: Record, shouldMerge?: boolean): void; instant(key: string, params?: Record): string; } export declare class SidebarPlusI18nService { private translate; private locale; constructor(translate: TranslateApi, locale: LocaleService); /** * Hooks the tables onto Tabby's locale lifecycle. Called from the * NgModule constructor — subscription only, nothing that can block the * startup path. */ install(): void; /** * Adds our strings to Tabby's for this locale. * * The third argument is NOT optional despite its default: without `true`, * `setTranslation()` REPLACES the language's table and the whole app * falls back to English. And never call this for a locale Tabby has not * loaded yet: `setTranslation()` registers the locale in * `translate.langs`, and `LocaleService.setLocale()` only loads its .po * `if (!translate.langs.includes(lang))` — registering first would skip * Tabby's own translations for the session. Both measured on the vault. */ private merge; /** * Translates in TypeScript code, where the `| translate` template pipe is * not available: toasts, confirm dialogs, composed labels. Interpolation * params use ngx-translate's `{{name}}` syntax in the source string. */ t(source: string, params?: Record): string; } export {};