Ignore:
Timestamp:
28 Feb 2012, 19:34:51 (13 years ago)
Author:
Henrik Bettermann
Message:

Internationalize hostels package.

Remove exception catcher in switchReservations and corresponding test.

When testing the hostel configuration manually I found out that the beds_reserved list attribute of halls
only changed during the lifetime of a running instance. After restarting the portal all changes were gone.
Also "hostel._p_changed = True" didn't help. The only solution was to reassign the attribute to ensure persistance.

Unfortunately, the current tests don't catch such a malfunction. This has to be improved.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/hostels/browser_templates
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/hostels/browser_templates/containermanagepage.pt

    r7464 r7718  
    1 <form action="." tal:attributes="action request/URL" method="POST" enctype="multipart/form-data">
     1<form action="." tal:attributes="action request/URL"
     2    i18n:domain="waeup.sirp"
     3    method="POST" enctype="multipart/form-data">
    24  <table>
    35    <thead>
     
    57        <th>&nbsp;
    68        </th>
    7         <th>Id
     9        <th i18n:translate="">Id
    810        </th>
    9         <th>Name
     11        <th i18n:translate="">Name
    1012        </th>
    1113      </tr>
  • main/waeup.sirp/trunk/src/waeup/sirp/hostels/browser_templates/containerpage.pt

    r7464 r7718  
    1 <div tal:condition="python: not len(context.keys())">
     1<div i18n:domain="waeup.sirp"
     2   i18n:translate="" tal:condition="python: not len(context.keys())">
    23There no subobjects registered yet.
    34</div>
    45
    5 <table>
     6<table i18n:domain="waeup.sirp">
    67  <thead>
    78    <tr>
    8       <th>Id</th>
    9       <th>Name</th>
     9      <th i18n:translate="">Id</th>
     10      <th i18n:translate="">Name</th>
    1011    </tr>
    1112  </thead>
     
    1314    <tr tal:repeat="value context/values">
    1415      <td> <a tal:attributes="href value/__name__">
    15           <span tal:content="value/hostel_id">Id</span></a></td>
    16       <td tal:content="value/hostel_name">Name</td>
     16          <span tal:content="value/hostel_id">ID</span></a></td>
     17      <td tal:content="value/hostel_name">NAME</td>
    1718    </tr>
    1819  </tbody>
  • main/waeup.sirp/trunk/src/waeup/sirp/hostels/browser_templates/hostelmanagepage.pt

    r7669 r7718  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       enctype="multipart/form-data">
     2      i18n:domain="waeup.sirp" enctype="multipart/form-data">
    33
    44  <ul class="tabs" data-tabs="tabs">
    5     <li tal:attributes="class view/tab1"><a href="#tab-1"><span>Hostel Data</span></a></li>
    6     <li tal:attributes="class view/tab2"><a href="#tab-2"><span>Beds</span></a></li>
     5    <li tal:attributes="class view/tab1"><a href="#tab-1">
     6      <span i18n:translate="">Hostel Data</span></a>
     7    </li>
     8    <li tal:attributes="class view/tab2"><a href="#tab-2">
     9      <span i18n:translate="">Beds</span></a>
     10    </li>
    711  </ul>
    812
     
    1519          <td class="fieldname">
    1620            <span class="required" tal:condition="widget/required">*</span>
    17             <span tal:content="widget/label">label</span>:
     21            <span tal:content="widget/label">LABEL</span>:
    1822          </td>
    1923          <td>
     
    2226            </span>
    2327            <tal:error tal:condition="widget/error">
    24               <span tal:replace="structure widget/error">error</span>
     28              <span tal:replace="structure widget/error">ERROR</span>
    2529            </tal:error>
    2630            <tal:hint tal:condition="widget/hint">
    27               <span tal:content="structure widget/hint">hint</span>
     31              <span tal:content="structure widget/hint">HINT</span>
    2832            </tal:hint>
    2933          </td>
     
    4751        <tr>
    4852          <th>&nbsp;</th>
    49           <th>Id</th>
    50           <th>Type</th>
    51           <th>Number</th>
    52           <th>Owner</th>
     53          <th i18n:translate="">Id</th>
     54          <th i18n:translate="">Type</th>
     55          <th i18n:translate="">Number</th>
     56          <th i18n:translate="">Owner</th>
    5357        </tr>
    5458      </thead>
     
    5963                  tal:attributes="value value/__name__" />
    6064          </td>
    61           <td tal:content="value/bed_id">Id</td>
    62           <td tal:content="value/bed_type">Type</td>
    63           <td tal:content="value/bed_number">Number</td>
     65          <td tal:content="value/bed_id">ID</td>
     66          <td tal:content="value/bed_type">TYPE</td>
     67          <td tal:content="value/bed_number">NUMBER</td>
    6468          <td>
    6569            <a tal:condition="python: value.owner != view.not_occupied"
    6670               tal:attributes="href python: '%s/%s/accommodation' %
    6771                    (view.students_url,value.owner)">
    68               <span tal:content="value/owner">Owner</span>
     72              <span tal:content="value/owner">OWNER</span>
    6973            </a>
    7074            <a tal:condition="python: value.owner == view.not_occupied"
    71                tal:attributes="href python: view.url(value)">
     75               tal:attributes="href python: view.url(value)"
     76               i18n:translate="">
    7277            [allocate student]
    7378            </a>
Note: See TracChangeset for help on using the changeset viewer.