Review 12.4 Merged

79545[TASK] Re-introduce hreflang attribute of site language configuration

Benni Mack CR +2 V +2 Normal +37 −32 updated 07/03/23, 14:26

Commit message

The site language's configuration setting "hreflang" was
deprecated with #99908, however, it still serves a valid purpose.

If working with EXT:seo and the <link rel="alternate"> tags,
it is still valid and possible to set a specific "hreflang" attribute.

Example setups:
* You have "German (Germany)" (which is using de-DE as locale)
  and "German (Austria)" (which is using de-AT as locale).
  here you want to set "de" as generic fallback in the "de-DE" locale
  when using hreflang attributes.
* You want to explicitly set "x-default" for a specific language,
  which is clearly not a valid language key.

This change does the following:
* It re-adds the hreflang property to be managed by the UI, however
  it is empty by default and will fallback to the $locale->getName().
* It is not used within the <html lang="..."> attribute anymore as this
  was a mis-use in the first place (and now properly using just the
  language key, see
  https://www.w3.org/International/questions/qa-html-language-declarations.en.html#attributes
* The method "SiteLanguage->getHrefLang()" is not deprecated anymore.
* The RST is adapted accordingly

Still, the relevant information is: The site language configuration
option "hreflang" is not relevant anymore for regular websites without
rendering hreflang tags, but is now customizable, and has a proper
fallback.

Review

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

Issues 3

Files 11

Review log 34

  1. Benni Mack commented on patch set 1 07/03/23, 13:48

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 07/03/23, 13:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43238

  3. Benni Mack voted on patch set 1 V +2 CR +2 07/03/23, 14:26

  4. Benni Mack merged patch set 2 07/03/23, 14:26