Open
Description
The mdbook-xgettext
plugin can currently only be used from mdbook
since it reads a special JSON format on standard input. However, it would be quite easy to use the same code to extract text from any Markdown file on disk. We should create a small binary which does this.
Similarly for mdbook-gettext
: we should create a small binary which will translate a Markdown file into another language using a PO file.
Having these binaries would make it slightly easier to text our own code:
echo '> foo **bar** *baz*' | mdbook-i18n-xgettext
should be enough to produce a PO file on standard output (it would show that *bar*
is normalized to _bar_
, for example). I could have used this kind of ad-hoc testing when I was battling corner-cases in #33.