Skip to content

Conversation

@jooyunghan
Copy link
Contributor

svgbob translates _text_ into *text*, which makes gettext fail to translate paragraphs with _text_.

svgbob translates `_text_` into `*text*`, which makes gettext fail to
translate paragraphs with `_text_`.
@mgeisler
Copy link
Collaborator

svgbob translates _text_ into *text*, which makes gettext fail to translate paragraphs with _text_.

Oh, interesting! I did not know about that problem yet...

Our instructions already ask people to run svgbob after gettext — but that was simply done so that translators have the possibility to translate the diagrams.

Now that we know that we only get a warning due to the undefined preprocessor, I'm fine with adding the before/after key to the book.toml.

Going further, we could consider adding the gettext preprocessor to the normal flow — people who want to test the book locally already have to install both mdbook and mdbook-svgbob, so asking them to install i18n-helpers too isn't much of a change. Doing so should simplify the publish.yml script a bit.

@jooyunghan
Copy link
Contributor Author

This was a regression from #421. Adding before to links caused svgbob running before gettext.

I agree that adding gettext to fix the warning (undefined preprocessor). We can make it a no-op when po-file is not specified.

@jooyunghan jooyunghan requested a review from mgeisler February 17, 2023 08:32
@jooyunghan jooyunghan changed the title svgbob should run after gettext svgbob should run after gettext Feb 17, 2023
@jooyunghan
Copy link
Contributor Author

Can we merge this?

@mgeisler mgeisler merged commit b6a55e4 into google:main Feb 17, 2023
NoahDragon pushed a commit to wnghl/comprehensive-rust that referenced this pull request Jul 19, 2023
svgbob translates `_text_` into `*text*`, which makes gettext fail to
translate paragraphs with `_text_`.

Co-authored-by: Jooyung Han <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants