Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
WarGeneration opened this issue Feb 16, 2023 · 3 comments
Open

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

WarGeneration opened this issue Feb 16, 2023 · 3 comments

Comments

@WarGeneration
Copy link

WarGeneration commented Feb 16, 2023

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?

@bartmcleod
Copy link
Collaborator

I don't know if there is any valid reason do disallow merging with specific imported files.

@WarGeneration
Copy link
Author

so should i create PR for that?

@bartmcleod
Copy link
Collaborator

@WarGeneration That would be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants