app/soc/views/helper/params.py
changeset 970 8b5611d5b053
parent 934 9fcc08971efe
child 1007 3b66772d21a5
equal deleted inserted replaced
969:b12de918d660 970:8b5611d5b053
    21   '"Sverre Rabbelier" <sverre@rabbelier.nl>',
    21   '"Sverre Rabbelier" <sverre@rabbelier.nl>',
    22   ]
    22   ]
    23 
    23 
    24 
    24 
    25 from django import forms
    25 from django import forms
    26 from django.utils.translation import ugettext_lazy
    26 from django.utils.translation import ugettext
    27 
    27 
    28 from soc.logic import cleaning
    28 from soc.logic import cleaning
    29 from soc.logic import dicts
    29 from soc.logic import dicts
    30 from soc.models import linkable
    30 from soc.models import linkable
    31 from soc.views import helper
    31 from soc.views import helper
    32 from soc.views.helper import access
    32 from soc.views.helper import access
    33 from soc.views.helper import dynaform
    33 from soc.views.helper import dynaform
    34 from soc.views.helper import redirects
    34 from soc.views.helper import redirects
    35 
    35 
    36 
    36 
    37 DEF_LIST_DESCRIPTION_FMT = ugettext_lazy(
    37 DEF_LIST_DESCRIPTION_FMT = ugettext(
    38     'List of %(name_plural)s in Google Open Source Programs.')
    38     'List of %(name_plural)s in Google Open Source Programs.')
    39 
    39 
    40 DEF_CREATE_INSTRUCTION_MSG_FMT = ugettext_lazy(
    40 DEF_CREATE_INSTRUCTION_MSG_FMT = ugettext(
    41       'Please use this form to select a %(name).')
    41       'Please use this form to select a %(name).')
    42 
    42 
    43 DEF_SUBMIT_MSG_PARAM_NAME = 's'
    43 DEF_SUBMIT_MSG_PARAM_NAME = 's'
    44 DEF_SUBMIT_MSG_PROFILE_SAVED = 0
    44 DEF_SUBMIT_MSG_PROFILE_SAVED = 0
    45 
    45 
   170       'list_row': 'row',
   170       'list_row': 'row',
   171       'list_heading': 'heading',
   171       'list_heading': 'heading',
   172       }
   172       }
   173 
   173 
   174   new_params['list_description'] = DEF_LIST_DESCRIPTION_FMT % params
   174   new_params['list_description'] = DEF_LIST_DESCRIPTION_FMT % params
   175   new_params['save_message'] = [ugettext_lazy('Profile saved.')]
   175   new_params['save_message'] = [ugettext('Profile saved.')]
   176   new_params['submit_msg_param_name'] = DEF_SUBMIT_MSG_PARAM_NAME
   176   new_params['submit_msg_param_name'] = DEF_SUBMIT_MSG_PARAM_NAME
   177   new_params['edit_params'] = {
   177   new_params['edit_params'] = {
   178       DEF_SUBMIT_MSG_PARAM_NAME: DEF_SUBMIT_MSG_PROFILE_SAVED,
   178       DEF_SUBMIT_MSG_PARAM_NAME: DEF_SUBMIT_MSG_PROFILE_SAVED,
   179       }
   179       }
   180 
   180