Currently the setup.py defines ckanext.dcat as a namespace package, but I would propose to remove it.
We extend the DCATPlugin in our own extension, and because the DCATPlugin extends the DefaultTranslation it tries to find the i18n folder of dcat in our extensions. Therefore we wanted to simply override this by implementing the i18n_directory with the following to load the "original" i18n directory of this extension:
But because "ckanext.dcat" is declared as a namesapce package, it loses certain properties like __file__, as it is possible to contribute to this namespace from different places (just like ckanext). So the above code does not work.
I don't think this is a desired behavior and makes extending this extension actually harder.
Currently the setup.py defines
ckanext.dcat
as a namespace package, but I would propose to remove it.We extend the
DCATPlugin
in our own extension, and because theDCATPlugin
extends theDefaultTranslation
it tries to find the i18n folder of dcat in our extensions. Therefore we wanted to simply override this by implementing thei18n_directory
with the following to load the "original" i18n directory of this extension:check the original implementation for reference.
But because "ckanext.dcat" is declared as a namesapce package, it loses certain properties like
__file__
, as it is possible to contribute to this namespace from different places (just likeckanext
). So the above code does not work.I don't think this is a desired behavior and makes extending this extension actually harder.