eibiflo / cf_cookiemanager

Simple Typo3 Cookie Manager
GNU General Public License v2.0
10 stars 5 forks source link

Problems with translations from iframemanager #30

Closed stillerfritz closed 5 months ago

stillerfritz commented 5 months ago

contrary to a system with typo3 v11 and cf_cookiemanager v1.4.4 the translation of buttons and text on embedded videos (vimeo) does not work in a new installation with typo3 v12 and cf_cookiemanager v1.6. these are always displayed in German. configuration is the same as in the working example except it is a multidomain installation with .com is handling the EN-pages and .de the German version. can you retrace the issue?

eibiflo commented 5 months ago

Hey @stillerfritz and thanks for your Issue. In my demo version, I can't fully replicate the issue, at least not with a new installation, and right sites config.

We've previously encountered a similar problem, but it only affected old installations, or there was an issue with database references. Initially, I only set the sys_language_uid, and now I'm also using the storage hash to store a file.

The Magic happens here: https://github.com/eibiflo/cf_cookiemanager/blob/main/Classes/Controller/CookieFrontendController.php#L97

Let me isolate the problem so I can reproduce it.

Are the languages displayed correctly in the backend? The importer https://github.com/eibiflo/cf_cookiemanager/blob/main/Classes/Updates/StaticDataUpdateWizard.php uses the locale settings from the config.yaml to pre-populate the database with the samples from my external API, maybe here all Locales are DE?

Can you try to find out something about this? In the Backend you should be able to switch the Language of a Root site in the Backend Module, if its the Right language its a code bug, if its not right in the Backend the Imporer did something wrong. Maybe you can share your site config anonymized?

eibiflo commented 5 months ago

@stillerfritz Is there any information on this? Otherwise, I will close the issue since I cannot replicate it.

stillerfritz commented 5 months ago

sorry for leaving you hanging. 1) everything else gets translated just right. Texts, Buttons and Cookie explanations 2) the backend switch seems to work fine. vimeo text and buttons change to the lang displayed by the selector 3) from config.yaml

` base: 'https://xxx.de' languages:

title: Deutsch
enabled: true
languageId: 0
base: /
locale: de_DE.UTF-8
navigationTitle: Deutsch
flag: de
hreflang: de-DE
websiteTitle: ''

- title: English enabled: true locale: en_US.UTF-8 hreflang: en-US base: 'https://xxx.com/' websiteTitle: 'xxx' navigationTitle: English fallbackType: strict fallbacks: '' flag: gb languageId: 1 ` as said. in another installation with version 1.4.4 everything translates right thank you very much for your support in this matter

eibiflo commented 5 months ago

I've now replicated it exactly. It will be fixed and released with the next version.

I still need to check why this all worked in version 1.4, it confuses me a bit.

Thanks for the tip!

stillerfritz commented 5 months ago

I can confirm. it works now. great work!