Use ugettext and shorter variable names for inellegible list
authorSverre Rabbelier <srabbelier@gmail.com>
Mon, 30 Mar 2009 22:38:08 +0000
changeset 2036 d23379c80b48
parent 2035 5b663ac5bb14
child 2037 3f355dca3679
Use ugettext and shorter variable names for inellegible list We use the abbreviated variable names in other list views as well to make it doable to work with them (with the meaning of the abbreviation explained with a comment after the definition). Bring the inellegible list up to date with this. Patch by: Sverre Rabbelier
app/soc/views/models/organization.py
--- a/app/soc/views/models/organization.py	Mon Mar 30 22:16:55 2009 +0000
+++ b/app/soc/views/models/organization.py	Mon Mar 30 22:38:08 2009 +0000
@@ -285,26 +285,28 @@
     new_list = lists.getListContent(
         request, new_params, filter, idx=1, need_content=True)
 
-    ineligible_params = list_params.copy() # new proposals
-    ineligible_params['list_description'] = 'List of ineligible %s sent to %s ' % (
-    ineligible_params['name_plural'], org_entity.name)
-    ineligible_params['list_action'] = (redirects.getReviewRedirect, ineligible_params)
+    ip_params = list_params.copy() # ineligible proposals
+
+    description = ugettext('List of ineligible %s sent to %s ') % (
+        ip_params['name_plural'], org_entity.name)
+
+    ip_params['list_description'] = description
+    ip_params['list_action'] = (redirects.getReviewRedirect, ip_params)
 
     filter = {'org': org_entity,
               'status': 'invalid'}
 
-    contents = []
-    ineligible_list = lists.getListContent(
-        request, ineligible_params, filter, idx=1, need_content=False)
+    ip_list = lists.getListContent(
+        request, ip_params, filter, idx=1, need_content=True)
 
     # fill contents with all the needed lists
     if new_list != None:
       contents.append(new_list)
-    
+
     contents.append(prop_list)
-    
-    if ineligible_list != None:
-      contents.append(ineligible_list)
+
+    if ip_list != None:
+      contents.append(ip_list)
 
     # call the _list method from base to display the list
     return self._list(request, list_params, contents, page_name, context)