Skip to content

Commit 8dbeb50

Browse files
authored
fix: add internationalization and localization
Allow automatic translation from English to German and vice versa
2 parents 0edba53 + 27f7f4e commit 8dbeb50

22 files changed

+7513
-208
lines changed

docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515
mime-support \
1616
postgresql-client \
1717
unzip &&\
18-
mkdir -p /opt/app/docker/ /opt/app/database /opt/app/logs
18+
mkdir -p /opt/app/docker/ /opt/app/database /opt/app/logs /opt/app/locale
1919

2020
# define workdir
2121
WORKDIR /opt/app
@@ -26,6 +26,7 @@ COPY myapp /opt/app/myapp
2626
COPY manage.py /opt/app/manage.py
2727
COPY requirements.txt /opt/app/requirements.txt
2828
COPY /docker/entrypoint.sh /opt/app/docker/entrypoint.sh
29+
COPY locale /opt/app/locale
2930

3031
# install dependencies, fix permissions
3132
RUN pip install --upgrade pip && \

docker/entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ perform_migrations() {
3333
python manage.py makemigrations myapp
3434
python manage.py migrate
3535
python manage.py migrate myapp
36+
#django-admin makemessages --all 2>&1 > /dev/null
37+
#django-admin compilemessages 2>&1 > /dev/null
3638
echo ""
3739

3840
if [ -z "$DB_INITIALIZED" ]; then

locale/de/LC_MESSAGES/django.mo

6.74 KB
Binary file not shown.

0 commit comments

Comments
 (0)