Hide not translatable fields in forms

Created on 9 December 2024, 4 months ago

Problem/Motivation

As per normal fields, it would be useful to have a flag per sub-field to hide that sub-field in form when current language is different than original language.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇮🇹Italy giuse69

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

Merge Requests

Comments & Activities

  • Issue created by @giuse69
  • 🇺🇸United States apmsooner

    @giuse69, see attached screenshot for what i'm thinking on this. The checkbox would be visible if the parent checkbox on field is checked. Question I have, should the default state be checked or unchecked for new fields? I'm thinking unchecked to keep in line with how Drupal normal fields work.

  • 🇮🇹Italy giuse69

    Hi @apmsooner, well, imho there is no direct comparison with normal Drupal fields since it does not have (unfortunately) subfields.
    I think that if the "user may translate" option is checked, means that the overall custom field is translatable, so maybe checking also subfield is consistent, then the admin may uncheck some subfield is the translation applies only partially (i.e. to some and not all subfield).
    So I am thinking something like the following:
    -) first load of the form: nothing is checked
    -) the admin checks overall translation => automatically all subfields are checked as translatable.
    -) the admin unchecks some subfield => no automatic action occurs
    -) the admin uncheck overall translation => automatically all subfields are unchecked, to keep the situation consistent.
    How does it sound?
    thanks for keeping on improving this module

  • Merge request !83Resolve #3492719 "Hide not translatable" → (Merged) created by apmsooner
  • Pipeline finished with Skipped
    3 months ago
    #381507
    • apmsooner committed e35551d9 on 3.0.x
      Issue #3492719 by apmsooner, giuse69: Hide not translatable fields in...
  • 🇺🇸United States apmsooner

    This is good to go. I'm merging it in and creating a new release as the last one had a minor regression bug that broke the preview in image widget.

  • 🇺🇸United States apmsooner

    This new feature is available now in 3.0.3 release.

Production build 0.71.5 2024