Skip to content
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

Translations for navigation and headlines not working #80

Open
der-lyse opened this issue Oct 12, 2020 · 8 comments
Open

Translations for navigation and headlines not working #80

der-lyse opened this issue Oct 12, 2020 · 8 comments

Comments

@der-lyse
Copy link

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

  1. Create a new ABlog project: mkdir /tmp/eggsandspam; cd /tmp/eggsandspam; ablog start (queried settings do not matter)
  2. Switch to German project language: sed 's/language = None/language= "de"/' -i conf.py
  3. Build the project: ablog build
  4. 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
@nabobalis
Copy link
Contributor

Thanks for reporting this, I will have a look at fixing this.

@nabobalis
Copy link
Contributor

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.

luis-henrix pushed a commit to luis-henrix/ablog that referenced this issue Oct 2, 2022
nabobalis pushed a commit to luis-henrix/ablog that referenced this issue Nov 14, 2022
nabobalis added a commit that referenced this issue Nov 15, 2022
Co-authored-by: Luís Henriques <[email protected]>
Co-authored-by: Nabil Freij <[email protected]>
nabobalis added a commit that referenced this issue Nov 15, 2022
Co-authored-by: Luís Henriques <[email protected]>
Co-authored-by: Nabil Freij <[email protected]>
@stefanodavid
Copy link
Contributor

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).

@nabobalis
Copy link
Contributor

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!

@stefanodavid
Copy link
Contributor

hi @nabobalis sorry, it took more than expected, but I finally managed to submit a PR with IT locales.

@nabobalis
Copy link
Contributor

Thank you very much @stefanodavid

@stefanodavid
Copy link
Contributor

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).

@nabobalis
Copy link
Contributor

Ok I will try to tweak the code and get a bugfix out. Sorry for the inconvenience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants