Review 14.3 Merged

97420[TASK] Introduce a marker for the default language value

André Buchmann CR +2 V +2 Hard +487 −358 updated 11/09/26, 08:32

Commit message

A record's language field, usually "sys_language_uid", uses 0 for the
record in the default language, the original record that translations
point to. Backend logic, selectors and filters use the same value to
express "default language", and checks like "> 0" are used to detect
translations.

Add \TYPO3\CMS\Core\Schema\LanguageMarker::DEFAULT_LANGUAGE next to
the existing ALL_LANGUAGES marker and use it wherever 0 expresses a
language: comparisons, translation checks, query constraints,
fallbacks, defaults, array keys and SQL fragments in TCA.

The class description is adjusted, as the default language is the ID
of a site language and not a reserved value. The marker is not
necessarily the language returned by
SiteInterface::getDefaultLanguage(), which falls back to the first
configured language if a site does not configure language 0.

Behavior is unchanged. Other uses of 0, for example translation
parent pointers or positional array indexes, keep the literal.

Review

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

Issues 1

Files 134

Show 114 more files

Review log 58

  1. André Buchmann uploaded patch set 1 11/08/26, 19:53

  2. core-ci voted on patch set 1 V -1 11/08/26, 20:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113605

  3. André Buchmann uploaded patch set 2 V -1 11/08/26, 20:10

  4. André Buchmann uploaded patch set 3 11/08/26, 20:26

  5. core-ci voted on patch set 2 V -1 11/08/26, 20:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113608

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

  7. Benni Mack voted on patch set 3 CR +2 V +2 11/09/26, 08:32

  8. Benni Mack merged patch set 4 11/09/26, 08:32