Problem/Motivation

Follow-up of #2660338: Deprecate locale_get_plural, StringTranslationTrait::getNumberOfPlurals() is another hidden dependency on locale module.

Unlike formatPlural(), this one just has a handful of usages across core and contrib, most already depend on the locale module, just one in views module doesn't explicitly, but the whole functionality it's used in specifically is about multilingual stuff.

Steps to reproduce

Proposed resolution

Deprecate the method on the trait, let callers call the locale service directly.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

berdir created an issue.