pofile/pofile.d.ts

40 lines
1.0 KiB
TypeScript
Raw Permalink 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>;
public obsolete: boolean;
2019-06-25 14:12:53 +03:00
private nplurals: number;
}
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;
2020-04-21 10:38:00 +03:00
public static Item: typeof Item;
}
2017-04-24 21:36:49 +03:00
2019-06-25 14:12:53 +03:00
export = PO