Skip to content

Commit aac9ed2

Browse files
[IMPROVEMENT] Remove compiled messages from source code #722
2 parents 6880835 + b7a4017 commit aac9ed2

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
.env
1010
.venv
1111
*.egg-info
12+
*.mo
1213
*.pyc
1314
*.sqlite3
1415
build

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ database before running bootstrap or `make migrate` and `make test` will fail.
2323
# to get mysql client to install
2424
# export LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib"
2525
make bootstrap
26+
# If you update locale .po files, compile messages before running/testing
27+
make compilemessages
2628
# If you want to enable DEBUG (and development mode)
2729
echo 1 > ~/.config/promgen/DEBUG
2830

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ COPY promgen/tests/examples/promgen.yml /etc/promgen/promgen.yml
4747

4848
WORKDIR /usr/src/app
4949
RUN pip install --no-cache-dir -e .
50+
RUN set -ex \
51+
&& apk add --no-cache gettext \
52+
&& SECRET_KEY=1 promgen compilemessages \
53+
&& apk del gettext
5054

5155
USER promgen
5256
EXPOSE 8000

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ ruff-check-format: $(RUFF_BIN)
122122
migrate: $(APP_BIN)
123123
$(APP_BIN) migrate
124124

125+
.PHONY: compilemessages
126+
## Django: Compile locale messages (.po -> .mo)
127+
compilemessages: $(APP_BIN)
128+
$(APP_BIN) compilemessages
129+
125130
.PHONY: run
126131
## Django: Run development server
127132
run: migrate
-9.65 KB
Binary file not shown.

0 commit comments

Comments
 (0)