ablog
ablog copied to clipboard
Translations for navigation and headlines not working
Description
ABlog provides translations for the navigation, headlines etc. in several languages out of the box, however they are not working. The fallback language English is used all the time.
Expected vs Actual behavior
When setting the language
configuration to e.g. de
and building the project, I expect all of ABlog's navigation items and titles to be shown in German, however the English texts are used instead.
Steps to Reproduce
- Create a new ABlog project:
mkdir /tmp/eggsandspam; cd /tmp/eggsandspam; ablog start
(queried settings do not matter) - Switch to German project language:
sed 's/language = None/language= "de"/' -i conf.py
- Build the project:
ablog build
- Look at the generated HTML pages:
xdg-open _website/index.html
The navigation shows "Recent Posts" rather than "Neue Einträge", "Tags" instead of "Schlagworte", etc. Please note, that Sphinx's search box is correctly labeled "Schnellsuche".
System Details
- ABlog Version: 0.10.11
- Sphinx Version: 3.2.1
- Python Version: 3.8.6
- OS information: Debian GNU/Linux bullseye/sid
Thanks for reporting this, I will have a look at fixing this.
Thanks for reporting this, I will have a look at fixing this.
I've been trying to figure out why the sphinx text works and the ablog text doesn't and so far I have failed.
Hello @nabobalis, thanks for continuing work on this extension. I would like to to mention that the same problem happens with Italian translations (*): names of months are still in English, even after your latest commits. I will try to implement locally @vilardellsalles's solution and see if it fixes the problem.
(*) I added Italian translations to my project, but I'll be happy to contribute, if you think they are useful (in another issue you were mentioning to leave the job to Sphinx).
Hello @nabobalis, thanks for continuing work on this extension. I would like to to mention that the same problem happens with Italian translations (*): names of months are still in English, even after your latest commits. I will try to implement locally @vilardellsalles's solution and see if it fixes the problem.
Seems like there is a still a bug here then.
(*) I added Italian translations to my project, but I'll be happy to contribute, if you think they are useful (in another issue you were mentioning to leave the job to Sphinx).
Sure!
hi @nabobalis sorry, it took more than expected, but I finally managed to submit a PR with IT locales.
Thank you very much @stefanodavid
hello @nabobalis
FYI: I created a new project from scratch and still experienced the problem with Italian localization. I was able to fix it the by implementing the solution mentioned in #224 (locale.setlocale(locale.LC_ALL, "it_IT")
in conf.py).
Ok I will try to tweak the code and get a bugfix out. Sorry for the inconvenience