Changeset 7695


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
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.custom/trunk/buildout.cfg

    r7587 r7695  
    5454zope.xmlpickle = 3.4.0
    5555# Require latest version...
    56 Sphinx =
     56Sphinx = 1.0.7
    5757ZODB3 = 3.10.3
    5858docutils = 0.7
     
    6262# This creates all scripts in bin/. The sirpctl created here is 'faulty'.
    6363recipe = zc.recipe.egg
    64 eggs = waeup.custom
     64eggs = waeup.custom [beaker]
    6565       z3c.evalexception>=2.0
    6666       Paste
     
    7474# fixed path to zdaemon.conf as argument.
    7575recipe = zc.recipe.egg
    76 eggs = waeup.custom
     76eggs = waeup.custom [beaker]
    7777arguments = "${buildout:parts-directory}/etc/zdaemon.conf"
    7878scripts = sirpctl=sirpctl
     
    8989[test]
    9090recipe = zc.recipe.testrunner
    91 eggs = waeup.custom [test]
     91eggs = waeup.custom [beaker, test]
    9292defaults = ['--tests-pattern', '^f?tests$', '-v']
    9393
    94 # this section named so that the i18n scripts are called bin/i18n...
     94# This section named so that the i18n scripts are called bin/i18n...
    9595[i18n]
    9696recipe = z3c.recipe.i18n:i18n
     
    164164[coverage-detect]
    165165recipe = zc.recipe.testrunner
    166 eggs = waeup.custom
     166eggs = waeup.custom[beaker]
    167167defaults = ['--tests-pattern', '^f?tests$', '-v', '--coverage', 'coverage']
    168168
  • main/waeup.custom/trunk/setup.py

    r6885 r7695  
    1111    'waeup.sirp',
    1212    ],
     13
     14# Having beaker installed additionally is a feature very recommended
     15# for production use. The default buildout includes beaker for tests,
     16# start scripts, and other parts that can benefit from it. The windows
     17# buildout does not include it due to compiling problems with the
     18# beaker package.
     19beaker_require = [
     20    'dolmen.beaker',
     21    ]
    1322
    1423tests_require = [
     
    7584        test = tests_require,
    7685        docs = docs_require,
     86        beaker = beaker_require,
    7787        ),
    7888      entry_points="""
  • 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.