Index: django/test/simple.py
===================================================================
--- django/test/simple.py	(révision 7512)
+++ django/test/simple.py	(copie de travail)
@@ -73,6 +73,16 @@
                 pass
     return suite
 
+def _get_all_tests_from_suite(suite):
+    """Explore suite recursively to get _all_ tests in it
+    """
+    if isinstance(suite,unittest.TestCase):
+        return [suite]
+    else:
+        all_tests = []
+        [all_tests.extend(_get_all_tests_from_suite(sub_suite)) for sub_suite in getattr(suite,'_tests',[])]
+        return all_tests
+    
 def build_test(label):
     """Construct a test case a test with the specified label. Label should 
     be of the form model.TestClass or model.TestClass.test_method. Returns
@@ -92,6 +102,15 @@
         if test_module:
             TestClass = getattr(test_module, parts[1], None)
 
+    # Couldn't find the test class; look in test suite
+    if TestClass is None:
+        suite = build_suite(app_module)
+        all_tests = _get_all_tests_from_suite(suite)
+        for test_in_suite in all_tests:
+            if test_in_suite.__class__.__name__ == parts[1]:
+                TestClass = test_in_suite.__class__
+                break
+
     if len(parts) == 2: # label is app.TestClass
         try:
             return unittest.TestLoader().loadTestsFromTestCase(TestClass)
Index: django/core/management/commands/syncdb.py
===================================================================
--- django/core/management/commands/syncdb.py	(révision 7512)
+++ django/core/management/commands/syncdb.py	(copie de travail)
@@ -34,8 +34,10 @@
             try:
                 __import__(app_name + '.management', {}, {}, [''])
             except ImportError, exc:
-                if not exc.args[0].startswith('No module named management'):
-                    raise
+		# RBA : strange uno error : we need to be more permissive with errors
+                #if not exc.args[0].startswith('No module named management'):
+                #    raise
+		pass
 
         cursor = connection.cursor()
 
Index: django/core/management/__init__.py
===================================================================
--- django/core/management/__init__.py	(révision 7512)
+++ django/core/management/__init__.py	(copie de travail)
@@ -249,7 +249,7 @@
     settings_name = os.path.splitext(settings_filename)[0]
     sys.path.append(os.path.join(project_directory, os.pardir))
     project_module = __import__(project_name, {}, {}, [''])
-    sys.path.pop()
+    #sys.path.pop()
 
     # Set DJANGO_SETTINGS_MODULE appropriately.
     os.environ['DJANGO_SETTINGS_MODULE'] = '%s.%s' % (project_name, settings_name)
Index: django/templatetags/i18n.py
===================================================================
--- django/templatetags/i18n.py	(révision 7512)
+++ django/templatetags/i18n.py	(copie de travail)
@@ -1,8 +1,8 @@
 import re
 
 from django.template import Node, Variable, VariableNode
-from django.template import TemplateSyntaxError, TokenParser, Library
-from django.template import TOKEN_TEXT, TOKEN_VAR
+from django.template import TemplateSyntaxError, TokenParser, Library, Token
+from django.template import TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
 from django.utils import translation
 from django.utils.encoding import force_unicode
 
@@ -235,19 +235,39 @@
         token = parser.next_token()
         if token.token_type in (TOKEN_VAR, TOKEN_TEXT):
             singular.append(token)
+        elif token.token_type == TOKEN_BLOCK and token.contents.strip().startswith('as '):
+            cont = token.split_contents()
+            if len(cont) != 2:
+                raise TemplateSyntaxError, "Error in 'as' block inside blocktrans"
+            as_tag,name = token.split_contents()
+            t_block = parser.parse(('endas',))
+            singular.append(token)
+            parser.delete_first_token()
+            extra_context[name] = t_block
+            singular.append(Token(TOKEN_VAR,name))
         else:
             break
     if countervar and counter:
         if token.contents.strip() != 'plural':
-            raise TemplateSyntaxError, "'blocktrans' doesn't allow other block tags inside it"
+            raise TemplateSyntaxError, "'blocktrans' can only include 'as' block tags"
         while parser.tokens:
             token = parser.next_token()
             if token.token_type in (TOKEN_VAR, TOKEN_TEXT):
                 plural.append(token)
+            elif token.token_type == TOKEN_BLOCK and token.contents.strip().startswith('as '):
+                cont = token.split_contents()
+                if len(cont) != 2:
+                    raise TemplateSyntaxError, "Error in 'as' block inside blocktrans"
+                as_tag,name = cont
+                t_block = parser.parse(('endas',))
+                plural.append(token)
+                parser.delete_first_token()
+                extra_context[name] = t_block
+                plural.append(Token(TOKEN_VAR,name))
             else:
                 break
     if token.contents.strip() != 'endblocktrans':
-        raise TemplateSyntaxError, "'blocktrans' doesn't allow other block tags (seen %r) inside it" % token.contents
+        raise TemplateSyntaxError, "'blocktrans' can only include 'as' block tags (seen %r) inside it" % token.contents
 
     return BlockTranslateNode(extra_context, singular, plural, countervar,
             counter)
Index: django/utils/translation/trans_real.py
===================================================================
--- django/utils/translation/trans_real.py	(révision 7512)
+++ django/utils/translation/trans_real.py	(copie de travail)
@@ -452,11 +452,12 @@
     inplural = False
     singular = []
     plural = []
+    inas = False
     for t in Lexer(src, None).tokenize():
         if intrans:
             if t.token_type == TOKEN_BLOCK:
                 endbmatch = endblock_re.match(t.contents)
-                pluralmatch = plural_re.match(t.contents)
+                pluralmatch = plural_re.match(t.contents)		
                 if endbmatch:
                     if inplural:
                         out.write(' ngettext(%r,%r,count) ' % (''.join(singular), ''.join(plural)))
@@ -475,17 +476,31 @@
                 elif pluralmatch:
                     inplural = True
                 else:
-                    raise SyntaxError("Translation blocks must not include other block tags: %s" % t.contents)
+                    if t.contents.startswith('as '):
+                        cont = t.split_contents()
+                        if len(cont) != 2:
+                            raise TemplateSyntaxError, "Error in 'as' block inside blocktrans"
+                        as_tag,name = cont
+                        inas = True
+                        if inplural:
+                            plural.append('%%(%s)s' % name)
+                        else:
+                            singular.append('%%(%s)s' % name)
+                    elif t.contents == "endas":
+                        inas = False
+                    else:
+                        raise SyntaxError("Translation blocks can only include 'as' block tags: %s" % t.contents)
             elif t.token_type == TOKEN_VAR:
                 if inplural:
                     plural.append('%%(%s)s' % t.contents)
                 else:
                     singular.append('%%(%s)s' % t.contents)
             elif t.token_type == TOKEN_TEXT:
-                if inplural:
-                    plural.append(t.contents)
-                else:
-                    singular.append(t.contents)
+                if not inas:
+                    if inplural:
+                        plural.append(t.contents)
+                    else:
+                        singular.append(t.contents)
         else:
             if t.token_type == TOKEN_BLOCK:
                 imatch = inline_re.match(t.contents)
