UNPKG

@dvhb/react-intl-messages

Version:

Library for parsing source files and extract react-intl messages

63 lines (62 loc) 1.65 kB
import { Provider } from './provider'; import { Message } from '../types'; export declare type LokaliseKey = { key_id: number; created_at: string; key_name: { ios: string; android: string; web: string; other: string; }; filenames: { ios: string; android: string; web: string; other: string; }; description: string; platforms: string[]; tags: string[]; comments: { comment_id: number; comment: string; added_by: number; added_by_email: string; added_at: string; }[]; screenshots: { screenshot_id: number; title: string; description: string; screenshot_tags: string[]; url: string; created_at: string; }[]; translations: { translation_id: number; key_id: number; language_iso: string; translation: string; modified_by: number; modified_by_email: string; modified_at: string; is_reviewed: boolean; reviewed_by: number; words: number; }[]; }; export declare class Lokalise implements Provider { private defaultLocale?; private projectId?; private token?; lokaliseKeys: LokaliseKey[]; newMessages: string[]; constructor(defaultLocale?: string | undefined, projectId?: string | undefined, token?: string | undefined); private getHeaders; private formatMessages; getKeys(): Promise<void>; getMessage(locale: string, id: string): string; uploadMessages(messages: Message[]): Promise<void>; getNewMessages(): string[]; }