asciidoctor-gettext
Version:
gettext/po string extraction tool for asciidoc documents
33 lines (23 loc) • 1.38 kB
Markdown
# asciidoctor-gettext
[](https://travis-ci.org/martijnthe/asciidoctor-gettext)
[](https://coveralls.io/github/martijnthe/asciidoctor-gettext?branch=master)
[](http://badge.fury.io/js/asciidoctor-gettext)
[](https://opensource.org/licenses/MIT)
gettext/po string extraction tool for asciidoc documents.
- Uses `asciidoctor.js` as parser.
- Uses `gettext-parser` as .po generator.
## Extracting
Basic example
```
$ asciidoctor-gettext gettextize -m path/to/master.adoc -p output.pot
```
This will extract all texts from `master.adoc` and create `output.pot`.
## Injecting Translations
Basic example
```
$ asciidoctor-gettext translate -m path/to/master.adoc -p dutch.po -l output.adoc
```
This will create `output.adoc`, taking `master.adoc` and rewriting all localizable strings using the given `.po` file.
Note that the resulting output document may be marked up slightly different compared to the input document. However,
when transforming it `.html` (using `asciidoctor` itself) the output should be formatted the identically as the
original.