django-modeltrans
django-modeltrans copied to clipboard
Add tabbed translation admin
This change adds simple tabbed UI for translated fields
Important: The included JavaScript only supports Django 4.2 and up. I think it's a reasonable change as 3.2 is EOL soon (30 April 2024)
See also: https://github.com/zostera/django-modeltrans/issues/16#issuecomment-327216115
Hi @jieter I added a small test and added the mixin to the example app as well as fixed all pending linter errors. Do you think this is ready to merge? This Admin integration would be the killer feature for this library I'm certain! :)
Hey @jieter thanks for taking the time to have a look.
I agree with your sentiment that it's some completely new code that will have to be maintained in the future. I tried to keep it minimal using modern JS and no build step. The bulk of the code is required to synchronize the selected languages across all fields and supporting dynamically adding/removing inlines (i.e. fieldsets) in the Django Admin. I feel this sync feature allows for a much better editing experience for content moderators. Removing this feature would indeed get rid of a lot of code, but at the cost of UX.
One thing I thought about it that the Django Admin is by design a very slow moving thing, it has barely changed in the last decade. So keeping up to date with upstream is doable with relatively low effort (and I will gladly step up!).
PS: One thing I haven't mentioned is that the CSS variables referenced also support django-admin-interface
@jieter do you have any thoughts?
Hey @jieter it's been a while, do you not want to see this in django-modeltrans
?