I wonder if we could move the implementation of TranslatedPage into a mixin class instead?
This would have a couple of advantages:
It takes a layer out of the multi-table inheritance hierarchy which would make queries run faster
This also makes it much easier to migrate an existing site to wagtailtrans
It can be combined with mixins from similar Wagtail plugins
It could potentially be used on snippets as well
The only disadvantage I can think of is that a translated version of a page must be the same type. But, conversely, adding this constraint will make queries for specific translated versions of a page quicker.
For backwards compatibility, we could define TranslatedPage as:
class TranslatedPage(TranslatableMixin, Page):
pass
I wonder if we could move the implementation of
TranslatedPage
into a mixin class instead?This would have a couple of advantages:
The only disadvantage I can think of is that a translated version of a page must be the same type. But, conversely, adding this constraint will make queries for specific translated versions of a page quicker.
For backwards compatibility, we could define
TranslatedPage
as: