ankitpopli1891 / django-autotranslate

A simple Django app to automatically translate the pot (.po) files generated by django's makemessages command using google translate.
https://ankitpopli1891.github.io/django-autotranslate/
MIT License
70 stars 39 forks source link

added plural forms support #10

Closed generalov closed 8 years ago

generalov commented 8 years ago

I've added support for plural forms.

msgid "City"
msgid_plural "Cities"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""

This PR is about the filling the msgstr[0] with msgid translation and rest of msgstr[N] with msgid_plural translation.

I've added the six to requirements.txt too.

ankitpopli1891 commented 8 years ago

@generalov Just FYI, I'll be able to test and release the version by the end of next week.

Thanks a lot for the contribution.

Cheers!!

ankitpopli1891 commented 8 years ago

@generalov Can you please sync your repo to get the latest Travis-CI conf.

Thanks

generalov commented 8 years ago

Done.

I've checked the Django Python compability docs and I've updated the tox.ini according that (see the list of environments tox -l). There were unsupported and unrecommended combinations.

https://docs.djangoproject.com/en/1.9/releases/1.5/#python-compatibility https://docs.djangoproject.com/en/1.9/releases/1.6/#python-compatibility https://docs.djangoproject.com/en/1.9/releases/1.7/#python-compatibility https://docs.djangoproject.com/en/1.9/releases/1.8/#python-compatibility https://docs.djangoproject.com/en/1.9/releases/1.9/#python-compatibility

I've just removed the py3.2 from the environment list because the goslate raises SyntaxError in Python-3.2.

You may to reduce the number of dj-py combinations in the .travis.yml too.

ankitpopli1891 commented 8 years ago

@generalov Thanks a ton for all the hard work.

I've also updated the Travis YAML as you suggested.

Thanks