Review main Abandoned

95903[BUGFIX] Handle a backend language ICU cannot format a date with

Georg Ringer CR 0 V 0 Normal +152 −24 updated 09/17/26, 20:42

Commit message

A TYPO3 language key is not necessarily a locale ICU knows. Any
string may be registered as one through the localization setting
SYS/localization/locales/user, where it serves to resolve XLF
labels, and be_users.lang may still name a key that has since
been taken away again.

IntlDateFormatter answers such a key with a ValueError, which
ended every request rendering a date, including the setup module
the editor would pick another language in.

DateFormatter now tries the locale, then the languages it
declares as its fallback, then English, and skips a candidate
only where ICU rejects it. The happy path is unchanged: the
guard wraps the construction that happens anyway.

The label side needs no such guard. It looks the catalogue up
under the key itself, which is what makes a pseudo language work
in the first place, and already appends "en" and "default" to
its fallback chain.

DateViewHelper reads be_users.lang through Locales rather than
as a locale of its own, so a key that is no longer registered
falls back the way it does everywhere else, and a registered one
keeps the dependencies it declares.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 4

Review log 2

  1. Georg Ringer uploaded patch set 1 09/17/26, 20:40

  2. Georg Ringer abandoned the change 09/17/26, 20:42