Review main Merged

92902[FEATURE] Localize enum labels in site settings definitions

Eric Harrer CR +2 V +2 Hard +355 −7 updated 03/02/26, 19:20

Commit message

Enum labels in site settings definitions are now localized in the
same way as other setting labels.

Explicit enum label references are translated, and list-style enum
declarations are normalized to mapped label keys based on the set
labels file. Key-only enum entries continue to fall back to their
enum value.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 11

Review log 1318

  1. Eric Harrer uploaded patch set 1 02/19/26, 17:12

  2. Eric Harrer updated the commit message in patch set 2 02/19/26, 17:14

  3. core-ci voted on patch set 1 V +1 02/19/26, 17:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96271

  4. core-ci voted on patch set 2 V -1 02/19/26, 17:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96272

  5. Benjamin Franzke commented on patch set 2 02/19/26, 17:38

    Feature-106640-LocalizeEnumLabelsInSiteSettingsDefinitions.rst:40

    Hey, thanks for tackling this! We tried to avoid extension references in site-set labels so far, as we want to allow site sets to be extension independent as much as possible. Therefore we thought about a mapping, similar to the one for regular setting labels and descriptions. I started a demo in here: > 92340: [WIP][TASK/BUGFIX/FEATURE] Fix/Provide translation of setting enums | https://review.typo3.org/c/Packages/TYPO3.CMS/+/92340 We can try to integrate that into your patch, that would be awesome!
  6. Eric Harrer uploaded patch set 3 V -1 02/19/26, 19:15

  7. Eric Harrer commented on patch set 3 02/19/26, 19:18

    Feature-106640-LocalizeEnumLabelsInSiteSettingsDefinitions.rst:40 Reply

    Thanks for the hint and for pointing me to 92340. I reworked this patch accordingly in the latest patch set: * Enum label handling now follows the mapping approach from 92340 in `YamlSetDefinitionProvider`. List-style enum declarations are normalized to mapped label keys, and `{label}:...` is expanded via the set’s configured labels reference (no hardcoded extension reference needed). * Both `SiteSettingsController` and `SiteConfigurationController` now resolve enum labels via `LanguageService::sL()`, aligned with description label handling. * The previous derived runtime fallback logic in controllers was removed. * Key-only and empty-label enum cases are covered and tested.
  8. core-ci voted on patch set 3 V +1 02/19/26, 19:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96284

  9. Eric Harrer uploaded patch set 4 V +1 02/19/26, 20:10

  10. core-ci voted on patch set 4 V +1 02/19/26, 20:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96288

  11. Garvin Hicking commented on patch set 4 02/19/26, 23:43

    👍

    SiteConfigurationControllerTest.php:202

    (Did not investigate yet) Does the new translation domain syntax (my_site.labels:settings.description.my.enumSetting) work here tok by chance? If so, we should cover it in the test too

    YamlSetDefinitionProvider.php:95

    A comment could help to grasp this monstrosity of synrax sugar ;)
  12. Eric Harrer uploaded patch set 5 V +1 02/20/26, 10:23

  13. Eric Harrer commented on patch set 5 02/20/26, 10:24

    SiteConfigurationControllerTest.php:202 Reply

    Yes, this syntax works in this controller flow as well. I added test coverage for it by using `my_site.labels:settings.description.my.enumSetting` in the unit test setup and asserting the resolved description result.

    YamlSetDefinitionProvider.php:95 Reply

    Good point, thanks. I added an inline comment to explain the conversion step: YAML maps are decoded as objects and are normalized to arrays so settings/category definitions can be processed uniformly afterwards.
  14. core-ci voted on patch set 5 V +1 02/20/26, 10:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96331

  15. Garvin Hicking voted on patch set 5 CR +1 V +1 02/20/26, 10:40

  16. Georg Ringer voted on patch set 5 CR +1 V +1 02/24/26, 08:11

  17. Garvin Hicking voted on patch set 5 CR +2 V +2 03/02/26, 19:20

  18. Garvin Hicking merged patch set 6 03/02/26, 19:20