def default_category(data): DONATION_DEFAULT = [ {"value": "MostNeeded", "label": _(u"Where it's most needed")}, {"value": "Assembly", "label": _(u"WCC 10th Assembly")}, {"value": "EcumenicalWaterNetwork", "label": _(u"Ecumenical Water Network")}, {"value": "EAPPI", "label": _(u"Accompaniers in Palestine and Israel(EAPPI)")}, {"value": "Study", "label": _(u"Ecumenical study and research - Bossey")}, {"value": "Church", "label": _(u"Church relationships and Christian witness")}, {"value": "Interreligious", "label": _(u"Inter-religious dialogue")}, {"value": "Peace", "label": _(u"Peace and reconciliation")}, {"value": "Development", "label": _(u"Development and justice")}, {"value": "HIV", "label": _(u"HIV/AIDS initiative in Africa")},] for i in DONATION_DEFAULT: i.update(label=translate(i['label'], target_language=data.context.Language())) return DONATION_DEFAULT
from collective.grok import gs from wcc.donation import MessageFactory as _ @gs.importstep( name=u'wcc.donation', title=_('wcc.donation import handler'), description=_('')) def setupVarious(context): if context.readDataFile('wcc.donation.marker.txt') is None: return portal = context.getSite() # do anything here
def title(self): return _("WCC Donation Link Portlet")