i18next-phrase-in-context-editor-post-processor
Version:
Plugin for i18next that pairs well with Phrase In-Context Editor
24 lines • 1.14 kB
TypeScript
import '@sagi.io/globalthis';
import './typings/global';
import './typings/helpers';
import { DeepPartial } from './typings/helpers';
import { PhraseConfig } from "./phrase-config.type";
export type PhraseInContextEditorOptions = Omit<DeepPartial<PhraseConfig>, 'phraseEnabled' | 'projectId'> & Pick<PhraseConfig, 'phraseEnabled' | 'projectId'>;
export default class PhraseInContextEditorPostProcessor {
private defaultConfig;
phraseScript?: HTMLScriptElement;
get IN_CONTEXT_EDITOR_SCRIPT_URL(): string;
static interpolateKey(key: string, prefix: string, suffix: string): string;
loadInContextEditorScript(): HTMLScriptElement | undefined;
type: 'postProcessor';
name: string;
constructor(options: PhraseInContextEditorOptions);
interpolateKey(key: string): string;
process(value: string, keys: string[], options: unknown, translator: unknown): string;
set phraseEnabled(phraseEnabled: boolean);
get phraseEnabled(): boolean;
set config(options: PhraseConfig);
get config(): PhraseConfig;
toScriptHTML(): string;
}
//# sourceMappingURL=phrase.d.ts.map