Skip to content

Commit

Permalink
Don't keep compiled translations under git. Fixes #387
Browse files Browse the repository at this point in the history
instead compile them when we build the Docker image
  • Loading branch information
atodorov committed Jun 28, 2018
1 parent eb99438 commit 11ad52c
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 17 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ jobs:
packages:
- graphviz

- stage: non_functional_testing
env:
- CMD=check-mo-files

- stage: docker
env:
- CMD=docker-image
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ FROM centos/httpd
RUN rpm -Uhv https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm && \
yum -y --setopt=tsflags=nodocs install centos-release-scl && \
yum -y --setopt=tsflags=nodocs install rh-python36 gcc mariadb-devel \
libxml2-devel libxslt-devel httpd-devel mod_wsgi mod_ssl npm && \
yum -y update --setopt=tsflags=nodocs
libxml2-devel libxslt-devel httpd-devel mod_wsgi mod_ssl npm gettext && \
yum -y update --setopt=tsflags=nodocs && \
yum clean all

# static configuration for Apache
COPY ./etc/kiwi-httpd.conf /etc/httpd/conf.d/
Expand Down Expand Up @@ -50,5 +51,8 @@ RUN cd /Kiwi/ && npm install && \
# Copy the application code to the virtual environment
COPY ./tcms/ /venv/lib64/python3.6/site-packages/tcms/

# compile translations
RUN /Kiwi/manage.py compilemessages

# collect static files
RUN /Kiwi/manage.py collectstatic --noinput
11 changes: 0 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,6 @@ check-docs-source-in-git: docs
exit 1; \
fi

# verify all .mo files have been compiled and up-to-date!
.PHONY: check-mo-files
check-mo-files:
./manage.py compilemessages
git status
if [ -n "$$(git status --short)" ]; then \
echo "FAIL: Out-of-date .mo files!"; \
echo "HELP: execute './manage.py compilemessages' and commit to fix this"; \
exit 1; \
fi

.PHONY: help
help:
@echo 'Usage: make [command]'
Expand Down
Binary file removed tcms/locale/de_DE/LC_MESSAGES/django.mo
Binary file not shown.
Binary file removed tcms/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
Binary file removed tcms/locale/sl_SI/LC_MESSAGES/django.mo
Binary file not shown.
Binary file removed tcms/locale/zh_CN/LC_MESSAGES/django.mo
Binary file not shown.
Binary file removed tcms/locale/zh_TW/LC_MESSAGES/django.mo
Binary file not shown.

0 comments on commit 11ad52c

Please sign in to comment.