Ignore:
Timestamp:
23 Feb 2012, 17:48:43 (13 years ago)
Author:
Henrik Bettermann
Message:

Upgrade custom package and add internationalization.

I also added dolmen.beaker but I'm not sure if I did it right.

Location:
main/waeup.custom/trunk/src/waeup/custom
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.custom/trunk/src/waeup/custom/browser/theming.py

    r7419 r7695  
    2020from waeup.custom.browser.resources import custom_theme_1
    2121
     22from waeup.custom.interfaces import MessageFactory as _
     23
    2224class CustomTheme1(grok.GlobalUtility):
    2325    """A custom theme based on the SIRP base theme.
     
    2628    grok.name('custom theme 1')
    2729
    28     description = u'Custom Theme 1'
     30    description = _(u'Custom Theme 1')
    2931
    3032    def getResources(self):
  • main/waeup.custom/trunk/src/waeup/custom/configure.zcml

    r6892 r7695  
    11<configure xmlns="http://namespaces.zope.org/zope"
    2            xmlns:grok="http://namespaces.zope.org/grok">
     2           xmlns:grok="http://namespaces.zope.org/grok"
     3           xmlns:i18n="http://namespaces.zope.org/i18n">
    34  <include package="grok" />
     5  <i18n:registerTranslations directory="locales" />
    46  <includeOverrides package="waeup.custom" file="overrides.zcml" />
    57</configure>
  • main/waeup.custom/trunk/src/waeup/custom/interfaces.py

    r7505 r7695  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
     18
     19import zope.i18nmessageid
    1820from zope import schema
    1921from waeup.sirp.interfaces import (
    2022    ISessionConfiguration, academic_sessions_vocab)
     23
     24_ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.custom')
    2125
    2226# It's recommended to replicate all fields from the base package here.
     
    2630
    2731    school_fee_base = schema.Int(
    28         title = u'School Fee (ignored)',
     32        title = _(u'School Fee (ignored)'),
    2933        default = 0,
    3034        )
    3135
    3236    surcharge_1 = schema.Int(
    33         title = u'Surcharge BT',
     37        title = _(u'Surcharge BT'),
    3438        default = 0,
    3539        )
    3640
    3741    surcharge_2 = schema.Int(
    38         title = u'Surcharge Interswitch',
     42        title = _(u'Surcharge Interswitch'),
    3943        default = 0,
    4044        )
    4145
    4246    surcharge_3 = schema.Int(
    43         title = u'Surcharge 3',
     47        title = _(u'Surcharge 3'),
    4448        default = 0,
    4549        )
    4650
    4751    clearance = schema.Int(
    48         title = u'Clearance Fee',
     52        title = _(u'Clearance Fee'),
    4953        default = 0,
    5054        )
    5155
    5256    booking_fee = schema.Int(
    53         title = u'Booking Fee',
     57        title = _(u'Booking Fee'),
    5458        default = 0,
    5559        )
    5660
    5761    maint_fee = schema.Int(
    58         title = u'Maintenance Fee',
     62        title = _(u'Maintenance Fee'),
    5963        default = 0,
    6064        )
    6165
    6266    gown = schema.Int(
    63         title = u'Gown Fee',
     67        title = _(u'Gown Fee'),
    6468        default = 0,
    6569        )
    6670
    6771    transfer = schema.Int(
    68         title = u'Transfer Fee',
     72        title = _(u'Transfer Fee'),
    6973        default = 0,
    7074        )
     
    8084
    8185    academic_session = schema.Choice(
    82         title = u'Academic Session',
     86        title = _(u'Academic Session'),
    8387        source = academic_sessions_vocab,
    8488        default = None,
  • main/waeup.custom/trunk/src/waeup/custom/utils/utils.py

    r7586 r7695  
    2525    """A collection of methods subject to customization.
    2626    """
     27    PORTAL_LANGUAGE = 'en'
Note: See TracChangeset for help on using the changeset viewer.