From 81c94d7f95e87e9fd7efa34d0823a066998e8232 Mon Sep 17 00:00:00 2001 From: Marco Bonetti Date: Tue, 10 Feb 2015 09:58:29 +0100 Subject: [PATCH] 0.7.5 --- .gitignore | 2 +- CHANGES | 2 + README.rst | 5 ++ rosetta/locale/pl/LC_MESSAGES/django.mo | Bin 3881 -> 4093 bytes rosetta/tests/__init__.py | 1 - rosetta/utils/__init__.py | 0 runtests_multi_venv.sh | 113 ------------------------ tox.ini | 49 ++++++++++ 8 files changed, 57 insertions(+), 115 deletions(-) delete mode 100644 rosetta/utils/__init__.py delete mode 100755 runtests_multi_venv.sh create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index b4755ec..13c6b6f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,4 @@ testproject/htmlcov/ testproject/rosetta.db testproject/src/ testproject/.coverage -.venv_* +.tox diff --git a/CHANGES b/CHANGES index 3b23274..b2e00a0 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,8 @@ Version 0.7.5 * Use content_type instead of mimetype in HttpResponse. (Issue #115, thanks @vesteinn) * Don't assume that request.user has settable properties, this was a silly idea anyway (Issue #114, thanks @stevejalim) * Preserve HTML code when receiving translations from the Yandex translation service (Issue #116, thanks @marcbelmont) +* Use TOX for testing +* Test against Django 1.8a Version 0.7.4 diff --git a/README.rst b/README.rst index fa716f3..d7c05fa 100644 --- a/README.rst +++ b/README.rst @@ -42,6 +42,11 @@ To install Rosetta: +Testing: + +``pip install tox && tox`` + + Note: you can use whatever you wish as the URL prefix. To uninstall Rosetta, simply comment out or remove the ``'rosetta'`` line in your ``INSTALLED_APPS`` diff --git a/rosetta/locale/pl/LC_MESSAGES/django.mo b/rosetta/locale/pl/LC_MESSAGES/django.mo index f0d5ac1f25e6a4a5d100912a94ce29f8ab9b350a..b05bf54df75f1d3d981684be6318703e31828aa8 100644 GIT binary patch delta 870 zcmXxiODIH99LMp$YZ#C5em}-A9+Q-$kR6g_sZf$wu~14BHg{!5NZE*ug~&q5LRQK` zX%;LL3rZF?Qc4z5zP~%y>7MgB|2uciIsgB?hgH9kjY7B0%vK!++C;KhKTcu{kC4mm z7&7r5L->MDlGz8Q5q|~}zyDwnaWKV{rj`*7A0Q9Ansro_mRsk8M5#?)iv8>a?cHAIL*_I zIFCBv9_HX7YNK0Pz68*S9T+E+(aTS%oEvDn6AHQNJ&%Yy=#a!yCj9Re( zyHS-G!X6w&lCoVa!F^OF7pUhRP#Zj<)_FrM{EZQGNK=_c8I(v1>iI5ILhb;Q114jr zi~_7ugCSJhjMdnVD%}X`pyQ~@&7odVfYqC@9JNs&gYFMwDbC<5uAtWaLJHw}i`H{P z<8ozBvbHynv5GU{jJ@|(~bO=Hi zMyJNC3+srZ-pca?wh@mY!={-=F^zuAqYn!hz| z#BbI33!905aR-BB*Z+>O7tgR3@39+8sEd4J1AhDHe~*R3t~xxxK|Dd-@DUsF8CB>V zv-pEboMC$6O=NMEI8|>pfj6j&l#yY6k|}P&an5(5^3S+bRY&vKic3f{mctb0k;~cx zwqps^$p`A3kME%Z0aTs{Dsdmia2VBT8r8@g>U;*(kh{j>g2g7Pqa>%}IEIR6u?H8B srfmat(Jj=QE22J8lIlY^i7K>$+F!>GJj7+ZLgkI?Q2)U7qUR{|4;z&^d;kCd diff --git a/rosetta/tests/__init__.py b/rosetta/tests/__init__.py index 6aea359..8baa6e5 100644 --- a/rosetta/tests/__init__.py +++ b/rosetta/tests/__init__.py @@ -1,2 +1 @@ from .tests import * -from microsofttranslator.test import * diff --git a/rosetta/utils/__init__.py b/rosetta/utils/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/runtests_multi_venv.sh b/runtests_multi_venv.sh deleted file mode 100755 index 736e247..0000000 --- a/runtests_multi_venv.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash - -if [ ! -d .venv_14 ] -then - virtualenv --no-site-packages --distribute --python=python2.7 .venv_14 - . .venv_14/bin/activate - pip install --use-mirrors Django==1.4 coverage python-memcached six requests==2.1.0 polib==1.0.4 microsofttranslator==0.5 - deactivate -fi -if [ ! -d .venv_15 ] -then - virtualenv --no-site-packages --distribute --python=python2.7 .venv_15 - . .venv_15/bin/activate - pip install --use-mirrors Django==1.5 coverage python-memcached six requests==2.1.0 polib==1.0.4 microsofttranslator==0.5 - deactivate -fi -if [ ! -d .venv_15_p3 ] -then - virtualenv --no-site-packages --distribute --python=python3 .venv_15_p3 - . .venv_15_p3/bin/activate - pip install --use-mirrors Django==1.5 coverage python3-memcached six requests==2.1.0 polib==1.0.4 microsofttranslator==0.5 - deactivate -fi -if [ ! -d .venv_16 ] -then - virtualenv --no-site-packages --distribute --python=python2.7 .venv_16 - . .venv_16/bin/activate - pip install --use-mirrors coverage python-memcached six Django==1.6.1 requests==2.1.0 polib==1.0.4 microsofttranslator==0.5 - deactivate -fi -if [ ! -d .venv_16_p3 ] -then - virtualenv --no-site-packages --distribute --python=python3 .venv_16_p3 - . .venv_16_p3/bin/activate - pip install --use-mirrors coverage python3-memcached six Django==1.6.1 requests==2.1.0 polib==1.0.4 microsofttranslator==0.5 - deactivate -fi -if [ ! -d .venv_17 ] -then - virtualenv --no-site-packages --distribute --python=python2.7 .venv_17 - . .venv_17/bin/activate - pip install Django==1.7 - pip install --use-mirrors coverage python-memcached six requests==2.1.0 polib==1.0.4 microsofttranslator==0.5 - deactivate -fi -if [ ! -d .venv_17_p3 ] -then - virtualenv --no-site-packages --distribute --python=python3 .venv_17_p3 - . .venv_17_p3/bin/activate - pip install Django==1.7 - pip install --use-mirrors coverage python3-memcached six requests==2.1.0 polib==1.0.4 microsofttranslator==0.5 - deactivate -fi - - -. .venv_14/bin/activate -cd testproject -python manage.py --version -python --version -python manage.py test rosetta -cd .. -deactivate - -. .venv_15/bin/activate -cd testproject -python manage.py --version -python --version -python manage.py test rosetta -cd .. -deactivate - -. .venv_15_p3/bin/activate -cd testproject -python manage.py --version -python --version -python manage.py test rosetta -cd .. -deactivate - -. .venv_16/bin/activate -cd testproject -python manage.py --version -python --version -python manage.py test rosetta -cd .. -deactivate - -. .venv_16_p3/bin/activate -cd testproject -python manage.py --version -python --version -python manage.py test rosetta -cd .. -deactivate - -. .venv_17/bin/activate -cd testproject -python manage.py --version -python --version -python manage.py test rosetta -cd .. -deactivate - -. .venv_17_p3/bin/activate -cd testproject -python manage.py --version -python --version -python manage.py test rosetta -cd .. -deactivate - -# Check translations -for d in `find rosetta -name LC_MESSAGES -type d`; do msgfmt -c -o $d/django.mo $d/django.po; done diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..9f249dc --- /dev/null +++ b/tox.ini @@ -0,0 +1,49 @@ +[tox] +envlist = + {py26,py27}-django14, + {py26,py27,py34}-django{15,16}, + {py27,py34}-django{17,18alpha}, + gettext + +skipsdist = True + + +[testenv] +changedir = testproject +commands = + python manage.py test rosetta + +setenv = + PYTHONDONTWRITEBYTECODE=1 + +deps = + django14: Django==1.4.19 + django15: Django==1.5.12 + django16: Django==1.6.10 + django17: Django==1.7.4 + django18alpha: https://www.djangoproject.com/download/1.8a1/tarball/ + {py26,py27}-django{14,15,16,17,18alpha}: python-memcached + py34-django{14,15,16,17,18alpha}: python3-memcached + requests + polib>=1.0.6 + microsofttranslator==0.5 + six + +[testenv:gettext] +changedir = rosetta/locale/ +whitelist_externals = + msgfmt + +commands = + msgfmt -c -o cs/LC_MESSAGES/django.mo cs/LC_MESSAGES/django.po + msgfmt -c -o de/LC_MESSAGES/django.mo de/LC_MESSAGES/django.po + msgfmt -c -o es/LC_MESSAGES/django.mo es/LC_MESSAGES/django.po + msgfmt -c -o fa/LC_MESSAGES/django.mo fa/LC_MESSAGES/django.po + msgfmt -c -o fr/LC_MESSAGES/django.mo fr/LC_MESSAGES/django.po + msgfmt -c -o hu/LC_MESSAGES/django.mo hu/LC_MESSAGES/django.po + msgfmt -c -o it/LC_MESSAGES/django.mo it/LC_MESSAGES/django.po + msgfmt -c -o nl/LC_MESSAGES/django.mo nl/LC_MESSAGES/django.po + msgfmt -c -o pl/LC_MESSAGES/django.mo pl/LC_MESSAGES/django.po + msgfmt -c -o ru/LC_MESSAGES/django.mo ru/LC_MESSAGES/django.po + msgfmt -c -o tr/LC_MESSAGES/django.mo tr/LC_MESSAGES/django.po + msgfmt -c -o uk/LC_MESSAGES/django.mo uk/LC_MESSAGES/django.po