Skip to content

Commit

Permalink
Extend translation ignore list for metadata values in vocabulary
Browse files Browse the repository at this point in the history
Added most notably `portal_type`, `review_state` and `Subject` but also `exclude_from_nav`, `is_folderish`, `last_comment_date`, `meta_type` and `total_comments` to ``BaseVocabularyView`` ``translate_ignored`` list.
Some of them are necessary for frontend logic and others cannot be translated.
Fixes #77
  • Loading branch information
thet committed Apr 5, 2016
1 parent aab7f4c commit 1a45137
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
13 changes: 10 additions & 3 deletions CHANGES.rst
Expand Up @@ -11,14 +11,21 @@ Incompatibilities:
New:

- Add ``Creator``, ``Description``, ``end``, ``start`` and ``location`` to the available columns and context attributes for folder_contents.
[thet]

Show attributes from ``_unsafe_metadata`` if user has "Modify Portal Content" permissions.
Remove ``portal_type`` from available columns and use the translated ``Type`` instead.
``portal_type`` is now available on the attributes object.
[thet]

Fixes:

- *add item here*
- Remove ``portal_type`` from available columns and use ``Type`` instead, which is meant to be read by humans.
``portal_type`` is now available on the attributes object.
[thet]

- Added most notably `portal_type`, `review_state` and `Subject` but also `exclude_from_nav`, `is_folderish`, `last_comment_date`, `meta_type` and `total_comments` to ``BaseVocabularyView`` ``translate_ignored`` list.
Some of them are necessary for frontend logic and others cannot be translated.
Fixes https://github.com/plone/plone.app.content/issues/77
[thet]


3.0.20 (2016-02-27)
Expand Down
9 changes: 8 additions & 1 deletion plone/app/content/browser/vocabulary.py
Expand Up @@ -9,7 +9,6 @@
from plone.app.widgets.interfaces import IFieldPermissionChecker
from plone.autoform.interfaces import WRITE_PERMISSIONS_KEY
from plone.supermodel.utils import mergedTaggedValueDict
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone import PloneMessageFactory as _
from Products.CMFPlone.utils import safe_unicode
from Products.Five import BrowserView
Expand Down Expand Up @@ -159,6 +158,7 @@ def __call__(self):
'effective',
'EffectiveDate',
'end',
'exclude_from_nav',
'ExpirationDate',
'expires',
'getIcon',
Expand All @@ -168,14 +168,21 @@ def __call__(self):
'getURL',
'id',
'in_response_to',
'is_folderish',
'last_comment_date',
'listCreators',
'location',
'meta_type',
'ModificationDate',
'modified',
'path',
'portal_type',
'review_state',
'start',
'Subject',
'sync_uid',
'Title',
'total_comments'
'UID',
]
if attributes:
Expand Down

0 comments on commit 1a45137

Please sign in to comment.