field storage config should document what it means for translatable to be FALSE

Created on 24 April 2023, over 1 year ago
Updated 25 April 2023, over 1 year ago

Problem/Motivation

FieldStorageConfig says:

  /**
   * Flag indicating whether the field is translatable.
   *
   * Defaults to TRUE.
   *
   * @var bool
   */
  protected $translatable = TRUE;

but there's AFAICT no UI for setting this to FALSE. The translatability is controlled at the field config level, not in the storage.

What would it mean if this property were FALSE?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

10.1

Component
Documentation 

Last updated 2 days ago

No maintainer
Created by

🇬🇧United Kingdom joachim

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

Comments & Activities

  • Issue created by @joachim
  • 🇮🇳India Akram Khan Cuttack, Odisha

    added a patch and To improve the documentation for the FieldStorageConfig class, add a more detailed description of what the translatable property does and what it means when it's set to FALSE.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    29,304 pass
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India Akram Khan Cuttack, Odisha
  • Status changed to Needs work over 1 year ago
  • 🇬🇧United Kingdom joachim
    +++ b/core/modules/field/src/Entity/FieldStorageConfig.php
    @@ -129,7 +129,9 @@ class FieldStorageConfig extends ConfigEntityBase implements FieldStorageConfigI
    +   * language on a multilingual site. If FALSE, the field is not translatable and
    +   * will have the same value for all languages.
        *
    

    My point though is that AFAICT this NEVER gets set to FALSE. There is no UI for it, and fields get created with it set to TRUE.

    This needs input from people who know the deep innards of the translation system.

Production build 0.71.5 2024