From fa5183075fe34e08927ceab2c87ad565213bca57 Mon Sep 17 00:00:00 2001 From: steckerhalter Date: Fri, 25 Oct 2013 15:30:02 +0200 Subject: [PATCH] org translation --- ckanext/fso/harvesters/fsoharvester.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ckanext/fso/harvesters/fsoharvester.py b/ckanext/fso/harvesters/fsoharvester.py index 637f117..852294c 100644 --- a/ckanext/fso/harvesters/fsoharvester.py +++ b/ckanext/fso/harvesters/fsoharvester.py @@ -189,6 +189,15 @@ def _generate_term_translations(self, base_dataset, package): 'term_translation': group }) + for lang, org in self.ORGANIZATION.items(): + if lang != 'de': + for field in ['name', 'description']: + translations.append({ + 'lang_code': lang, + 'term': self.ORGANIZATION['de'][field], + 'term_translation': org[field] + }) + for dataset in package: if base_dataset.get('datasetID') != dataset.get('datasetID'): lang = dataset.get('{http://www.w3.org/XML/1998/namespace}lang')