Factored out the "No Record Available" message.
authorLennard de Rijk <ljvderijk@gmail.com>
Thu, 30 Jul 2009 10:53:03 +0200
changeset 2692 b57572c43b32
parent 2691 f8e0a007d99b
child 2693 7bda04a2b6c3
Factored out the "No Record Available" message.
app/soc/views/helper/list_info.py
--- a/app/soc/views/helper/list_info.py	Thu Jul 30 10:49:19 2009 +0200
+++ b/app/soc/views/helper/list_info.py	Thu Jul 30 10:53:03 2009 +0200
@@ -22,9 +22,14 @@
   ]
 
 
+from django.utils.translation import ugettext
+
 from soc.views.helper import redirects
 
 
+DEF_NO_RECORD_AVAILABLE_MESSAGE = ugettext('No Record Available')
+
+
 def getStudentProposalInfo(ranking, proposals_keys):
   """Returns a function that returns information about the rank and assignment.
 
@@ -146,8 +151,8 @@
       info['taken_by'] = record_entity.user.name
       info['taken_on'] = record_entity.modified
     else:
-      info['taken_by'] = 'No Record Available'
-      info['taken_on'] = 'No Record Available'
+      info['taken_by'] = DEF_NO_RECORD_AVAILABLE_MESSAGE
+      info['taken_on'] = DEF_NO_RECORD_AVAILABLE_MESSAGE
 
     take_redirect_info = {'survey': survey_entity,
                           'params': survey_params}