erseco / alpine-moodle

Moodle docker image based on Alpine Linux
https://hub.docker.com/r/erseco/alpine-moodle
MIT License
42 stars 33 forks source link

Locales not working properly #44

Closed JulienBrgs closed 1 year ago

JulienBrgs commented 1 year ago

Hello, when i installed French language pack all strings translations was ok but dates not translated properly : When i'm on profile page i have :

Premier accès au site Wednesday 23 August 2023, 10:31 (12 min 13 s) Dernier accès au site Wednesday 23 August 2023, 10:43 (maintenant)

As you can see, dates day name and month name not being translated.

I've tested this but this not solve this issue :

RUN apk update RUN apk add tzdata RUN cp /usr/share/zoneinfo/Europe/Paris /etc/localtime RUN rm -r /usr/share/zoneinfo/Africa && \ rm -r /usr/share/zoneinfo/America && \ rm -r /usr/share/zoneinfo/Antarctica && \ rm -r /usr/share/zoneinfo/Arctic && \ rm -r /usr/share/zoneinfo/Asia && \ rm -r /usr/share/zoneinfo/Atlantic && \ rm -r /usr/share/zoneinfo/Australia && \ rm -r /usr/share/zoneinfo/Indian && \ rm -r /usr/share/zoneinfo/Mexico && \ rm -r /usr/share/zoneinfo/Pacific && \ rm -r /usr/share/zoneinfo/Chile && \ rm -r /usr/share/zoneinfo/Canada RUN echo "Europe/Paris" > /etc/timezone

Thanks'

erseco commented 1 year ago

Hello,

Thank you for reaching out. The issue you're experiencing is due to the fact that the musl libc used by Alpine lacks support for locales. This is why the day and month names are not being translated properly.

To address this, you can try adding locale support to your Alpine Docker image. Here's a guide that provides a solution for this: Add Locales to Alpine Linux Docker Image.

I apologize for the inconvenience and hope this helps resolve your issue. Let me know if you have any further questions or concerns.

Best regards

JulienBrgs commented 1 year ago

Hello, this not solve the issue :( but it work on ubuntu i will stay on it thanks for assistance I hope this will be a next fix in ur todo list :p

erseco commented 1 year ago

As previously mentioned, the issue isn't with our container but stems from Alpine Linux's use of musl instead of libc. This is a known limitation and is listed on their open issues: https://wiki.musl-libc.org/open-issues.html. Once the musl team addresses this, it will be reflected in our container. In the interim, I recommend using Ubuntu as you suggested. Best regards.