Skip to content

translation path should overwrite default_path #42404

Closed
@h2Entwicklung

Description

@h2Entwicklung

Description
We want to use alternative texts in our app.
For this use case we want to use the translation bundle to overwrite the default texts.
The idea is that in the default_path the translation:update command is updateing the default texts. But when the "path" in the translation.yaml is set then if the translation is found there as well, then the text from the default_path should be overwritten.
The mechanism now already works as expected with several paths in the "path" variable in the translation.yaml.

So my idea is now the change the priority of the default_path from highest to lowest.

framework:
    default_locale: de
    translator:
        default_path: '%kernel.project_dir%/translations/default'
        path:
            - '%kernel.project_dir%/translations/'
            - '%kernel.project_dir%/translations/custom'
        fallbacks:
            - de

Now our workflow is:

  1. moving the messages+intl-icu.de.xlf to the default directory
  2. making the translation:update command
  3. moving the messages+intl-icu.de.xlf back to the translations folder so the default folder is empty again and the paths are used.

Example

now:

priority:
path:[path1, path2] --> default_path

feature Request:

priority:
default_path --> path: [path1, path2]

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