Skip to content

[FIX] Use manager language for alias transliteration.#2283

Merged
Seiger merged 2 commits intoevolution-cms:3.5.xfrom
middleDuckAi:middleDuck/evo-2265-manager-language-transalias
Apr 7, 2026
Merged

[FIX] Use manager language for alias transliteration.#2283
Seiger merged 2 commits intoevolution-cms:3.5.xfrom
middleDuckAi:middleDuck/evo-2265-manager-language-transalias

Conversation

@middleDuckAi
Copy link
Copy Markdown
Collaborator

Problem

Resource alias transliteration during save did not follow the current manager_language. The active TransAlias table stayed tied to the plugin configuration instead, and the manager copy still claimed that only Russian symbols needed TransAlias setup.

Closes #2265.

Root Cause

Core::stripAlias() did not tell OnStripAlias which manager language was active, so TransAlias had no runtime signal to choose a language-appropriate transliteration table. At the same time, the automatic_alias_message copy in ru and uk still described the old Russian-only setup.

What Changed

  • passed manager_language into the OnStripAlias event payload
  • added a bounded manager_language -> transliteration table resolver in TransAlias
  • mapped supported manager languages to built-in tables and kept the configured fallback for unsupported languages
  • removed the outdated TransAlias setup note from the ru and uk automatic alias help text
  • added a regression test for the runtime mapping contract and translation cleanup

Validation

  • php -l core/src/Core.php
  • php -l assets/plugins/transalias/plugin.transalias.php
  • php -l assets/plugins/transalias/transalias.class.php
  • php -l core/tests/Unit/TransAliasManagerLanguageTest.php
  • cd core && ./vendor/bin/phpunit tests/Unit/TransAliasManagerLanguageTest.php
  • cd core && ./vendor/bin/pest tests/Feature/ModifiersTest.php

Risk

Low to medium. The change is isolated to alias transliteration routing and keeps the existing configured table as a fallback when the manager language has no safe built-in mapping.

@middleDuckAi
Copy link
Copy Markdown
Collaborator Author

MiddleDuck follow-up:

I pushed one small safety refinement into this PR.

Why:

  • the first version could override an explicitly configured TransAlias table too aggressively
  • that was broader than needed for this issue

What changed:

  • manager_language now only drives the generic/default table modes (common, utf8, utf8lowercase)
  • explicit table choices like german, dutch, russian, czech stay respected as explicit overrides

Re-validated:

  • cd core && ./vendor/bin/phpunit tests/Unit/TransAliasManagerLanguageTest.php
  • cd core && ./vendor/bin/pest tests/Feature/ModifiersTest.php

@Seiger Seiger merged commit 922ece6 into evolution-cms:3.5.x Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transliteration in resource alias on save should happen from the manager language [(manager_language)]

2 participants