Installation
npm install --save @types/gettext-parser
Summary
This package contains type definitions for gettext-parser (https://github.com/smhg/gettext-parser).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gettext-parser.
index.d.ts
/// <reference types="node" />
import { Transform } from "readable-stream";
export interface GetTextComment {
translator: string;
reference: string;
extracted: string;
flag: string;
previous: string;
}
export interface GetTextTranslation {
msgctxt?: string | undefined;
msgid: string;
msgid_plural?: any;
msgstr: string[];
comments?: GetTextComment | undefined;
}
export interface GetTextTranslations {
charset: string;
headers: { [headerName: string]: string };
translations: { [msgctxt: string]: { [msgId: string]: GetTextTranslation } };
}
export interface PoParser {
parse: (buffer: Buffer | string, defaultCharset?: string) => GetTextTranslations;
compile: (table: GetTextTranslations, options?: any) => Buffer;
createParseStream: (buffer: any, defaultCharset?: string) => Transform;
}
export interface MoParser {
parse: (buffer: Buffer | string, defaultCharset?: string) => GetTextTranslations;
compile: (table: GetTextTranslations, options?: any) => Buffer;
}
export const po: PoParser;
export const mo: MoParser;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: @types/node, @types/readable-stream
Credits
These definitions were written by Lorent Lempereur.