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

Command icon 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

sergeydruua created an issue. See original summary.

  • sergeydruua committed f67b5126 on 1.0.x
    Issue #3615450: Replace the custom sklon() pluralization with core APIs
    
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)