From 2fb6713cba1ea0b793ce87d70363553d6e454ef7 Mon Sep 17 00:00:00 2001 From: Stefan Oderbolz Date: Thu, 20 Feb 2014 19:26:45 +0100 Subject: [PATCH] Use munge_tag() when inserting tags This is needed as all the tags are munged by default and the translations are added like that. If they are not being munged, they can't be translated --- ckanext/foph/harvesters/fophharvester.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ckanext/foph/harvesters/fophharvester.py b/ckanext/foph/harvesters/fophharvester.py index d3d7001..67bf0e4 100644 --- a/ckanext/foph/harvesters/fophharvester.py +++ b/ckanext/foph/harvesters/fophharvester.py @@ -319,8 +319,11 @@ def gather_stage(self, harvest_job): 'license_id': col[u'license_id'].lower(), 'version': col[u'version'], 'translations': [], - 'tags': col[u'tags'].split(u', ') + 'tags': [] } + tags = col[u'tags'].split(u', ') + tags = [munge_tag(tag) for tag in tags] + metadata['tags'] = tags metadata['resources'] = self._generate_resources_dict_array( col[u'id'])