Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 7710)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 7714)
@@ -25,4 +25,5 @@
 from zope.component import getUtility, createObject, getAdapter
 from zope.formlib.form import setUpEditWidgets
+from zope.i18n import translate
 from hurry.workflow.interfaces import (
     IWorkflowInfo, IWorkflowState, InvalidTransitionError)
@@ -297,5 +298,5 @@
         return view.widgets['description']()
 
-    @action('Save', style='primary')
+    @action(_('Save'), style='primary')
     def save(self, **data):
         self.applyData(self.context, **data)
@@ -356,13 +357,13 @@
         'firstname', 'middlename', 'lastname',
         'email', 'phone')
-    label = 'Add applicant'
+    label = _('Add applicant')
     pnav = 3
 
-    @action('Create application record')
+    @action(_('Create application record'))
     def addApplicant(self, **data):
         applicant = createObject(u'waeup.Applicant')
         self.applyData(applicant, **data)
         self.context.addApplicant(applicant)
-        self.flash('Applicant record created.')
+        self.flash(_('Applicant record created.'))
         self.redirect(
             self.url(self.context[applicant.application_number], 'index'))
@@ -377,5 +378,5 @@
         'locked', 'course_admitted', 'password')
     form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')
-    label = 'Applicant'
+    label = _('Applicant')
     pnav = 3
 
@@ -392,12 +393,12 @@
     def hasPassword(self):
         if self.context.password:
-            return 'set'
-        return 'unset'
+            return _('set')
+        return _('unset')
 
     @property
     def label(self):
         container_title = self.context.__parent__.title
-        return '%s Application Record %s' % (
-            container_title, self.context.application_number)
+        return _('${a} Application Record ${b}', mapping = {
+            'a':container_title, 'b':self.context.application_number})
 
     def getCourseAdmitted(self):
@@ -449,5 +450,5 @@
             academic_session = grok.getSite()['configuration'][session]
         except KeyError:
-            self.flash('Session configuration object is not available.')
+            self.flash(_('Session configuration object is not available.'))
             return
         timestamp = "%d" % int(time()*1000)
@@ -456,5 +457,5 @@
             if ticket.p_state == 'paid':
                   self.flash(
-                      'This type of payment has already been made.')
+                      _('This type of payment has already been made.'))
                   self.redirect(self.url(self.context))
                   return
@@ -469,5 +470,5 @@
         payment.surcharge_3 = academic_session.surcharge_3
         self.context[payment.p_id] = payment
-        self.flash('Payment ticket created.')
+        self.flash(_('Payment ticket created.'))
         return
 
@@ -496,6 +497,6 @@
     @property
     def label(self):
-        return '%s: Online Payment Ticket %s' % (
-            self.context.__parent__.display_fullname,self.context.p_id)
+        return _('${a}: Online Payment Ticket ${b}', mapping = {
+            'a':self.context.__parent__.display_fullname, 'b':self.context.p_id})
 
 class OnlinePaymentCallbackPage(UtilityView, grok.View):
@@ -524,5 +525,5 @@
         self.context.__parent__.loggerInfo(
             ob_class, 'valid callback: %s' % self.context.p_id)
-        self.flash('Valid callback received.')
+        self.flash(_('Valid callback received.'))
         return
 
@@ -541,13 +542,21 @@
     form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le')
     prefix = 'form'
-    title = 'Payment Data'
+
+    @property
+    def title(self):
+        portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
+        return translate(_('Payment Data'), 'waeup.sirp',
+            target_language=portal_language)
 
     @property
     def label(self):
-        return 'Online Payment Receipt %s' % self.context.p_id
+        portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
+        return translate(_('Online Payment Receipt'),
+            'waeup.sirp', target_language=portal_language) \
+            + ' %s' % self.context.p_id
 
     def render(self):
         if self.context.p_state != 'paid':
-            self.flash('Ticket not yet paid.')
+            self.flash(_('Ticket not yet paid.'))
             self.redirect(self.url(self.context))
             return
@@ -569,29 +578,31 @@
     prefix = 'form'
 
-    @property
-    def label(self):
-        container_title = self.context.__parent__.title
-        return '%s Application Record %s' % (
-            container_title, self.context.application_number)
-
-    def getCourseAdmitted(self):
-        """Return title and code in html format to the certificate
-           admitted.
-        """
-        course_admitted = self.context.course_admitted
-        #if ICertificate.providedBy(course_admitted):
-        if getattr(course_admitted, '__parent__',None):
-            title = course_admitted.title
-            code = course_admitted.code
-            return '%s - %s' %(code,title)
-        return ''
-
-    def setUpWidgets(self, ignore_request=False):
-        self.adapters = {}
-        self.widgets = setUpEditWidgets(
-            self.form_fields, self.prefix, self.context, self.request,
-            adapters=self.adapters, for_display=True,
-            ignore_request=ignore_request
-            )
+    #@property
+    #def label(self):
+    #    portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
+    #    container_title = self.context.__parent__.title
+    #    label = translate('Application Record',
+    #        'waeup.sirp', target_language=portal_language)
+    #    return container_title +  label + self.context.application_number
+
+    #def getCourseAdmitted(self):
+    #    """Return title and code in html format to the certificate
+    #       admitted.
+    #    """
+    #    course_admitted = self.context.course_admitted
+    #    #if ICertificate.providedBy(course_admitted):
+    #    if getattr(course_admitted, '__parent__',None):
+    #        title = course_admitted.title
+    #        code = course_admitted.code
+    #        return '%s - %s' %(code,title)
+    #    return ''
+
+    #def setUpWidgets(self, ignore_request=False):
+    #    self.adapters = {}
+    #    self.widgets = setUpEditWidgets(
+    #        self.form_fields, self.prefix, self.context, self.request,
+    #        adapters=self.adapters, for_display=True,
+    #        ignore_request=ignore_request
+    #        )
 
     def render(self):
@@ -612,10 +623,10 @@
     size = file_size(upload)
     if size > MAX_UPLOAD_SIZE:
-        view.flash('Uploaded image is too big!')
+        view.flash(_('Uploaded image is too big!'))
         return False
     dummy, ext = os.path.splitext(upload.filename)
     ext.lower()
     if ext != '.jpg':
-        view.flash('jpg file extension expected.')
+        view.flash(_('jpg file extension expected.'))
         return False
     upload.seek(0) # file pointer moved when determining size
@@ -639,6 +650,6 @@
     manage_applications = True
     pnav = 3
-    display_actions = [['Save', 'Final Submit'],
-                       ['Add online payment ticket','Remove selected tickets']]
+    display_actions = [[_('Save'), _('Final Submit')],
+        [_('Add online payment ticket'),_('Remove selected tickets')]]
 
     def update(self):
@@ -659,6 +670,6 @@
     def label(self):
         container_title = self.context.__parent__.title
-        return '%s Application Form %s' % (
-            container_title, self.context.application_number)
+        return _('${a} Application Form ${b}', mapping = {
+            'a':container_title, 'b':self.context.application_number})
 
     def getTransitions(self):
@@ -673,5 +684,5 @@
             dict(name=x, title=y) for x, y in allowed_transitions]
 
-    @action('Save', style='primary')
+    @action(_('Save'), style='primary')
     def save(self, **data):
         form = self.request.form
@@ -702,5 +713,5 @@
         if trans_id:
             self.wf_info.fireTransition(trans_id)
-        self.flash('Form has been saved.')
+        self.flash(_('Form has been saved.'))
         ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
         if fields_string:
@@ -717,5 +728,5 @@
             child_id = form['val_id']
         else:
-            self.flash('No payment selected.')
+            self.flash(_('No payment selected.'))
             self.redirect(self.url(self.context))
             return
@@ -730,8 +741,8 @@
                     deleted.append(id)
                 except:
-                    self.flash('Could not delete %s: %s: %s' % (
+                    self.flash(_('Could not delete:') + ' %s: %s: %s' % (
                             id, sys.exc_info()[0], sys.exc_info()[1]))
         if len(deleted):
-            self.flash('Successfully removed: %s' % ', '.join(deleted))
+            self.flash(_('Successfully removed:') + ' %s' % ', '.join(deleted))
             ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
             self.context.loggerInfo(
@@ -742,10 +753,10 @@
     # can be created. If no validation is requested, use
     # 'validator=NullValidator' in the action directive
-    @action('Add online payment ticket')
+    @action(_('Add online payment ticket'))
     def addPaymentTicket(self, **data):
         self.redirect(self.url(self.context, '@@addafp'))
         return
 
-    @jsaction('Remove selected tickets')
+    @jsaction(_('Remove selected tickets'))
     def removePaymentTickets(self, **data):
         self.delPaymentTickets(**data)
@@ -775,9 +786,9 @@
             actions = [[],[]]
         elif state == STARTED:
-            actions = [['Save'],
-                       ['Add online payment ticket','Remove selected tickets']]
+            actions = [[_('Save')],
+                [_('Add online payment ticket'),_('Remove selected tickets')]]
         elif state == PAID:
-            actions = [['Save', 'Final Submit'],
-                       ['Remove selected tickets']]
+            actions = [[_('Save'), _('Final Submit')],
+                [_('Remove selected tickets')]]
         else:
             actions = [[],[]]
@@ -789,5 +800,5 @@
 
     def emit_lock_message(self):
-        self.flash('The requested form is locked (read-only).')
+        self.flash(_('The requested form is locked (read-only).'))
         self.redirect(self.url(self.context))
         return
@@ -803,7 +814,7 @@
         store = getUtility(IExtFileStore)
         if not store.getFileByContext(self.context, attr=u'passport.jpg'):
-            return 'No passport picture uploaded.'
+            return _('No passport picture uploaded.')
         if not self.request.form.get('confirm_passport', False):
-            return 'Passport picture confirmation box not ticked.'
+            return _('Passport picture confirmation box not ticked.')
         return False
 
@@ -811,10 +822,10 @@
     # can be created. If no validation is requested, use
     # 'validator=NullValidator' in the action directive
-    @action('Add online payment ticket')
+    @action(_('Add online payment ticket'))
     def addPaymentTicket(self, **data):
         self.redirect(self.url(self.context, '@@addafp'))
         return
 
-    @jsaction('Remove selected tickets')
+    @jsaction(_('Remove selected tickets'))
     def removePaymentTickets(self, **data):
         self.delPaymentTickets(**data)
@@ -822,5 +833,5 @@
         return
 
-    @action('Save')
+    @action(_('Save'))
     def save(self, **data):
         if self.passport_changed is False:  # False is not None!
@@ -830,5 +841,5 @@
         return
 
-    @action('Final Submit')
+    @action(_('Final Submit'))
     def finalsubmit(self, **data):
         if self.passport_changed is False:  # False is not None!
@@ -842,10 +853,10 @@
         # might have forgotten to lock the form after changing the state
         if state != PAID:
-            self.flash('This form cannot be submitted. Wrong state!')
+            self.flash(_('This form cannot be submitted. Wrong state!'))
             return
         IWorkflowInfo(self.context).fireTransition('submit')
         self.context.application_date = datetime.now()
         self.context.locked = True
-        self.flash('Form has been submitted.')
+        self.flash(_('Form has been submitted.'))
         self.redirect(self.url(self.context))
         return
@@ -882,15 +893,16 @@
     @property
     def label(self):
-        return "Register for %s Application" % self.context.title
+        return _('Register for ${a} Application',
+            mapping = {'a':self.context.title})
 
     def update(self):
         # Check if application has started ...
         if not self.context.startdate or self.context.startdate > date.today():
-            self.flash('Application has not yet started.')
+            self.flash(_('Application has not yet started.'))
             self.redirect(self.url(self.context))
             return
         # ... or ended
         if not self.context.enddate or self.context.enddate < date.today():
-            self.flash('Application has ended.')
+            self.flash(_('Application has ended.'))
             self.redirect(self.url(self.context))
             return
@@ -901,5 +913,5 @@
         return
 
-    @action('Get login credentials', style='primary')
+    @action(_('Get login credentials'), style='primary')
     def register(self, **data):
         if not self.captcha_result.is_valid:
@@ -916,5 +928,5 @@
         # Send email with credentials
         login_url = self.url(grok.getSite(), 'login')
-        msg = 'You have successfully been registered for the'
+        msg = _('You have successfully been registered for the')
         if sirp_utils.sendCredentials(IUserAccount(applicant),
             password, login_url, msg):
@@ -923,5 +935,5 @@
             return
         else:
-            self.flash('Email could not been sent. Please retry later.')
+            self.flash(_('Email could not been sent. Please retry later.'))
         return
 
@@ -932,5 +944,5 @@
     grok.require('waeup.Public')
     grok.template('applicantregemailsent')
-    label = 'Your registration was successful'
+    label = _('Your registration was successful.')
 
     def update(self, email=None):
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantdisplaypage.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantdisplaypage.pt	(revision 7710)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantdisplaypage.pt	(revision 7714)
@@ -41,8 +41,8 @@
   </tbody>
 </table>
-<h3 i18n:translate="">
+<h3  i18n:domain="waeup.sirp" i18n:translate="">
     Acceptance Fee Payment Tickets
 </h3>
-<table>
+<table i18n:domain="waeup.sirp">
   <thead>
     <tr>
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/pdf.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/pdf.py	(revision 7710)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/pdf.py	(revision 7714)
@@ -21,4 +21,6 @@
 import grok
 from datetime import datetime
+from zope.component import getUtility
+from zope.i18n import translate
 from reportlab.pdfgen import canvas
 from reportlab.lib.units import cm
@@ -32,5 +34,6 @@
 from waeup.sirp.applicants.interfaces import IApplicant
 from waeup.sirp.browser import DEFAULT_PASSPORT_IMAGE_PATH
-from waeup.sirp.interfaces import IExtFileStore, IPDF
+from waeup.sirp.interfaces import IExtFileStore, IPDF, ISIRPUtils
+from waeup.sirp.interfaces import MessageFactory as _
 
 SLIP_STYLE = TableStyle(
@@ -51,6 +54,9 @@
     def title(self):
         container_title = self.context.__parent__.title
-        return '%s Application Record %s' % (
-            container_title, self.context.application_number)
+        portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
+        ar_translation = translate(_('Application Record'),
+            'waeup.sirp', target_language=portal_language)
+        return '%s - %s %s' % (container_title,
+            ar_translation, self.context.application_number)
 
     def _setUpWidgets(self):
@@ -101,5 +107,8 @@
         if dept is None:
             return data
-        f_label = '<font size=12>Department:</font>'
+        portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
+        dp_translation = translate(_('Department:'),
+            'waeup.sirp', target_language=portal_language)
+        f_label = '<font size=12>%s</font>' % dp_translation
         f_text = '<font size=12>%s</font>' % dept.longtitle()
         f_label = Paragraph(f_label, style["Normal"])
@@ -110,5 +119,7 @@
         if faculty is None:
             return data
-        f_label = '<font size=12>Faculty:</font>'
+        fc_translation = translate(_('Faculty:'),
+            'waeup.sirp', target_language=portal_language)
+        f_label = '<font size=12>%s</font>' % fc_translation
         f_text = '<font size=12>%s</font>' % faculty.longtitle()
         f_label = Paragraph(f_label, style["Normal"])
@@ -133,5 +144,5 @@
         if view is not None:
             pdf.setAuthor('%s (%s)' % (view.request.principal.title,
-                                      view.request.principal.id))
+                view.request.principal.id))
         pdf.setCreator('SIRP')
         width, height = A4
@@ -160,11 +171,16 @@
         # Render widget fields
         widgets = self._setUpWidgets()
+        portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
         for widget in widgets: # self.widgets:
-            f_label = '<font size=12>%s</font>:' % widget.label.strip()
+            f_label = '<font size=12>%s</font>:' % translate(
+                widget.label.strip(), 'waeup.sirp',
+                target_language=portal_language)
             f_label = Paragraph(f_label, style["Normal"])
             f_text = '<font size=12>%s</font>' % widget()
             f_text = Paragraph(f_text, style["Normal"])
             data.append([f_label,f_text])
-        f_label = '<font size=12>Admitted Course of Study:</font>'
+        adm_translation = translate(_('Admitted Course of Study:'),
+                'waeup.sirp', target_language=portal_language)
+        f_label = '<font size=12>%s</font>' % adm_translation
         f_text = '<font size=12>%s</font>' % (
             self._getCourseAdmittedLink(view),)
@@ -182,11 +198,11 @@
         # Add some comments
         if self.context.state == 'created':
-            comment1 = (
+            comment1 = _(
                 '<font size=10>Proceed to the login page of the portal' +
                 ' and enter your new credentials:' +
-                ' user name= %s, password = %s.</font>' %
-                (self.context.student_id, self.context.application_number)
+                ' user name= ${a}, password = ${b}.</font>', mapping = {
+                'a':self.context.student_id, 'b':self.context.application_number}
                 )
-            comment2 = (
+            comment2 = _(
                 '<font size=10>Change your password when you have ' +
                 ' logged in.</font>'
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/viewlets.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/viewlets.py	(revision 7710)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/viewlets.py	(revision 7714)
@@ -71,5 +71,5 @@
     grok.require('waeup.viewMyApplicationDataTab')
     pnav = 3
-    tab_title = u'My Data'
+    tab_title = _(u'My Data')
 
     @property
@@ -86,5 +86,5 @@
     grok.view(ApplicantsRootPage)
     grok.require('waeup.manageApplication')
-    text = 'Manage application section'
+    text = _('Manage application section')
 
 class ApplicantsContainerManageActionButton(ManageActionButton):
@@ -93,5 +93,5 @@
     grok.view(ApplicantsContainerPage)
     grok.require('waeup.manageApplication')
-    text = 'Manage applicants container'
+    text = _('Manage applicants container')
 
 class ApplicantRegisterActionButton(ManageActionButton):
@@ -101,5 +101,5 @@
     grok.require('waeup.Anonymous')
     icon = 'actionicon_login.png'
-    text = 'Register for application'
+    text = _('Register for application')
     target = 'register'
 
@@ -109,5 +109,5 @@
     grok.require('waeup.viewApplication')
     icon = 'actionicon_view.png'
-    text = 'View application record'
+    text = _('View application record')
     target = 'index'
 
@@ -117,5 +117,5 @@
     grok.view(ApplicantDisplayFormPage)
     grok.require('waeup.manageApplication')
-    text = 'Manage application record'
+    text = _('Manage application record')
     target = 'manage'
 
@@ -125,5 +125,5 @@
     grok.view(ApplicantDisplayFormPage)
     grok.require('waeup.handleApplication')
-    text = 'Edit application record'
+    text = _('Edit application record')
     target ='edit'
 
@@ -141,5 +141,5 @@
     grok.require('waeup.viewApplication')
     icon = 'actionicon_pdf.png'
-    text = 'Download application slip'
+    text = _('Download application slip')
     target = 'application_slip.pdf'
 
@@ -149,5 +149,5 @@
     grok.require('waeup.manageApplication')
     icon = 'actionicon_entrance.png'
-    text = 'Create student record'
+    text = _('Create student record')
     target ='createstudent'
 
@@ -166,5 +166,5 @@
     grok.require('waeup.viewApplication')
     icon = 'actionicon_pdf.png'
-    text = 'Download payment receipt'
+    text = _('Download payment receipt')
     target = 'payment_receipt.pdf'
 
@@ -181,5 +181,5 @@
     grok.require('waeup.payApplicant')
     icon = 'actionicon_call.png'
-    text = 'Request callback'
+    text = _('Request callback')
     target = 'callback'
 
