Skip to content

Commit 15030fa

Browse files
committed
Fix translations missing on the dev image
1 parent 8eef076 commit 15030fa

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

dev/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ RUN apt-get update && \
2929

3030
# Install WireCloud & dependencies
3131
RUN git clone --depth=1 https://github.com/Wirecloud/wirecloud.git && \
32+
apt-get update && apt-get install -y gettext && \
3233
pip install "django<=1.11" && \
3334
cd wirecloud/src && \
3435
python setup.py bdist_wheel && \
3536
pip install --no-cache-dir dist/*.whl && \
3637
cd ../.. && \
37-
rm -rf wirecloud
38+
rm -rf wirecloud && \
39+
apt-get remove -y gettext && \
40+
rm -rf /var/lib/apt/lists/*
3841

3942
COPY ./docker-entrypoint.sh /
4043
COPY ./manage.py /usr/local/bin/

dev/tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ def test_should_serve_static_files(self):
3535
response = requests.get("http://localhost/static/theme/wirecloud.defaulttheme/images/logos/header.png")
3636
self.assertEqual(response.status_code, 200)
3737

38+
def test_should_serve_translations(self):
39+
response = requests.get("http://localhost/api/i18n/js_catalogue?language=es")
40+
self.assertEqual(response.status_code, 200)
41+
# Look for basic translations
42+
self.assertIn('"Yes"', response.text)
43+
self.assertIn('"No"', response.text)
44+
self.assertIn('"Warning"', response.text)
45+
3846

3947
class StandaloneTests(unittest.TestCase, WireCloudTests):
4048

0 commit comments

Comments
 (0)