* Many changes about internationalization (using gettext_noop when needed for example)

* Some strings were not detected by makemessages (for example in javascript files, behind comments...). There are still some issues with that but I think I'll have to wait a future Django release.
* Support for per-user language selection is almost done.

see #166
This commit is contained in:
Antoine Nguyen
2011-09-14 14:18:46 +02:00
parent 0b0107722f
commit 9cde410ae4
41 changed files with 1826 additions and 1499 deletions
-2
View File
@@ -15,5 +15,3 @@ class ExtControlMiddleware(object):
if ext.enabled:
return None
raise Http404
+10 -2
View File
@@ -61,11 +61,19 @@ def __guess_extension():
return None
def register_admin(name, **kwargs):
app = kwargs.has_key("app") and kwargs["app"] or __guess_extension()
if kwargs.has_key("app"):
app = kwargs["app"]
del kwargs["app"]
else:
app = __guess_extension()
return __register(app, 'A', name, **kwargs)
def register_user(name, **kwargs):
app = kwargs.has_key("app") and kwargs["app"] or __guess_extension()
if kwargs.has_key("app"):
app = kwargs["app"]
del kwargs["app"]
else:
app = __guess_extension()
return __register(app, 'U', name, **kwargs)
def unregister_app(app):
+1 -1
View File
@@ -28,7 +28,7 @@ class Column:
label = getattr(self, "label")
except KeyError:
label = getattr(self, "name")
return label
return _(label)
class SelectionColumn(Column):