pinax / symposion

a Django project for conference websites
BSD 3-Clause "New" or "Revised" License
299 stars 147 forks source link

i18n for admin screen with python3 compatibility #92

Closed miurahr closed 9 years ago

miurahr commented 9 years ago
miurahr commented 9 years ago

What I'm doing are as follows:

Python3 porting

Things are suggested in python3 porting guide. https://docs.djangoproject.com/en/1.8/topics/python3/

  1. __str__ instead of __unicode__ https://docs.djangoproject.com/en/1.8/topics/python3/#str-and-unicode-methods
  2. Adding from __future__ import unicode_literals at the top of your Python modules https://docs.djangoproject.com/en/1.8/topics/python3/#unicode-literals
  3. Removing the u prefix before unicode strings; https://docs.djangoproject.com/en/1.8/topics/python3/#unicode-literals

Admin view i18n-ed

  1. Add verbose_name=_("foo boo") for all items in models. https://docs.djangoproject.com/en/1.8/topics/db/models/#verbose-field-names https://docs.djangoproject.com/en/1.8/ref/models/fields/#verbose-name
  2. add _("foo") for verbose_name="" in apps.py

Form i18n-ed

  1. add label field for forms https://docs.djangoproject.com/en/1.8/ref/forms/fields/#label

Views i18n-ed

  1. add _("foo") for message.success() in views.py
miurahr commented 9 years ago

Uhm, I'm doing 4 different thing in single PR.

These four are changing similar part of code, so it will be required resolve conflict if these are separate PR.

I'd like to try split these as separate PRs. OR, if it is difficult, at least, organize separate commits.

miurahr commented 9 years ago

split to 2 separate PRs, #100 #101, so I'd like to close here.