gathering / wannabe

Event-system for TG - wannabe.gathering.org
GNU General Public License v3.0
12 stars 7 forks source link

Enable editing of FrontNews items regardless of user language #64

Closed niccofyren closed 3 years ago

niccofyren commented 3 years ago

Turns out the existing behaviour was a bit stranger than expected. Currently they don't really translate FrontNews items, but instead create completely separate entries for English and Norwegian. Since user only saw items available in his/her own locale, there wasn't really a way to see, and much less add translations to existing items from other languages.

To keep things simple (while working around Translation class issues) I kept editing of different translations on separate page views, but with easy navigation in between... independent of user language. We also only take the existing nob and eng languages into account.

In order to allow editing of existing items we had to allow Translation class to return items missing translations for active locale. When this is merged any active FrontNews items needs to be updated (via admin pages) with translations for both languages, and the duplicates set to inactive.

Fixes: https://github.com/gathering/wannabe/issues/14