Problem/Motivation

MyrestRedirectEventSubscriber compares the current language against the literal 'uk' and resolves aliases with the literal 'ru'. PathByAliasGetResource hardcodes 'ru' and 'en', and MyrestHelper contains an en/uk/ru lookup table. Sites with a different language set get wrong redirects or empty responses.

Proposed resolution

  • Resolve languages via LanguageManagerInterface (default language, configured languages, negotiation).
  • Make the legacy-language redirect map configurable instead of literal.
  • Add kernel test coverage for multilingual redirect behaviour.

Remaining tasks

Refactor the subscriber, the resource and the helper lookup table.

User interface changes

Optional configuration for legacy language redirects.

API changes

None.

Issue fork myrest-3615447

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 3519298a on 1.0.x
    Issue #3615447: Remove hardcoded language codes from routing and...
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)