Hi,
I did some i18n, pep8 and pyflakes cleanup on Products.PloneGlossary.
Translators are encouraged to check their translations on trunk:
https://svn.plone.org/svn/collective/Products.PloneGlossary/trunk
I have also made a branch and would like some feedback on whether this
can be merged back to trunk. I could mail the authors and maintainers,
but it looks like lots of people have contributed, so th
product-developrs list may be better.
This is the branch"
https://svn.plone.org/svn/collective/Products.PloneGlossary/branches/maurits-optional-highlight-per-object
I have just merged a few general (i18n) changes back to trunk. The
remaining interesting part is this:
http://dev.plone.org/changeset?reponame=collective&new=246479%40Products.PloneGlossary%2Fbranches%2Fmaurits-optional-highlight-per-object&old=246475%40Products.PloneGlossary%2Fbranches%2Fmaurits-optional-highlight-per-object
Okay, that long link is not likely to work. What it boils down to is an
extra check in highlightContent:
# Check for an adapter on the object and see if this wants
# highlighting.
from interfaces import IOptionalHighLight
optional = IOptionalHighLight(obj, None)
if optional is not None:
return optional.do_highlight(default=self.highlight_content)
By default this does nothing as no adapter is specified. But it gives
integrators a hook to influence whether a specific document gets
highlighted. I have created a package that uses this hook and
archetypes.schemaextender to look at an extra field 'highlight' on an
object. The value of that field can be yes, no, or look at the parent:
https://github.com/zestsoftware/zest.ploneglossaryhighlight
A client wanted this, mostly to switch of highlighting in a specific
part of the site where the main glossary does not apply and would be
confusing.
If this is not suited for PloneGlossary, I could add a patch to
zest.ploneglossaryhighlight instead.
I hope to hear from you.
--
Maurits van Rees http://maurits.vanrees.org/
Web App Programmer at Zest Software: http://zestsoftware.nl
"Logical thinking shows conclusively that logical thinking
is inconclusive." - My summary of Gödel, Escher, Bach
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers