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

ImportService should import messages from new locales even if the same message already exist in another locale. #61

Closed
obrassard opened this issue Feb 8, 2024 · 2 comments

Comments

@obrassard
Copy link

Hello, I hope you are doing good !

We are working on a Craft website that had originally two locales (en-US and fr-CA). Today we introduced a new locale es-US, so we created a new translation file for this locale at : /translations/es-US/site.php with Spanish messages. Our goal was to import those new translations using the command craft translations-admin/utilities/import.

Unfortunately, this did not work as expected. It seems that the Spanish messages were not inserted to the database, as their Key is not new (they already exist in English and French). However, I believe it should be possible (and useful) to be able to import messages for new locales even if the translation key already exists in the database for other locales.

I understand we would not want to override texts that were previously updated by a user in the admin panel when importing messages, however if there is no value in the DB for an existing message in a specific locale (and that value is present in the php files), I don't see why we could not import it.

Thanks in advance !

@smcyr
Copy link
Contributor

smcyr commented Feb 16, 2024

It's fixed in 3.2.2, let me know if it something is amiss. Thanks

@smcyr smcyr closed this as completed Feb 16, 2024
@obrassard
Copy link
Author

Thank you @smcyr

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