Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request #4 from ogdch/org-translation
Browse files Browse the repository at this point in the history
Add translation for organization added by ckanext-fso
  • Loading branch information
metaodi committed Oct 25, 2013
2 parents c0996d0 + fa51830 commit 92c08c2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ckanext/fso/harvesters/fsoharvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 92c08c2

Please # to comment.