MutationDigitale / craft3-translate

Craft CMS plugin for static translations in CP
Other
12 stars 7 forks source link

Wrong translation language #29

Closed MischaSz closed 3 years ago

MischaSz commented 3 years ago

We're using Translation admin v2.4.3 on Craft CMS 3.6.17. There are 8 sites with 4 languages (DE/EN/FR/IT). DE is the default language. In some circumstances, Translation admin chooses a wrong language for the translation (eg it takes the EN string instead of the DE string). Even if I force DE as translation language (eg {{ page.label|t(language='de') }}), it takes the EN language. All other languages are working. If I deactivate the plugin and just use the regular PHP translation files, it works without any issue.

Please let me know what you need to further investigate this issue. Thanks.

MischaSz commented 3 years ago

This is a major issue for us and help would really be appreciated. We cannot use your plugin in production this way. We're happy to support you with any information you need to solve this issue. Thanks.

MischaSz commented 3 years ago

I was able to identify the issue: As soon as the translation key and the translation is the same string, your plugin takes the wrong language for translation. For example:

Key = "Absenden" German = "Absenden" English = "Submit"

Current locale is German -> it shows the English translation...

MischaSz commented 3 years ago

Zero answer from the developer? This is a payed plugin and some kind of support should be provided...

smcyr commented 3 years ago

Hi, Sorry for the delay, I was on parental leave. I can't reproduce the problem on my end, could you give me the results from these two queries please:

SELECT * FROM sites
SELECT *
FROM source_message
INNER JOIN message ON message.id = source_message.id
WHERE message = "Absenden"

Thank you

MischaSz commented 3 years ago

Hi Samuel! Can I PM you the results? The site query contains customer names that we don't want to appear on Github. Or shall I remove them from the results and post it here?

smcyr commented 3 years ago

Yes, you can PM me and I will look into it, thanks!

smcyr commented 3 years ago

Should be fixed in 2.4.4, let me know if you have any problems, thanks