Ignore:
Timestamp:
22 Feb 2012, 10:35:47 (13 years ago)
Author:
Henrik Bettermann
Message:

Translate student registration worklow titles, messages and destination states.

Show translated states on pages.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/student.py

    r7671 r7677  
    2828from waeup.sirp.interfaces import (
    2929    IObjectHistory, IUserAccount, IFileStoreNameChooser, IFileStoreHandler,
    30     ISIRPUtils, CLEARANCE)
     30    ISIRPUtils, CLEARANCE, registration_states_vocab)
    3131from waeup.sirp.image import SIRPImageFile
    3232from waeup.sirp.imagestorage import DefaultFileStoreHandler
     
    7878    def state(self):
    7979        state = IWorkflowState(self).getState()
     80        return state
     81
     82    @property
     83    def translated_state(self):
     84        state = registration_states_vocab.getTermByToken(
     85            self.state).title
    8086        return state
    8187
  • main/waeup.sirp/trunk/src/waeup/sirp/students/workflow.py

    r7670 r7677  
    2020    Transition(
    2121        transition_id = 'create',
    22         title = 'Create student',
     22        title = _('Create student'),
    2323        source = None,
    2424        condition = NullCondition,
    25         msg = 'Student record created',
     25        msg = _('Student record created'),
    2626        destination = CREATED),
    2727
     
    2929        transition_id = 'admit',
    3030        title = _('Admit student'),
    31         msg = 'Student admitted',
     31        msg = _('Student admitted'),
    3232        source = CREATED,
    3333        destination = ADMITTED),
     
    3535    Transition(
    3636        transition_id = 'reset1',
    37         title = 'Reset student',
    38         msg = 'Student record reset',
     37        title = _('Reset student'),
     38        msg = _('Student record reset'),
    3939        source = ADMITTED,
    4040        destination = CREATED),
     
    4242    Transition(
    4343        transition_id = 'start_clearance',
    44         title = 'Start clearance',
    45         msg = 'Clearance started',
     44        title = _('Start clearance'),
     45        msg = _('Clearance started'),
    4646        source = ADMITTED,
    4747        destination = CLEARANCE),
     
    4949    Transition(
    5050        transition_id = 'reset2',
    51         title = 'Reset to admitted',
    52         msg = "Student record reset to 'admitted'",
     51        title = _('Reset to admitted'),
     52        msg = _("Student record reset to 'admitted'"),
    5353        source = CLEARANCE,
    5454        destination = ADMITTED),
     
    5656    Transition(
    5757        transition_id = 'request_clearance',
    58         title = 'Request clearance',
    59         msg = 'Clearance requested',
     58        title = _('Request clearance'),
     59        msg = _('Clearance requested'),
    6060        source = CLEARANCE,
    6161        destination = REQUESTED),
     
    6363    Transition(
    6464        transition_id = 'reset3',
    65         title = 'Reset to clearance',
    66         msg = "Student record reset to 'clearance'",
     65        title = _('Reset to clearance'),
     66        msg = _("Student record reset to 'clearance'"),
    6767        source = REQUESTED,
    6868        destination = CLEARANCE),
     
    7070    Transition(
    7171        transition_id = 'clear',
    72         title = 'Clear student',
    73         msg = 'Cleared',
     72        title = _('Clear student'),
     73        msg = _('Cleared'),
    7474        source = REQUESTED,
    7575        destination = CLEARED),
     
    7777    Transition(
    7878        transition_id = 'reset4',
    79         title = 'Reset to clearance',
    80         msg = "Student record reset to 'clearance'",
     79        title = _('Reset to clearance'),
     80        msg = _("Student record reset to 'clearance'"),
    8181        source = CLEARED,
    8282        destination = CLEARANCE),
     
    8484    Transition(
    8585        transition_id = 'pay_first_school_fee',
    86         title = 'Pay school fee',
    87         msg = 'School fee paid',
     86        title = _('Pay school fee'),
     87        msg = _('School fee paid'),
    8888        source = CLEARED,
    8989        destination = PAID),
     
    9191    Transition(
    9292        transition_id = 'reset5',
    93         title = 'Reset to cleared',
    94         msg = "Student record reset to 'cleared'",
     93        title = _('Reset to cleared'),
     94        msg = _("Student record reset to 'cleared'"),
    9595        source = PAID,
    9696        destination = CLEARED),
     
    9898    Transition(
    9999        transition_id = 'pay_school_fee',
    100         title = 'Pay school fee',
    101         msg = 'School fee paid',
     100        title = _('Pay school fee'),
     101        msg = _('School fee paid'),
    102102        source = RETURNING,
    103103        destination = PAID),
     
    105105    Transition(
    106106        transition_id = 'reset6',
    107         title = 'Reset to returning',
    108         msg = "Student record reset to 'returning'",
     107        title = _('Reset to returning'),
     108        msg = _("Student record reset to 'returning'"),
    109109        source = PAID,
    110110        destination = RETURNING),
     
    112112    Transition(
    113113        transition_id = 'register_courses',
    114         title = 'Register courses',
    115         msg = 'Courses registered',
     114        title = _('Register courses'),
     115        msg = _('Courses registered'),
    116116        source = PAID,
    117117        destination = REGISTERED),
     
    119119    Transition(
    120120        transition_id = 'reset7',
    121         title = 'Reset to paid',
    122         msg = "Student record reset to 'paid'",
     121        title = _('Reset to paid'),
     122        msg = _("Student record reset to 'paid'"),
    123123        source = REGISTERED,
    124124        destination = PAID),
     
    126126    Transition(
    127127        transition_id = 'validate_courses',
    128         title = 'Validate courses',
    129         msg = 'Courses validated',
     128        title = _('Validate courses'),
     129        msg = _('Courses validated'),
    130130        source = REGISTERED,
    131131        destination = VALIDATED),
     
    133133    Transition(
    134134        transition_id = 'reset8',
    135         title = 'Reset to paid',
    136         msg = "Student record reset to 'paid'",
     135        title = _('Reset to paid'),
     136        msg = _("Student record reset to 'paid'"),
    137137        source = VALIDATED,
    138138        destination = PAID),
     
    140140    Transition(
    141141        transition_id = 'return',
    142         title = 'Return',
    143         msg = 'Returned',
     142        title = _('Return'),
     143        msg = _('Returned'),
    144144        source = VALIDATED,
    145145        destination = RETURNING),
     
    147147    Transition(
    148148        transition_id = 'reset9',
    149         title = 'Reset to validated',
    150         msg = "Student record reset to 'validated'",
     149        title = _('Reset to validated'),
     150        msg = _("Student record reset to 'validated'"),
    151151        source = RETURNING,
    152152        destination = VALIDATED),
Note: See TracChangeset for help on using the changeset viewer.