ckan / ckanext-dcat

CKAN ♥ DCAT
164 stars 142 forks source link

c.resource field names, loaded as labels on templates. #185

Open HilariousGil opened 3 years ago

HilariousGil commented 3 years ago

I was having some issues with rendering "Additional Info" fields in the resource_read page, and just decided to leave here my findings, since the same is happening in demo.ckan.org. (Only an issue with ckan instances using ckanext-dcat)

See the example of the field "created" for a resource in https://demo.ckan.org/

The happens because the render expects to access the field "res.created" but it's populated like "res.Created" (in english, but different for every language). This happens because ckanext.dcat.translate_keys config defaults to True. Once I set it to False, it solved the issue.

Not sure if this is the intended behavior of the config, but I decided at least share this here.

ccancellieri commented 3 years ago

Related to: https://github.com/ckan/ckanext-dcat/issues/82

try setting: ckanext.dcat.translate_keys = False

https://github.com/ckan/ckanext-dcat#translation-of-fields