Skip to content

Commit

Permalink
Merge pull request ckan#6660 from ckan/6649-dont-translate
Browse files Browse the repository at this point in the history
[ckan#6649] gettext not for metadata fields
  • Loading branch information
wardi authored Feb 17, 2022
2 parents 5c3a36b + 70e394a commit d47eb09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ckan/lib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2675,8 +2675,7 @@ def get_translated(data_dict, field):
try:
return data_dict[field + u'_translated'][language]
except KeyError:
val = data_dict.get(field, '')
return _(val) if val and isinstance(val, str) else val
return data_dict.get(field, '')


@core_helper
Expand Down

0 comments on commit d47eb09

Please sign in to comment.