#11105: Permission names should be translated on syncdb ----------------------------------+----------------------------------------- Reporter: hcarvalhoalves | Owner: nobody Status: new | Milestone: Component: Internationalization | Version: 1.1-beta-1 Keywords: | Stage: Unreviewed Has_patch: 1 | ----------------------------------+----------------------------------------- The basic permissions created during ''syncdb'' (add, change, delete) should be localized according to the LANGUAGE_CODE. Permission names are the only human-readable representation available to apps using contrib.auth, and are also used on contrib.admin, so it's kind of disappointing that all the admin is translated, but still unusable for managing permissions by non-english speakers because permissions aren't translated.
The relevant code is at {{{django/contrib/auth/management/__init__.py:12}}} {{{ def _get_all_permissions(opts): "Returns (codename, name) for all permissions in the given opts." perms = [] for action in ('add', 'change', 'delete'): perms.append((_get_permission_codename(action, opts), u'Can %s %s' % (action, opts.verbose_name_raw))) return perms + list(opts.permissions) }}} I tried a patch (see attachment), and created translations to my locale (pt_BR), but ''syncdb'' doesn't seem to consider translations. Looking for an insight on this, fixing this should be trivial, and would help a lot those using contrib.auth (today I need to edit all my permission's names by hand to about 60 models, it sucks). -- Ticket URL: <http://code.djangoproject.com/ticket/11105> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---