-
Couldn't load subscription status.
- Fork 36
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
For Comprehensive Rust, we use a granularity: 0 setting when extracting messages with mdbook-xgettext. This avoids churn in the line numbers.
However, it happens regularly (google/comprehensive-rust#2100, google/comprehensive-rust#1991, google/comprehensive-rust#1950, ...) that people forget to use this setting.
I would love to have a way of specifying the right settings in a configuration file. Something which can turn
MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot", "granularity": 0}}' \
mdbook build -d po
into just
mdbook build -d po
or similar.
We could already store the options in our book.toml file today. The reason we don't do this is that this would enable the xgettext output unconditionally for everybody.
Some ideas for solving this:
- Make
mdbook-xgettextrequired and enabled in every execution. This would be a little wasteful, but it might not matter if it's quick enough? Measure this to get some data. - Make
mdbook-xgettextoptional withoptional: trueinbook.toml. Make it exit early when it sees that it's optional. If this works well, we could use it for themdbook-pandocoutput too. See Pandoc failure during local rendering comprehensive-rust#1911 for a recent example of it failing. - Write a small wrapper and ask people to run that instead of calling
mdbook-xgettextdirectly using the above config hack. - Other ideas?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers