https://github.com/zhanghai/gettext-po-parser
Gettext PO file parser
https://github.com/zhanghai/gettext-po-parser
gettext i18n javascript-library l10n parser pegjs po typescript-library
Last synced: 10 months ago
JSON representation
Gettext PO file parser
- Host: GitHub
- URL: https://github.com/zhanghai/gettext-po-parser
- Owner: zhanghai
- License: mit
- Created: 2020-06-20T19:37:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-31T21:11:44.000Z (over 5 years ago)
- Last Synced: 2025-04-13T18:18:18.525Z (10 months ago)
- Topics: gettext, i18n, javascript-library, l10n, parser, pegjs, po, typescript-library
- Size: 12.7 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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)