Problem/Motivation

In #3341682-11: New config schema data type: `required_label`, I discovered that setting translatable: true in a config schema has zero effect.

Turns out that only translatable: true on config schema types is allowed! That's how config_translation_config_schema_info_alter() works.

Steps to reproduce

Specify translatable: true for anything that isn't top-level in the schema, and observe it has no effect in the config translation UI!

Proposed resolution

Add validation for developers.

Remaining tasks

TBD

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

TBD

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Status: Active » Needs review
StatusFileSize
new2.23 KB
new1.76 KB

This should fail like so:

Testing /Users/wim.leers/core/core/modules/config_translation/tests/src/Functional
.                                                                   1 / 1 (100%)

Time: 00:13.523, Memory: 10.00 MB

OK (1 test, 28 assertions)

Unsilenced deprecation notices (12)

  12x: The `field.value.created.mapping` config schema specifies the `translatable` property, but the config_translation module only supports this for types.
    12x in ConfigTranslationUiTest::testSourceValueDuplicateSave from Drupal\Tests\config_translation\Functional
needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new1.66 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

nitin shrivastava’s picture

StatusFileSize
new1.65 KB
new951 bytes

Try to fix CCF error.

borisson_’s picture

Status: Needs work » Needs review

NR so the bot can look at #4.

borisson_’s picture

Status: Needs review » Needs work

#2 tells us that this should fail, but I can't find any of those errors in the output, is that because the fail patch is no longer there?

In any case, back to needs work for the todo in the code (making it recursive).

Version: 10.1.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, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.