diff --git a/server/features/events_post.feature b/server/features/events_post.feature index e7f2a48b8..beb66fd01 100644 --- a/server/features/events_post.feature +++ b/server/features/events_post.feature @@ -1193,22 +1193,28 @@ Feature: Events Post [{ "_id": "event", "name": "event", - "editor": { - "related_plannings": {"enabled": true} - }, + "editor": {"related_plannings": {"enabled": true}, "language": {"enabled": true}}, "schema": { - "related_plannings": {"planning_auto_publish": true} + "related_plannings": {"planning_auto_publish": true}, + "language": { + "languages": ["nl", "fr"], + "multilingual": true, + "default_language": "nl" + } } }, { "_id": "planning", "name": "planning", - "editor": { - "slugline": {"enabled": true} - }, + "editor": {"slugline": {"enabled": true}, "language": {"enabled": true}}, "schema": { - "slugline": {"required": true} - } + "slugline": {"required": true}, + "language": { + "languages": ["nl", "fr"], + "multilingual": true, + "default_language": "nl" + } + } } ] """ diff --git a/server/planning/validate/planning_validate.py b/server/planning/validate/planning_validate.py index 5f57aa1ea..bb536b717 100644 --- a/server/planning/validate/planning_validate.py +++ b/server/planning/validate/planning_validate.py @@ -84,6 +84,24 @@ def _validate_planning_auto_publish(self, planning_auto_publish, field, value): """ pass + def _validate_default_language(self, default_language, field, value): + """ + {'type': string, 'nullable': True} + """ + pass + + def _validate_languages(self, languages, field, value): + """ + {'type': 'list', 'nullable': True} + """ + pass + + def _validate_multilingual(self, multilingual, field, value): + """ + {'type': 'boolean', 'nullable': True} + """ + pass + class PlanningValidateResource(Resource): endpoint_name = "planning_validator"