Support widget on non-default translations

Created on 2 June 2021, over 3 years ago
Updated 23 February 2023, almost 2 years ago

Problem/Motivation

Currently inline translation seems to work in a scenario where you set the default language of an entity type to "Site's default language" or another fixed language. However, then you won't see the widget in a different language. Ofcourse, sometimes an entity gets created in a non-default language first, but then the widget is not visible.

If you choose "Interface Text Language for page" you will see the widget when you create an entity in the non-default langauge. This is perfect, but the form can't be submitted due to an error (Null value).

In my case, I'd like to always have the widget available, no matter what language of the site is used to create the entity or no matter how the default language is set.

Steps to reproduce

Set the default language for an entity type to site_default. Visit the entity form in a non-default language: you don't see the widget.
Set the default language for an entity type to current_interface. Visit the entity form in a non-default language: you see the widget but are unable to submit the form.

Proposed resolution

Is there a reason why this widget handling in the entity form was initially disabled for the original language? :

'// 2. Check if the current language is the original.

I attached a patch that removes the checks on the default language. It seems to work for my case, but I have no idea what side-effects might occur. Thanks for the feedback.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium interx Flanders

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024