Skip to content

Commit

Permalink
feat: Allow translation management from docker (#982)
Browse files Browse the repository at this point in the history
* feat: Allow translation management from docker

* Added translation

* Upgrade pip and pip-tools
  • Loading branch information
marksweb authored May 7, 2024
1 parent 37795ec commit fcf5a3c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
23 changes: 16 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,34 @@ FROM python:3.10.9-bullseye

RUN apt-get update \
&& apt-get upgrade -yq \
&& apt-get -y install locales \
&& apt-get -y install gettext \
&& apt-get -y install poedit \
&& apt-get install -yq --no-install-recommends \
nodejs \
npm
npm \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

ENV APP_DIR=/var/www/app
WORKDIR ${APP_DIR}
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& sed -i -e 's/# en_US ISO-8859-1/en_US ISO-8859-1/' /etc/locale.gen \
&& sed -i -e 's/# en_US.ISO-8859-15 ISO-8859-15/en_US.ISO-8859-15 ISO-8859-15/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale

COPY requirements.txt ${APP_DIR}/requirements.txt
WORKDIR /var/www/app

RUN pip install pip-tools \
COPY requirements.txt ./requirements.txt

RUN pip install --upgrade pip pip-tools \
&& pip-sync

COPY package.json ${APP_DIR}/package.json
COPY package.json ./package.json

RUN npm install \
&& npm install -g gulp

COPY rootfs /
COPY . ${APP_DIR}
COPY . .

RUN gulp local

Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.8"

services:
app:
container_name: djangogirls-app
Expand Down
2 changes: 1 addition & 1 deletion locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6170,7 +6170,7 @@ msgstr ""
#: templates/organize/form/step3_organizers.html:114
#: templates/organize/form/step3_organizers.html:154
msgid "Email address"
msgstr ""
msgstr "Correo electrónico"

#: templates/organize/form/step3_organizers.html:85
msgid "Your organizing team"
Expand Down
6 changes: 6 additions & 0 deletions rootfs/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/sh -e

echo "Make messages"
./manage.py makemessages --all

echo "Compile messages"
./manage.py compilemessages

echo "Applying database migrations"
./manage.py migrate

Expand Down

0 comments on commit fcf5a3c

Please sign in to comment.