Skip to content

Translation domain overrides no longer being used #40014

Closed
@kbond

Description

@kbond

Symfony version(s) affected: 4.4.19

Description
After upgrading from 4.4.18 to 4.4.19, my custom translation messages for the security domain is no longer being used.

How to reproduce

  1. Create translations/security.en.yml with the following contents:
    "Invalid credentials.": Custom Message!
  2. My translator config looks like the following:
    framework:
        default_locale: en
        translator:
            default_path: '%kernel.project_dir%/translations'
            fallbacks:
                - en
  3. In a twig template:
    {{ 'Invalid credentials.'|trans([], 'security') }} {# resolves to "Invalid credentials." but expected "Custom Message!" #}

Possible Solution
I looked though the changes from 4.4.18 to 4.4.19 but couldn't pinpoint exactly what caused this bug.

Additional context
I can work on a reproducer. Reproducer: https://github.com/kbond/symfony-reproducer/tree/bug/trans-domain:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions