https://github.com/martijnthe/asciidoctor-gettext
gettext/po string extraction tool for asciidoc documents
https://github.com/martijnthe/asciidoctor-gettext
asciidoc asciidoctor gettext i18n
Last synced: about 2 months ago
JSON representation
gettext/po string extraction tool for asciidoc documents
- Host: GitHub
- URL: https://github.com/martijnthe/asciidoctor-gettext
- Owner: martijnthe
- License: mit
- Created: 2018-03-11T21:58:44.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-16T19:36:40.000Z (over 7 years ago)
- Last Synced: 2026-03-20T00:43:55.430Z (3 months ago)
- Topics: asciidoc, asciidoctor, gettext, i18n
- Language: TypeScript
- Size: 186 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.