gettext-po-parser
Version:
Gettext PO file parser
28 lines (17 loc) • 914 B
Markdown
# gettext-po-parser
[](https://npmjs.org/package/gettext-po-parser)
[](https://github.com/zhanghai/gettext-po-parser/actions)
[](https://npmjs.org/package/gettext-po-parser)
A Gettext PO file parser written with [peg.js](https://github.com/pegjs/pegjs). Tested to support parsing most PO files in the GNOME project, and every parsed node contains information for its location in source file.
## Installation
```shell
npm install gettext-po-parser
```
## Usage
```typescript
import { parse } from 'gettext-po-parser';
const catalog = parse(input);
```
You can take a look at the [type definitions](parser.d.ts) for the returned data structure.
## License
[MIT](LICENSE)