Is DrupalTranslator needed?

Created on 26 February 2019, almost 6 years ago
Updated 20 July 2023, over 1 year ago

Problem/Motivation

DrupalTranslator was added as a bridge to the Symfony Translation component - because when we added the Validation component it required the Translation component in order to use TranslatorInterface.

However, we don't actually use any Symfony code that directly relies on TranslatorInterface at all, so DrupalTranslation is a bridge to nothing, consumed only by Drupal code.

Symfony has moved TranslatorInterface to Symfony/Contracts per #3030485: [Symfony 5] The "Drupal\Core\Validation\TranslatorInterface" interface extends "Symfony\Component\Translation\TranslatorInterface" that is deprecated since Symfony 4.2, use Symfony\Contracts\Translation\TranslatorInterface instead. β†’ , but as shown in that issue, we can probably live with out it.

Proposed resolution

See if we can deprecate DrupalTranslator entirely, rework any code relying on it to use TranslatableMarkup directly.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Needs review

Version

11.0 πŸ”₯

Component
Typed dataΒ  β†’

Last updated 16 days ago

  • Maintained by
  • πŸ‡¦πŸ‡ΉAustria @fago
Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024