Handling of field translatability on Translations local task and visibility of that

Created on 10 April 2014, almost 11 years ago
Updated 25 January 2025, 11 days ago

Problem/Motivation

#2225739: Remove usage of field_info_instances(), use EntityManager::getFieldDefinitions() instead converts the use of field_info_instances() on the Translations local task to EntityManager::getFieldDefinitions(). That caused a test in NodeTranslationUiTest to break because that assumed that by making all configurable fields untranslatable, there would be a message about no translatable fields being there. But it was already weird right now in HEAD, because when you directly go to the URL, you can add a translation and the fields are translatable, so the overview was the only place that did the check like that.

Except now with the new method, there is one, the title, which is translatable by default.

And it is not possible to make the title untranslatable throughl the UI at least, because the UI does not allow you to make a content type translatable without having any translatable fields.

Due to that, the test has been removed. However, we should figure out if there is still a valid situtation where this could happen and if not, clean up the code to remove that check.

While looking into that, we also found a number of related bugs:
- The translations tab is always visible, even if the node type/bundle is not marked as translatable
- There used to be a "Translations of $title" page title, which no longer exists, I noticed this because Translation Management Tool assert this in our tests.
- As mentioned above, something seems to be wrong on the translation add/edit pages, everything seems to be translatable even when it's no...

Setting to major due to the local task visiblity

Proposed resolution

Check if there is still a situation where the "no translatable fields" message could be shown (no translatable base fields?), add a proper test for it if yes, remove if no longer relevant.

Fix the related bugs, possibly in separate issues?

Remaining tasks

User interface changes

API changes

🐛 Bug report
Status

Closed: outdated

Version

11.0 🔥

Component

content_translation.module

Created by

🇨🇭Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

  • 🇳🇿New Zealand quietone

    Tested on a fresh standard install of 11.x. I found that the title can be untranslated on a translated content type and that the translation tab is only visible when the content type can be translated. And there is a "Translations of $title" page title for a node of content type that can be translated. Therefor, I am closing this is as outdated.

    If that is incorrect, re-open and comment on what still needs to be done.

Production build 0.71.5 2024