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 6, 2016
1 parent cbb6938 commit 3b529a3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
13 changes: 11 additions & 2 deletions CHANGES.rst
Expand Up @@ -11,13 +11,22 @@ 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:

- 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]

- Vocabulary permissions are considered View permission by default, if not
stated different in PERMISSION global. Renamed _permissions to PERMISSIONS,
Deprecated BBB name in place. Also minor code-style changes
Expand Down
8 changes: 8 additions & 0 deletions plone/app/content/browser/vocabulary.py
Expand Up @@ -163,6 +163,7 @@ def __call__(self):
'effective',
'EffectiveDate',
'end',
'exclude_from_nav',
'ExpirationDate',
'expires',
'getIcon',
Expand All @@ -172,14 +173,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 3b529a3

Please sign in to comment.