-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial support for translations #32
Conversation
Based on bioimagebook#30 Make changes to `_config.yml` that simplify adding support for other languages. Introduce `create_conf.py` to handle the remaining `conf.py` customization needed beyond what Jupyter Book can create itself.
Includes default caption to address jupyter-book/jupyter-book#2009
Thanks! What do you think of #33 ? tbh I merged everything since your original PR had all the chapters merged, and they were the important bit. I've no idea what it looks like once it's in Transifex, but I can imagine I'd feel more motivated with more short files rather than one huge file. Also, the book should make some kind of sense one chapter or part at a time. So, I can either merge this PR or #33 - I'd rather defer to your expertise on which it should be :) Based on your post, if we think Transifex can cope then I'd tend towards the many smaller files. |
I think merge 33! I asked internally and that was the 3/3 consensus (and my own). Sorry for not thinking of it originally! |
Hi @bethac07
Could you check out this PR please?
It's based on #30 and your gist, with some differences described below.
One language file for everything
To avoid having to manage multiple .pot files and then exclude some, I've put everything into book.pot.
Location of language files
locales
instead oflocale
, because this is now the default for locale_dirs.locales/_build
rather than_build
- because this means thatjb clean . --all
doesn't cause havoc (since it just deletes_build
)Adding and updating languages
A new
helpers/translate.py
has been added to simplify managingconf.py
, adding and updating languages.The JB config was updated to avoid (hopefully) the need for manual edits to the automatically generated
conf.py
.