Verbiage fix
authorSverre Rabbelier <srabbelier@gmail.com>
Thu, 19 Mar 2009 17:11:03 +0000
changeset 1940 609128cc37f7
parent 1939 a1c53f546603
child 1941 81fc81b62c5e
Verbiage fix Patch by: Sverre Rabbelier3
app/soc/views/models/program.py
--- a/app/soc/views/models/program.py	Thu Mar 19 17:10:26 2009 +0000
+++ b/app/soc/views/models/program.py	Thu Mar 19 17:11:03 2009 +0000
@@ -63,6 +63,16 @@
   """View methods for the Program model.
   """
 
+  DEF_ACCEPTED_ORGS_MSG_FMT = ugettext("These organizations have"
+      " been accepted into %(name)s, but they have not yet completed"
+      " their organization profile. You can still learn more about"
+      " each organization by visiting the links below.")
+
+  DEF_CREATED_ORGS_MSG_FMT = ugettext("These organizations have been"
+      " accepted into %(name)s and have completed their organization"
+      " profiles. You can learn more about each organization by"
+      " visiting the links below.")
+
   def __init__(self, params=None):
     """Defines the fields and methods required for the base View class
     to provide the user with list, public, create, edit and delete views.
@@ -189,6 +199,9 @@
 
     program_entity = logic.getFromKeyFieldsOr404(kwargs)
 
+    fmt = {'name': program_entity.name}
+    description = self.DEF_ACCEPTED_ORGS_MSG_FMT % fmt
+
     filter = {
         'status': 'accepted',
         'scope': program_entity,
@@ -200,11 +213,7 @@
     # define the list redirect action to show the notification
     del aa_params['list_key_order']
     aa_params['list_action'] = (redirects.getPublicRedirect, aa_params)
-    aa_params['list_description'] = ugettext(
-        "An overview of accepted organization applications that have"
-        " not yet created their organization profile. Students can"
-        " only apply to organizations that created their organization"
-        " profile.")
+    aa_params['list_description'] = description
 
     aa_list = lists.getListContent(request, aa_params, filter, idx=0,
                                    need_content=True)
@@ -212,14 +221,15 @@
     if aa_list:
       contents.append(aa_list)
 
+    description = self.DEF_CREATED_ORGS_MSG_FMT % fmt
+
     filter['status'] = ['new', 'active']
 
     from soc.views.models import organization as org_view
     ao_params = org_view.view.getParams().copy() # active orgs
 
     ao_params['list_action'] = (redirects.getPublicRedirect, ao_params)
-    ao_params['list_description'] = ugettext(
-        "An overview of all accepted organizations.")
+    ao_params['list_description'] = description
 
     ao_list = lists.getListContent(request, ao_params, filter, idx=1)
     contents.append(ao_list)