Update state var on language entity update (not only on form edit)

Created on 3 July 2025, 24 days ago

Problem/Motivation

As soon as a language is added/updated in form, the locale.translation.formulae state variable is updated. But this doesn't happen on config sync or when the language config entity is programmatically inserted/updated.

Proposed resolution

  • Add a new DrupalOrgPluralFormulaInterface::updatePluralFormula() which contains the code from PluralFormulaLanguageForm::updatePluralFormula().
  • Deprecate PluralFormulaLanguageForm::updatePluralFormula(). Replace its code with a call to the new service method.
  • Implement hook_configurable_language_insert|update() and call the new service method.

Remaining tasks

None.

User interface changes

None.

API changes

New DrupalOrgPluralFormulaInterface::updatePluralFormula() method.

Data model changes

None.

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡·πŸ‡΄Romania claudiu.cristea Arad πŸ‡·πŸ‡΄

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024