Problem/Motivation

The labels of base fields that have overrides cannot be translated via UI. This makes it impossible to translate an entity form which shows some widgets of base fields; .e.g. I ran into this by not being able to translate "Authored by" or "Created on" on a node form.

Proposed resolution

* Make it translatable via the translation pages of their entity bundles, e.g. /admin/structure/types/manage/page/translate

Remaining tasks

* Finish patch.

User interface changes

* Some new translation options are available :-)

API changes

-

Data model changes

-

Comments

fago created an issue. See original summary.

fago’s picture

StatusFileSize
new1017 bytes

This does not seem to really easy. I've managed to get a working patch, but I ran into the following issues:
- I ran into some issues with translations not being picked up correctly *when* clearing cache via the admin menu tools *and* being on a translation language page. With a regular cache rebuild from API / drush cr this worked fine.
- After changing a translation there is still a cache rebuild needed afterwards - this needs to be detected and handled automatically.
- We should add some test coverage here.

fago’s picture

Status: Active » Needs review

Let's see what the testbot says.

swentel’s picture

I ran into some issues with translations not being picked up correctly *when* clearing cache via the admin menu tools *and* being on a translation language page

Maybe related with #2650434: Clearing cache via UI in translated language resets config translation of field labels to default language ? Not 100% sure, tricky stuff these config translations :)

Status: Needs review » Needs work

The last submitted patch, 2: d8_base_field_overrides.translation.patch, failed testing.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

chi’s picture

Rerolled to Drupal 9.

marco-s’s picture

I ran into the same problem with "media". I would like to translate the "name" field's label as well as its description. But this is not possible as the label is overridden by base field override. Same for the "status" field.

@fago Have you made any progress here?

avpaderno’s picture

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8.9.x is now open only to security issues.

vsujeetkumar’s picture

Status: Needs work » Needs review
StatusFileSize
new1.11 KB
new1.14 KB

Fixed the fail test. For fixing it I have added "!is_null" condition, I am not too sure it is the write approach, Please have a look and advise.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.1.10 (June 4, 2021) and Drupal 9.2.10 (November 24, 2021) were the last bugfix releases of those minor version series. Drupal 9 bug reports should be targeted for the 9.3.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

pasqualle’s picture

The "Authored on" base field override (for blog node) can be translated here:
/admin/structure/types/manage/blog/fields/base-field-override/node.blog.created/translate

Check out the https://www.drupal.org/project/base_field_override_ui module it has direct links to translate the overridden base fields.

avpaderno’s picture

Title: Base field overrides cannot be translated what renders some entity form labels untranslatable » Base field overrides cannot be translated which renders some entity form labels untranslatable

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Postponed (maintainer needs more info)
Issue tags: +Needs Review Queue Initiative

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)
Issue tags: +Bug Smash Initiative

Since there hasn't been a follow up in 2+ years going to close out

If not covered by the issue in #20 please re-open

bbu23’s picture