Review main Merged

86380[BUGFIX] Translate site set labels in site:sets:list command

Torben Hansen CR +2 V +2 Easy +7 −1 updated 09/30/24, 09:02

Commit message

The label assignment for site sets has changed recently for some
site sets to use a localization file. The `site:sets:list` command
does however not try to translate the site set label and shows the
label path for site sets using a localization file instead.

This change fixes the problem by translating all possible
labels with the `LanguageService`.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Lina Wolf +1
    • Nikita Hovratov +1
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Lina Wolf +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1011

  1. Torben Hansen uploaded patch set 1 09/30/24, 06:26

  2. core-ci voted on patch set 1 V +1 09/30/24, 06:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66830

  3. Nikita Hovratov voted on patch set 1 CR +1 V +1 09/30/24, 06:40

  4. Benni Mack commented on patch set 1 09/30/24, 07:43

    I personally wouldn't rely on $GLOBALS[LANG] because ... what language should be used here? I recommend injecting the LanguageServiceFactory and create a new instance when needed
  5. Benjamin Franzke commented on patch set 1 CR +1 V +1 09/30/24, 08:00

    Reply

    Hm, I think this is "ok", as this is what console commands are currently supposed to use and it is initialized in https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Console/CommandApplication.php#L107-L108 I also think that's not ideal to use a global, but I think that's what our current cli-state is for that… :\
  6. Lina Wolf commented on patch set 1 09/30/24, 08:30

    Reply

    I would suggest to change this for all commands in a follow up
  7. Lina Wolf commented on patch set 1 CR +1 09/30/24, 08:30

    Code looks good to me
  8. Lina Wolf commented on patch set 1 V +1 09/30/24, 08:44

    Just testet this on Core settings and our example settings from t3docs/blog-example and t3docs/examples. Works a charm! Thank you
  9. Benni Mack voted on patch set 1 CR +1 09/30/24, 09:02

  10. Benjamin Franzke voted on patch set 1 CR +2 V +2 09/30/24, 09:02

  11. Benjamin Franzke merged patch set 2 09/30/24, 09:02