Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.py	(revision 7689)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.py	(revision 7719)
@@ -27,5 +27,5 @@
     AdminTask, AddActionButton, SearchActionButton, BatchOpButton, ManageLink)
 from waeup.sirp.interfaces import ISIRPObject
-
+from waeup.sirp.interfaces import MessageFactory as _
 from waeup.sirp.accesscodes.interfaces import (
     IAccessCodeBatchContainer, IAccessCodeBatch,
@@ -41,6 +41,8 @@
     grok.template('batchcontainer')
     grok.require('waeup.manageACBatches')
-
-    label = 'Access Code Batches'
+    archive_button = _('Archive')
+    delete_button = _('Archive and delete')
+
+    label = _('Access Code Batches')
     pnav = 0
 
@@ -49,5 +51,5 @@
             return
         if not batches:
-            self.flash('No batch selected.')
+            self.flash(_('No batch selected.'))
             return
         if isinstance(batches, basestring):
@@ -56,9 +58,10 @@
             batch = self.context[name]
             csv_file = batch.archive()
-            self.flash('Archived %s (%s)' % (name, csv_file))
+            self.flash(_('Archived ${a} (${b})',
+                mapping = {'a':name, 'b':csv_file}))
             if delete is None:
                 continue
             del self.context[name]
-            self.flash('Deleted batch %s' % name)
+            self.flash(_('Deleted batch ${a}', mapping = {'a':name}))
 
 class AddBatchPage(SIRPAddFormPage):
@@ -67,5 +70,5 @@
     grok.require('waeup.manageACBatches')
 
-    label = 'Create Access Code Batch'
+    label = _('Create Access Code Batch')
     pnav = 0
 
@@ -73,5 +76,5 @@
         'prefix', 'entry_num', 'cost')
 
-    @action('Create batch', style='primary')
+    @action(_('Create batch'), style='primary')
     def createBatch(self, **data):
         creator = self.request.principal.id
@@ -85,7 +88,7 @@
         self.redirect(self.url(self.context))
 
-    @action('Cancel', validator=NullValidator)
+    @action(_('Cancel'), validator=NullValidator)
     def cancel(self, *args, **kw):
-        self.flash('Batch creation cancelled.')
+        self.flash(_('Batch creation cancelled.'))
         self.redirect(self.url(self.context))
 
@@ -97,11 +100,13 @@
     grok.template('reimportbatchpage')
     grok.require('waeup.manageACBatches')
-
-    label = 'Reimport Access Code Batches'
+    reimport_button = _('Reimport')
+    cancel_button = _('Cancel')
+
+    label = _('Reimport Access Code Batches')
     pnav = 0
 
     def update(self, filenames=None, reimport=None, cancel=None):
         if cancel is not None:
-            self.flash('Reimport cancelled.')
+            self.flash(_('Reimport cancelled.'))
             self.redirect(self.url(self.context))
             return
@@ -109,5 +114,5 @@
             return
         if not filenames:
-            self.flash('No file chosen. Action cancelled.')
+            self.flash(_('No file chosen. Action cancelled.'))
             self.redirect(self.url(self.context))
             return
@@ -119,7 +124,9 @@
                 self.context.reimport(filename, userid)
             except KeyError:
-                self.flash('This batch already exists: %s' % filename)
+                self.flash(_('This batch already exists: ${a}',
+                    mapping = {'a':filename}))
                 continue
-            self.flash('Successfully reimported: %s' % filename)
+            self.flash(_('Successfully reimported: ${a}',
+                mapping = {'a':filename}))
         self.redirect(self.url(self.context))
 
@@ -130,5 +137,8 @@
     grok.require('waeup.manageACBatches')
     pnav = 0
-    label = 'Search and Manage Access Codes'
+    label = _('Search and Manage Access Codes')
+    search_button = _('Search')
+    disable_button = _('Disable ACs')
+    enable_button = _('Enable ACs')
 
     def update(self, *args, **kw):
@@ -154,16 +164,17 @@
             if 'disable' in form:
                 try:
-                    comment = u"AC disabled"
+                    comment = _(u"AC disabled")
                     self.context.disable(entry, comment)
-                    self.flash('%s disabled.' % entry)
+                    self.flash(_('${a} disabled.', mapping = {'a':entry}))
                 except InvalidTransitionError:
-                    self.flash('%s: Disable transition not allowed.' % entry)
+                    self.flash(_('${a}: Disable transition not allowed.',
+                        mapping = {'a':entry}))
             elif 'enable' in form:
                 try:
-                    comment = u"AC re-enabled"
+                    comment = _(u"AC re-enabled")
                     self.context.enable(entry, comment)
-                    self.flash('%s (re-)enabled.' % entry)
+                    self.flash(_('${a} (re-)enabled.', mapping = {'a':entry}))
                 except InvalidTransitionError:
-                    self.flash('%s: Re-enable transition not allowed.' % entry)
+                    self.flash(_('${a}: Re-enable transition not allowed.', mapping = {'a':entry}))
         self.hitlist = search(query=self.searchterm,
             searchtype=self.searchtype, view=self)
@@ -175,5 +186,5 @@
     grok.require('waeup.manageACBatches')
     grok.context(IAccessCodeBatchContainer)
-    title = u'Access Code Batches'
+    title = _(u'Access Code Batches')
     parent_viewname = 'administration'
 
@@ -195,5 +206,5 @@
     grok.template('admintaskacbatches')
 
-    link_title = 'Access Code Batches'
+    link_title = _('Access Code Batches')
     target_viewname = 'accesscodes'
 
@@ -204,5 +215,5 @@
     grok.view(BatchContainerPage)
     grok.require('waeup.manageACBatches')
-    text = 'Add Access Code Batch'
+    text = _('Add Access Code Batch')
 
 class ReimportBatchButton(BatchOpButton):
@@ -213,5 +224,5 @@
     grok.require('waeup.manageACBatches')
     target = 'reimport'
-    text = 'Reimport Access Code Batch'
+    text = _('Reimport Access Code Batch')
 
 class SearchAccessCodeButton(SearchActionButton):
@@ -221,5 +232,5 @@
     grok.view(BatchContainerPage)
     grok.require('waeup.manageACBatches')
-    text = 'Search Access Codes'
+    text = _('Search Access Codes')
 
 class ManageAccessCodes(ManageLink):
@@ -230,3 +241,3 @@
 
     link = u'accesscodes'
-    text = u'Access Codes'
+    text = _(u'Access Codes')
Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.txt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.txt	(revision 7689)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.txt	(revision 7719)
@@ -175,5 +175,5 @@
     >>> ctrl = browser.getControl(name='batches')
     >>> ctrl.getControl(value='BLA-1').selected = True
-    >>> browser.getControl('Archive and Delete').click()
+    >>> browser.getControl('Archive and delete').click()
     >>> print browser.contents
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -284,5 +284,5 @@
       <td>APP-1-...</td>
       <td>initialized</td>
-      <td>... - AC initialized by Manager</td>
+      <td>... - initialized by Manager</td>
     ...
 
@@ -303,9 +303,9 @@
       <td>APP-1-...</td>
       <td>initialized</td>
-      <td>... - AC initialized by Manager</td>
+      <td>... - initialized by Manager</td>
     ...
 
 And we can search for text in history messages of access
-codes. Looking for the string ``AC initialized`` we get nearly all
+codes. Looking for the string ``initialized`` we get nearly all
 entries:
 
@@ -313,5 +313,5 @@
     >>> ctrl = browser.getControl(name='searchtype')
     >>> ctrl.getControl(value='history').selected = True
-    >>> browser.getControl(name='searchterm').value = 'AC initialized'
+    >>> browser.getControl(name='searchterm').value = 'initialized'
     >>> browser.getControl('Search').click()
     >>> print browser.contents
@@ -322,5 +322,5 @@
       <td>APP-1-<10-DIGITS></td>
       <td>initialized</td>
-      <td>... - AC initialized by Manager</td>
+      <td>... - initialized by Manager</td>
     ...
 
@@ -334,5 +334,5 @@
     >>> ctrl = browser.getControl(name='searchtype')
     >>> ctrl.getControl(value='history').selected = True
-    >>> browser.getControl(name='searchterm').value = 'AC initialized'
+    >>> browser.getControl(name='searchterm').value = 'initialized'
     >>> browser.getControl('Search').click()
 
Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/admintaskacbatches.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/admintaskacbatches.pt	(revision 7689)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/admintaskacbatches.pt	(revision 7719)
@@ -2,4 +2,4 @@
 <a href=""
    tal:attributes="href viewlet/link_target"
-   tal:content="viewlet/link_title">Manage</a>
+   tal:content="viewlet/link_title">MANAGE</a>
 </p>
Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/batchcontainer.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/batchcontainer.pt	(revision 7689)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/batchcontainer.pt	(revision 7719)
@@ -1,13 +1,15 @@
-<form method="POST">
-  <p>
+<form i18n:domain="waeup.sirp" method="POST">
+  <p i18n:translate="">
     The following batches are available:
   </p>
-
   <table>
     <thead>
       <tr>
         <th>&nbsp;</th>
-  <th>Prefix</th><th>Entries/(invalidated)</th><th>Cost</th>
-  <th>Created</th><th>Creator</th>
+        <th i18n:translate="">Prefix</th>
+        <th i18n:translate="">Entries/(invalidated)</th>
+        <th i18n:translate="">Cost</th>
+        <th i18n:translate="">Date of Creation</th>
+        <th i18n:translate="">Creator</th>
       </tr>
     </thead>
@@ -32,12 +34,14 @@
       2011-11-22 18:04:55
   </td>
-  <td tal:content="batch/creator">some user</td>
+  <td tal:content="batch/creator">SOMEUSER</td>
       </tr>
       <tr tal:condition="not: context/values">
-  <td colspan="5"><b>No batches yet</b></td>
+      <td colspan="5"><b i18n:translate="">No batches yet</b></td>
       </tr>
     </tbody>
   </table>
-  <input type="submit" class="btn" name="archive" value="Archive" />
-  <input type="submit" class="btn" name="delete" value="Archive and Delete" />
+  <input type="submit" class="btn" name="archive"
+      tal:attributes="value view/archive_button" />
+  <input type="submit" class="btn" name="delete"
+       tal:attributes="value view/delete_button" />
 </form>
Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/reimportbatchpage.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/reimportbatchpage.pt	(revision 7689)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/reimportbatchpage.pt	(revision 7719)
@@ -1,5 +1,7 @@
-<p> Please select the files to reimport. Please note, that batches with  same name have to be deleted before.
+<p i18n:domain="waeup.sirp">
+Please select the files to reimport. Please note, that batches with
+same name have to be deleted before.
 </p>
-<form method="POST">
+<form method="POST" i18n:domain="waeup.sirp">
   <table>
     <thead>
@@ -7,19 +9,23 @@
         <th>&nbsp;
         </th>
-        <th>File
+        <th i18n:translate="">File
         </th>
       </tr>
     </thead>
     <tbody>
-      <tr tal:repeat="filename context/getImportFiles"  tal:attributes="class python: repeat['filename'].odd() and 'even' or 'odd'"> <td>
-          <input type="checkbox" name="filenames" value="filename"  tal:attributes="value filename" /> </td>
-        <td tal:content="filename">file.name</td>
+      <tr tal:repeat="filename context/getImportFiles"
+          tal:attributes="class python: repeat['filename'].odd() and 'even' or 'odd'"> <td>
+          <input type="checkbox" name="filenames" value="filename"
+              tal:attributes="value filename" /> </td>
+        <td tal:content="filename">FILENAME</td>
       </tr>
       <tr tal:condition="python: len(list(context.getImportFiles())) == 0">
-        <td colspan="5"><b>No import batches available</b></td>
+        <td colspan="5"><b i18n:translate="">No import batches available</b></td>
       </tr>
     </tbody>
   </table>
-  <input type="submit" class="btn primary" name="reimport" value="Reimport" />
-  <input type="submit" class="btn" name="cancel" value="Cancel" />
+  <input type="submit" class="btn primary" name="reimport"
+      tal:attributes="value view/reimport_button" />
+  <input type="submit" class="btn" name="cancel"
+      tal:attributes="value view/cancel_button" />
 </form>
Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/searchpage.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/searchpage.pt	(revision 7689)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser_templates/searchpage.pt	(revision 7719)
@@ -1,17 +1,13 @@
-<form method="POST">
-
+<form method="POST" i18n:domain="waeup.sirp">
 <br />
-
-  <input type="submit" class="btn primary" name="search" value="Search" />
-  for access codes
-
+  <input type="submit" class="btn primary" name="search"
+      tal:attributes="value view/search_button" />
+  <span i18n:translate="">for access codes</span>
   <select name="searchtype">
-    <option value="code">with PIN</option>
-    <option value="batch_serial">with serial</option>
-    <option value="history">with message term</option>
+    <option i18n:translate="" value="code">with PIN</option>
+    <option i18n:translate="" value="batch_serial">with serial</option>
+    <option i18n:translate="" value="history">with message term</option>
   </select>
-
   <input type="text" name="searchterm" />
-
   <p>&nbsp;</p>
   <div tal:condition="view/hitlist">
@@ -25,9 +21,9 @@
       <tr>
         <th>&nbsp;</th>
-        <th width="50px">Serial</th>
-        <th>AC</th>
-        <th>State</th>
-        <th>Owner</th>
-        <th>History</th>
+        <th width="50px" i18n:translate="">Serial</th>
+        <th i18n:translate="">AC</th>
+        <th i18n:translate="">State</th>
+        <th i18n:translate="">Owner</th>
+        <th i18n:translate="">History</th>
       </tr>
       </thead>
@@ -47,6 +43,8 @@
     </table>
     <div>
-      <input type="submit" class="btn" name="disable" value="Disable ACs" />
-      <input type="submit" class="btn" name="enable" value="Enable ACs" />
+      <input type="submit" class="btn" name="disable"
+          tal:attributes="value view/disable_button" />
+      <input type="submit" class="btn" name="enable"
+          tal:attributes="value view/enable_button" />
     </div>
 
Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/interfaces.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/interfaces.py	(revision 7689)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/interfaces.py	(revision 7719)
@@ -21,4 +21,5 @@
 from zope.interface import Interface
 from waeup.sirp.interfaces import ISIRPObject
+from waeup.sirp.interfaces import MessageFactory as _
 
 class IAccessCode(ISIRPObject):
@@ -26,30 +27,30 @@
     """
     batch_serial = schema.Int(
-        title = u'Serial number inside batch',
+        title = _(u'Serial number inside batch'),
         )
     batch_prefix = schema.TextLine(
-        title = u'Prefix inside batch',
+        title = _(u'Prefix inside batch'),
         )
     batch_num = schema.Int(
-        title = u'Batch number',
+        title = _(u'Batch number'),
         )
     random_num = schema.TextLine(
-        title = u'Random part of access code.',
+        title = _(u'Random part of access code.'),
         )
     cost = schema.Float(
-        title = u'Cost of access code',
+        title = _(u'Cost of access code'),
         default = 0.0, min = 0.0,
         )
     state = schema.TextLine(
-        title = u'Workflow state',
+        title = _(u'Workflow state'),
         )
     representation = schema.TextLine(
-        title = u'Complete title of access code',
+        title = _(u'Complete title of access code'),
         )
     owner = schema.TextLine(
-        title = u'Purchaser',
+        title = _(u'Purchaser'),
         )
     history = schema.Text(
-        title = u'The history of access code as lines',
+        title = _(u'The history of access code as lines'),
         default = u'',
         readonly = True,
@@ -60,31 +61,31 @@
     """
     creation_date = schema.Date(
-        title = u'Creation date',
+        title = _(u'Creation date'),
         )
     creator = schema.TextLine(
-        title = u'Batch creator',
+        title = _(u'Batch creator'),
         )
     prefix = schema.TextLine(
-        title = u'Batch prefix',
+        title = _(u'Batch prefix'),
         )
     num = schema.Int(
-        title = u'Batch number (1-3 digits)',
+        title = _(u'Batch number (1-3 digits)'),
         min = 0, max = 999,
         )
     entry_num = schema.Int(
-        title = u'Number of access codes',
+        title = _(u'Number of access codes'),
         default = 1000, min = 0,
         )
     cost = schema.Float(
-        title = u'Cost of access code',
+        title = _(u'Cost of access code'),
         default = 0.0, min = 0.0,
         )
     disabled_num = schema.Int(
-        title = u'Number of disabled access codes inside the batch',
+        title = _(u'Number of disabled access codes inside the batch'),
         default = 0,
         readonly = True,
         )
     used_num = schema.Int(
-        title = u'Number of used access codes inside the batch',
+        title = _(u'Number of used access codes inside the batch'),
         default = 0,
         readonly = True,
Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_accesscode.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_accesscode.py	(revision 7689)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_accesscode.py	(revision 7719)
@@ -188,5 +188,5 @@
         history = IObjectHistory(self.ac1)
         msgs = history.messages
-        assert msgs[-1].endswith('AC used by system')
+        assert msgs[-1].endswith('used by system')
 
 class AccessCodeTests(FunctionalTestCase):
@@ -232,5 +232,5 @@
         # Access codes have a history.
         match = re.match(
-            '^....-..-.. ..:..:.. - AC initialized by system',
+            '^....-..-.. ..:..:.. - initialized by system',
             self.ac1.history)
         assert match is not None
Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/workflow.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/workflow.py	(revision 7689)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/workflow.py	(revision 7719)
@@ -20,9 +20,11 @@
 """
 import grok
+from zope.i18n import translate
+from zope.component import getUtility
 from datetime import datetime
 from hurry.workflow.workflow import Transition, WorkflowState, NullCondition
 from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent
 from waeup.sirp.accesscodes.interfaces import IAccessCode
-from waeup.sirp.interfaces import IObjectHistory, ISIRPWorkflowInfo
+from waeup.sirp.interfaces import IObjectHistory, ISIRPWorkflowInfo, ISIRPUtils
 from waeup.sirp.interfaces import MessageFactory as _
 from waeup.sirp.workflow import SIRPWorkflow, SIRPWorkflowInfo
@@ -131,9 +133,9 @@
 def handle_accesscode_transition_event(obj, event):
     # append message to history
+    portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     if event.comment is not None:
-        msg = '%s' % event.comment
+        msg = event.comment
     else:
-        msg = 'AC %s' % event.destination
-
+        msg = ac_states_dict[event.destination]
     history = IObjectHistory(obj)
     history.addMessage(msg)
