Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9689ae5b7f | ||
|
|
5cbb657f20 | ||
|
|
e038f25d5b |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pofile",
|
"name": "pofile",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Ruben Vermeersch <ruben@rocketeer.be>"
|
"Ruben Vermeersch <ruben@rocketeer.be>"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "pofile",
|
"name": "pofile",
|
||||||
"description": "Parse and serialize Gettext PO files.",
|
"description": "Parse and serialize Gettext PO files.",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Ruben Vermeersch",
|
"name": "Ruben Vermeersch",
|
||||||
"email": "ruben@savanne.be",
|
"email": "ruben@savanne.be",
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
"url": "http://github.com/rubenv/pofile.git"
|
"url": "http://github.com/rubenv/pofile.git"
|
||||||
},
|
},
|
||||||
"main": "./lib/po",
|
"main": "./lib/po",
|
||||||
|
"types": "./pofile.d.ts",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"i18n",
|
"i18n",
|
||||||
"l10n",
|
"l10n",
|
||||||
|
|||||||
44
pofile.d.ts
vendored
Normal file
44
pofile.d.ts
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
declare module "pofile" {
|
||||||
|
class PO {
|
||||||
|
public static parse(data: string): PO;
|
||||||
|
public static load(fileName: string, callback: (err: NodeJS.ErrnoException | null, po: PO) => void): void;
|
||||||
|
|
||||||
|
public comments: string[];
|
||||||
|
public extractedComments: string[];
|
||||||
|
public items: Item[];
|
||||||
|
public headers: Partial<IHeaders>
|
||||||
|
|
||||||
|
public save(filename: string, callback: (err?: NodeJS.ErrnoException) => void): void;
|
||||||
|
public toString(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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: { [flag: string]: boolean | undefined }
|
||||||
|
private nplurals: number;
|
||||||
|
private obsolete: boolean;
|
||||||
|
|
||||||
|
public toString(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = PO;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user