Skip to content

Commit

Permalink
language translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
Shriyanshagro committed May 29, 2018
1 parent 8b7a058 commit 9f85c26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/collective/ifttt/browser/controlpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,27 @@
from collective.ifttt import _
from plone.app.registry.browser.controlpanel import ControlPanelFormWrapper
from plone.app.registry.browser.controlpanel import RegistryEditForm
from plone.autoform import directives
from plone.z3cform import layout
from zope import schema
from zope.interface import Interface


class IIftttControlPanel(Interface):

# A field in 'hidden' mode

directives.mode(secret='hidden')
ifttt_secret_key = schema.TextLine(
title=_(u'Secret Key'),
description=_(u'Register Ifttt"s secret key'),
required=False,
)


class IftttControlPanelForm(RegistryEditForm):
schema = IIftttControlPanel
schema_prefix = 'ifttt'
label = u'Ifttt Settings'
label = _(u'Ifttt Settings')


IftttControlPanelView = layout.wrap_form(
Expand Down
6 changes: 4 additions & 2 deletions src/collective/ifttt/profiles/default/controlpanel.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<object name="portal_controlpanel">
<object name="portal_controlpanel" meta_type="IFTTT Control Panel Tool"
i18n:domain="plone" xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<configlet
title="Ifttt Settings"
action_id="collectiveifttt-controlpanel"
Expand All @@ -8,7 +9,8 @@
condition_expr=""
icon_expr=""
url_expr="string:${portal_url}/@@collectiveifttt-controlpanel"
visible="True">
visible="True"
i18n:translate="title">
<permission>Manage portal</permission>
</configlet>
</object>

0 comments on commit 9f85c26

Please sign in to comment.