Review main Merged

85049[BUGFIX] Re-add country code to html lang attribute

TYPO3com CR +2 V +2 Easy +3 −1 updated 08/09/25, 09:21

Commit message

Add support for more specific html lang attribute like:

de-CH, en-GB a.s.o.

Use the current site language's hreflang and allow a fallback
to the site language's locale.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Hannes Lau +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benni Mack +2
    • Hannes Lau +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 5

Files 1

Review log 2533

Show 48 earlier messages
  1. TYPO3com uploaded patch set 1 07/01/24, 14:47

  2. Timo Poppinga updated the commit message in patch set 2 07/01/24, 14:48

  3. core-ci voted on patch set 1 V -1 07/01/24, 14:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60777

  4. core-ci voted on patch set 2 V -1 07/01/24, 14:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60778

  5. Georg Ringer uploaded patch set 3 V -1 08/01/24, 08:02

  6. core-ci voted on patch set 3 V +1 08/01/24, 08:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62586

  7. Georg Ringer voted on patch set 3 CR +1 V +1 08/01/24, 09:12

  8. Stefan Kapitza-Graetz voted on patch set 3 CR +1 V +1 08/01/24, 20:29

  1. Benni Mack commented on patch set 3 CR -1 08/02/24, 20:18

    RequestHandler.php:306

    I think we should be fine by just using (string)$siteLanguage->getLocale()
  2. Georg Ringer commented on patch set 3 CR 0 V 0 08/03/24, 04:56

    thanks! this will lead to other issues, e.g. you can't then have de-US (as the locale does not exist) or maybe even not de-Ch (if not installing the locale and avoiding errors) in the locale field you can use multiple entries as comma separated list, but this would lead to lang="de-Ch,de-DE" which would then be invalid
  3. Benni Mack updated the commit message in patch set 4 CR +1 V +1 10/18/24, 13:41

  4. Benni Mack voted on patch set 4 CR -1 10/18/24, 13:41

  5. Ingo Fabbri commented on patch set 4 CR -1 V -1 11/06/24, 12:25

    RequestHandler.php:306 Reply

    Using $siteLanguage->getLocale() would introduce another unintended behaviour. I still do not understand why the explicit hreflang-setting in site-language was deprecated/removed. "locale" is most of the time a OS opinionated thing. Some webservers do not offer "de_AT" as locale, so one uses "DE" or "de_DE". This does not imply, that the website runs with "de-DE" language. And therefore should not put lang="de-DE" on the html tag. It should be in the full control of the integrator what is put in the html lang tag value.
  6. Benni Mack commented on patch set 5 CR -1 V -1 07/24/25, 15:32

    Published edit on patch set 4.
  7. Benni Mack updated the commit message in patch set 6 07/24/25, 15:32

  8. Benni Mack commented on patch set 6 07/24/25, 15:36

    RequestHandler.php:306 Reply

    I hope you are fine with the change now.
  9. core-ci voted on patch set 5 V -1 07/24/25, 15:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82261

  10. core-ci voted on patch set 6 V -1 07/24/25, 15:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82262

  11. Hannes Lau commented on patch set 6 CR +1 07/24/25, 15:54

    This patch looks good to me. Just two remarks regarding the commit message.
    I suggest to state the intention of the patch here: [BUGFIX] Readd country code to html lang attribute
    In the current version of this patch, the behavior is different: Use the current site language's hreflang and allow a fallback to the site language's locale.
  12. Benni Mack updated the commit message in patch set 7 CR +1 V -1 07/24/25, 16:13

  13. Benni Mack commented on patch set 7 07/24/25, 16:13

    Reply

    Done

    Reply

    Done
  14. core-ci voted on patch set 7 V -1 07/24/25, 16:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82268

  15. Benni Mack rebased onto patch set 8 V -1 07/24/25, 17:09

  16. core-ci voted on patch set 8 V +1 07/24/25, 17:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82271

  17. Benni Mack voted on patch set 8 CR +1 V +1 07/25/25, 17:47

  18. Garvin Hicking commented on patch set 8 CR +1 V +1 07/25/25, 19:42

    Should we "un-deprecate" #99908 then? Flag that RST with a note maybe (not introducing a new one)?
  19. Hannes Lau commented on patch set 8 07/30/25, 09:29

    Reply

    Yes, I agree. I think we should modify deprecation 99908 and tell that the property has not been deprecated. The deprecation in the code has been removed already, so the documentation should follow. https://git.typo3.org/typo3/typo3/-/commit/85d2b5b17ce774e3dbbd81d4c8f6c9d81da0b497#cbd75d08dac034d89ff21823e29f395e2b93efe3_5548_5548 https://git.typo3.org/typo3/typo3/-/commit/85d2b5b17ce774e3dbbd81d4c8f6c9d81da0b497#c89a56c6ef3e8c91dcf2a80857ee36a016ec1470_287_284 But I suggest to do this as another issue to keep this change focussed on the usage in `<html lang=""`.
  20. Benni Mack commented on patch set 8 07/30/25, 11:42

    Reply

    I think so as well @office@hanneslau.de care to re-vote please?
  21. Garvin Hicking commented on patch set 8 07/30/25, 12:05

    Reply

    So a seperate patch to re-introduce "hreflang" as site setting and then removal of the deprecation rst paragrpahs: ``` Using the TypoScript settings or the PHP method will trigger a PHP deprecation notice. An administrator cannot select a value for the hreflang setting anymore via the TYPO3 backend. However, when saving a site configuration via the TYPO3 backend it will still keep the hreflang setting so no information is lost. ``` ? The first one is already no longer applicable, right? I can do a follow-up but want to get the sentiment right.
  22. Hannes Lau voted on patch set 8 CR +1 07/30/25, 13:19

  23. Hannes Lau voted on patch set 8 V +1 08/07/25, 22:47

  24. Benni Mack commented on patch set 8 CR +2 V +2 08/09/25, 09:21

    Reply

    yes. but we also need to get in this one https://review.typo3.org/c/Packages/TYPO3.CMS/+/86444
  25. Benni Mack merged patch set 9 08/09/25, 09:21