Skip to content

Allow to use --merge option with --import-path option #429

@WarGeneration

Description

@WarGeneration

Hello, I have several bundles lets name them as A, B, C.
These bundles have its own translation files A.en.xlf, B.en.xlf, C.en.xlf.

I use lexik:translations:import --import-path=translations -i to import translations from project. But if i create <project_dir>/translations/A.en.xlf to override some translation from bundle, it wont happen.

Lexik\Bundle\TranslationBundle\Translation\Importer\FileImporter will use manager's method addTranslation which does not update exists translation, it only adds new if there isn't translation for given locale.

I tried to remove --merge option from command's check() method, and executed lexik:translations:import --import-path=translations -i -m. After that all my project translations overrode translations from bundles.

So main question why do you disallow using --merge option with --import-path option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions