8000 Missing translation in bootstrap_4_layout.html.twig · Issue #48104 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Missing translation in bootstrap_4_layout.html.twig #48104
Closed
@AZeroEight

Description

@AZeroEight

Symfony version(s) affected

6.1.x

Description

When you run the following command to extract the strings to be translated:

symfony console translation:extract --force --clean --domain validators en

...your translationfile 'validators.en.xlf' is updated with a translation unit like the following - even though you haven't used it in your project:

<trans-unit id="VKDowX6" resname="Error">
  <source>Error</source>
  <target>Error</target>
</trans-unit>

This is because the following line is used in bootstrap_4_layout.html.twig - which references the string Error to be translated:

<span class="form-error-icon badge badge-danger text-uppercase">{{ 'Error'|trans({}, 'validators') }}</span> <span class="form-error-message">{{ error.message }}</span>

How to reproduce

Just run the above command on your project and it should generate the entries mentioned.

Possible Solution

Remove the Part of the layout which requires translation - the error message itself should be enough.

Additional Context

No response

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

      0