pofile/pofile.d.ts

46 lines
1.3 KiB
TypeScript
Raw Normal View History

2019-06-25 14:12:53 +03:00
declare interface IHeaders {
'Project-Id-Version': string;
'Report-Msgid-Bugs-To': string;
'POT-Creation-Date': string;
'PO-Revision-Date': string;
'Last-Translator': string;
'Language': string;
'Language-Team': string;
'Content-Type': string;
'Content-Transfer-Encoding': string;
'Plural-Forms': string;
[name: string]: string;
}
2019-06-25 14:12:53 +03:00
declare class Item {
public msgid: string;
public msgctxt?: string;
public references: string[];
public msgid_plural?: string;
public msgstr: string[];
public comments: string[];
public extractedComments: string[];
public flags: Record<string, boolean | undefined>;
private nplurals: number;
private obsolete: boolean;
2019-06-25 14:12:53 +03:00
public toString(): string;
}
2019-06-25 14:12:53 +03:00
declare class PO {
public comments: string[];
public extractedComments: string[];
public items: Item[];
public headers: Partial<IHeaders>
2019-06-25 14:12:53 +03:00
public static parse(data: string): PO;
public static parsePluralForms(forms: string): PO;
public static load(fileName: string, callback: (err: NodeJS.ErrnoException, po: PO) => void): void;
public static Item: typeof Item;
2019-06-25 14:12:53 +03:00
public save(fileName: string, callback: (err: NodeJS.ErrnoException) => void): void;
public toString(): string;
}
2017-04-24 21:36:49 +03:00
2019-06-25 14:12:53 +03:00
export = PO