Problem/Motivation
MyrestHelper::sklon() implements Slavic plural forms manually with a hardcoded suffix array. The method name is a transliteration rather than English, and the logic bypasses Drupal's translation system, so the produced strings can never be translated through the UI.
Proposed resolution
- Replace the method with
$this->formatPlural()/PluralTranslatableMarkup, which handles plural rules per language. - Keep a deprecated
sklon()shim delegating to the new implementation for one release. - Rename any remaining transliterated identifiers to English.
Remaining tasks
Refactor call sites and verify plural output for every installed language.
User interface changes
Plural strings become translatable through the standard interface translation UI.
API changes
sklon() is deprecated.
Issue fork myrest-3615450
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
sergeydruua commentedComment #6
sergeydruua commented