No longer ship Polib but rely on the cheese shop instead. Also fixes a behavior with plural forms that was addressed upstram in polib 1.0.4

This commit is contained in:
Marco Bonetti 2014-02-28 14:12:21 +01:00
parent b8654ab7b1
commit 78a6b4d325
5 changed files with 17 additions and 1760 deletions

View file

@ -1,6 +1,10 @@
Version 0.7.4
-------------
* New ROSETTA_POFILENAMES setting. (PR #44, thanks @wrboyce)
* Updated Czech translation (#97, thanks @cuchac)
* Fixed gettext standard compliance of all shipped translations
* No longer ship polib, rely on the Cheeseshop instead
Version 0.7.3
-------------

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,7 @@ from django.views.decorators.cache import never_cache
from rosetta.utils.microsofttranslator import Translator, TranslateApiException
from rosetta.conf import settings as rosetta_settings
from rosetta.polib import pofile
from polib import pofile
from rosetta.poutil import find_pos, pagination_range, timestamp_with_timezone
from rosetta.signals import entry_changed, post_save
from rosetta.storage import get_storage
@ -97,6 +97,10 @@ def home(request):
# so we need unicode here.
plural_id = six.text_type(rx_plural.match(key).groups()[1])
# Above no longer true as of Polib 1.0.4
if plural_id and plural_id.isdigit():
plural_id = int(plural_id)
elif rx.match(key):
md5hash = str(rx.match(key).groups()[0])

View file

@ -4,35 +4,35 @@ if [ ! -d .venv_14 ]
then
virtualenv --no-site-packages --distribute --python=python2 .venv_14
. .venv_14/bin/activate
pip install --use-mirrors Django==1.4 coverage python-memcached six requests==2.1.0
pip install --use-mirrors Django==1.4 coverage python-memcached six requests==2.1.0 polib==1.0.4
deactivate
fi
if [ ! -d .venv_15 ]
then
virtualenv --no-site-packages --distribute --python=python2 .venv_15
. .venv_15/bin/activate
pip install --use-mirrors Django==1.5 coverage python-memcached six requests==2.1.0
pip install --use-mirrors Django==1.5 coverage python-memcached six requests==2.1.0 polib==1.0.4
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
pip install --use-mirrors Django==1.5 coverage python3-memcached six requests==2.1.0 polib==1.0.4
deactivate
fi
if [ ! -d .venv_16 ]
then
virtualenv --no-site-packages --distribute --python=python2 .venv_16
. .venv_16/bin/activate
pip install --use-mirrors coverage python-memcached six Django==1.6.1 requests==2.1.0
pip install --use-mirrors coverage python-memcached six Django==1.6.1 requests==2.1.0 polib==1.0.4
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
pip install --use-mirrors coverage python3-memcached six Django==1.6.1 requests==2.1.0 polib==1.0.4
deactivate
fi
@ -76,3 +76,5 @@ 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

View file

@ -28,5 +28,6 @@ setup(
'six >=1.2.0',
'Django >= 1.3',
'requests >= 2.1.0',
'polib == 1.0.4'
]
)