Permalink
Browse files

Make pelican-bootstrap3 multilingual

This makes use of the i18n jinja extension as described in README.md.
A Makefile is provided to facilitate new translations. A translation to
German is also included.
  • Loading branch information...
jranke committed Oct 6, 2016
1 parent 30c8075 commit db5388e47885b76083ee6a169863b5e718ca1246
Showing with 1,210 additions and 49 deletions.
  1. +19 −0 pelican-bootstrap3/Makefile
  2. +11 −1 pelican-bootstrap3/README.md
  3. +1 −0 pelican-bootstrap3/babel.cfg
  4. +832 −0 pelican-bootstrap3/i18n.patch
  5. +148 −0 pelican-bootstrap3/messages.pot
  6. +3 −3 pelican-bootstrap3/templates/archives.html
  7. +1 −1 pelican-bootstrap3/templates/article.html
  8. +1 −1 pelican-bootstrap3/templates/article_list.html
  9. +2 −2 pelican-bootstrap3/templates/author.html
  10. +3 −3 pelican-bootstrap3/templates/authors.html
  11. +1 −1 pelican-bootstrap3/templates/base.html
  12. +3 −3 pelican-bootstrap3/templates/categories.html
  13. +1 −1 pelican-bootstrap3/templates/category.html
  14. +2 −2 pelican-bootstrap3/templates/includes/aboutme.html
  15. +4 −4 pelican-bootstrap3/templates/includes/article_info.html
  16. +3 −3 pelican-bootstrap3/templates/includes/cc-license.html
  17. +1 −1 pelican-bootstrap3/templates/includes/comment_count.html
  18. +1 −1 pelican-bootstrap3/templates/includes/comments.html
  19. +3 −3 pelican-bootstrap3/templates/includes/footer.html
  20. +2 −2 pelican-bootstrap3/templates/includes/links.html
  21. +5 −5 pelican-bootstrap3/templates/includes/pagination.html
  22. +7 −7 pelican-bootstrap3/templates/includes/sidebar.html
  23. +1 −1 pelican-bootstrap3/templates/includes/taglist.html
  24. +2 −2 pelican-bootstrap3/templates/includes/translations.html
  25. +1 −1 pelican-bootstrap3/templates/search.html
  26. +1 −1 pelican-bootstrap3/templates/tags.html
  27. BIN pelican-bootstrap3/translations/de/LC_MESSAGES/messages.mo
  28. +151 −0 pelican-bootstrap3/translations/de/LC_MESSAGES/messages.po
@@ -0,0 +1,19 @@
help:
@echo 'Makefile for translation '
@echo ' '
@echo 'Usage: '
@echo ' make extract Extract message strings '
@echo ' make update Extract strings and update po files '
@echo ' make compile Compile po files to mo files '
@echo ' '
extract:
pybabel extract --mapping babel.cfg --output messages.pot ./
update: extract
pybabel update --input-file messages.pot --output-dir translations/ --domain messages
compile:
pybabel compile --directory translations/ --domain messages
.PHONY: help extract update compile
@@ -21,7 +21,12 @@ First:
Then:
Point the `THEME` variable in your `pelicanconf.py` to `/path/to/pelican-bootstrap3`
Point the `THEME` variable in your `pelicanconf.py` to
`/path/to/pelican-bootstrap3` and add
`JINJA_EXTENSIONS = ['jinja2.ext.i18n']`
to your Pelican configuration, as this template can be translated (see below).
## Usage
@@ -347,6 +352,11 @@ Originally developed for including certification marks in your sidebar. E.g.,
http://dmark.github.io
### Translations
This template can be translated using pybabel and the enclosed Makefile. See
[Localizing themes with Jinja2](https://github.com/getpelican/pelican-plugins/blob/master/i18n_subsites/localizing_using_jinja2.rst) for more details and pointers.
## Live example
[This is the website of the original author](http://dandydev.net)
@@ -0,0 +1 @@
[jinja2: templates/**.html]
Oops, something went wrong.

0 comments on commit db5388e

Please sign in to comment.