Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Products/Poi/browser/response.pt
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
tal:content="python:here.toLocalizedTime(response.date, long_format=True)" />
<div class="metadataChanges">
<tal:rep repeat="delta response/changes">
<span i18n:translate="" tal:content="string:${delta/name}" />:
<span i18n:domain="Poi" i18n:translate="" tal:content="string:${delta/name}" />:
<span class="issueChange"
i18n:translate=""
i18n:domain="plone"
i18n:domain="Poi"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this isn't in the plone translation domain?
I am not sure, just asking.

tal:content="delta/before" />
&#8594;
<span class="issueChange"
i18n:translate=""
i18n:domain="plone"
i18n:domain="Poi"
tal:content="delta/after" />
<br tal:condition="not:repeat/delta/end" />
</tal:rep>
Expand Down Expand Up @@ -257,7 +257,7 @@
</div>

<select name="current_assignee">
<option value="">
<option value="" i18n:translate="Poi_label_noneResponsibleManager">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the label 'no change' have to do with a 'none responsible manager?'

No change
</option>
<tal:assignees repeat="option view/assignees_for_display">
Expand Down
4 changes: 3 additions & 1 deletion Products/Poi/browser/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,10 @@ def transitions_for_display(self):
transitions.append(dict(value='', label=PMF(u'No change'),
checked="checked"))
for tdef in wftool.getTransitionsFor(context):
label_value = tdef['title_or_id']
label_value = PMF(label_value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using PMF here, which is for the plone domain.
But in the workflow xml files you are setting the Poi domain.
So here it should be _(label_value) I think.

transitions.append(dict(value=tdef['id'],
label=tdef['title_or_id'], checked=''))
label=label_value, checked=''))
return transitions

@property
Expand Down
6 changes: 3 additions & 3 deletions Products/Poi/browser/templates/poi_issue_search_form.pt
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
name="exacttext"
checked="checked"
tal:attributes="value request/form/exacttext|nothing" />
<label for="exacttext">
Exact Text Search
<span class="discreet">Unchecking may result in slower search performance</span>
<label for="exacttext" i18n:translate="poi_searchmatch_label_text">
Exact Text Search</label>
<span class="discreet" i18n:translate="poi_searchmatch_help_text">Unchecking may result in slower search performance</span>
</div>

</div>
Expand Down
5 changes: 0 additions & 5 deletions Products/Poi/content/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ def checkEmpty(value):
return True if value is False else False


@provider(schema.interfaces.IContextAwareDefaultFactory)
def getContactEmail(context):
return api.user.get_current().getProperty('email') or ""


class IIssue(model.Schema):
"""Marker interface for Poi issue"""
Expand Down Expand Up @@ -157,7 +153,6 @@ class IIssue(model.Schema):
u"resolution is available. Note that your email "
u"address will not be displayed to others."),
required=False,
defaultFactory=getContactEmail,
)

read_permission(watchers='Poi.ModifyIssueWatchers')
Expand Down
44 changes: 21 additions & 23 deletions Products/Poi/content/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,32 @@
__docformat__ = 'plaintext'


from collections import Counter
from time import time
from zope.component import adapts
from zope.component import provideAdapter
from zope.interface import implementer
from zope import schema
from zope.interface import Interface
from zope.interface import Invalid
from zope.interface import directlyProvides
from zope.interface import provider
from zope.schema.interfaces import IContextAwareDefaultFactory
from zope.schema.interfaces import IContextSourceBinder
from zope.schema.vocabulary import SimpleTerm
from zope.schema.vocabulary import SimpleVocabulary

from borg.localrole.interfaces import ILocalRoleProvider

from collections import Counter
from Products.Poi import PoiMessageFactory as _
from collective.z3cform.datagridfield import DataGridFieldFactory, DictRow
from plone import api
from Products.Poi.utils import is_email
from Products.Poi.utils import link_bugs
from Products.Poi.utils import link_repo
from plone.app.textfield import RichText
from plone.app.z3cform.widget import AjaxSelectFieldWidget
from plone.autoform.directives import widget
from plone.autoform.directives import write_permission, read_permission
from plone.autoform.directives import read_permission, widget, write_permission
from plone.dexterity.content import Container
from plone.memoize import ram
from plone.protect.utils import addTokenToUrl
from plone.supermodel import model
from plone.z3cform.textlines import TextLinesFieldWidget
from collective.z3cform.datagridfield import DataGridFieldFactory, DictRow
from Products.Poi import PoiMessageFactory as _
from Products.Poi.utils import is_email, link_bugs, link_repo
from z3c.form import validator
from zope import schema
from zope.component import adapts, provideAdapter
from zope.i18n import translate
from zope.interface import (Interface, Invalid, directlyProvides, implementer,
provider)
from zope.schema.interfaces import (IContextAwareDefaultFactory,
IContextSourceBinder)
from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
from zope.globalrequest import getRequest


DEFAULT_SEVERITIES = [
Expand Down Expand Up @@ -111,8 +104,11 @@ def default_severity(context):
if hasattr(context, 'default_severity'):
tracker = context
return tracker.default_severity
return DEFAULT_SEVERITIES[0]


tracker_brain = api.content.find(UID=context._tracker_uid)[0]
tracker = tracker_brain.getObject()
return tracker.default_severity


def possibleSeverities(context):
"""
Expand All @@ -126,6 +122,7 @@ def possibleSeverities(context):
tracker = context.context.getTracker()
else:
return SimpleVocabulary.fromValues(DEFAULT_SEVERITIES)

return SimpleVocabulary.fromValues(tracker.available_severities)


Expand Down Expand Up @@ -263,6 +260,7 @@ class ITracker(model.Schema):
title=_(u'Poi_label_availableSeverities',
default=u"Available severities"),
default=DEFAULT_SEVERITIES,

description=_(
u'Poi_help_availableSeverities',
default=(u"Enter the different type of issue severities "
Expand Down
Loading