mindshape-GmbH / mindshape_cookie_consent

This extension provides functionality to create a customizable cookie consent for your website. It is developed for flexibility to be customized in accordance to your data security guidelines.
10 stars 13 forks source link

Translations not working / not usefull for multilang sites #26

Closed 22markets closed 2 years ago

22markets commented 2 years ago

Can't overwritte language labels with typoscript #20

this problem is not solved and the problem with the translated version (button / texts) is also not solved. So it is not working in multilanguage sites

featdd commented 2 years ago

Hi @22markets,

have you used the latest way for custom translations as refered in #20!?

As far as I know translations in TypoScript are not that favoured anymore. (correct me if I'm wrong)

Greetings Daniel

22markets commented 2 years ago

Hello Daniel,

I have tried to use the translation fields from the extension in the backend and the fields for the cookie groups and cookies in the located version. But the translated contents are not visible in version 2.0 and above. Only the values from the default language. Also the strings for necessary cookies and the deny buttons have no fields in the backend to be translated

Mit freundlichen Grüßen

Sebastian Lorenz

Langheimer Str. 60 --||-- D-96264 Altenkunstadt

fon: +49 9572-8729002 mobil: +49 172-8614459 email: @.***

Am 17.01.2022 um 19:40 schrieb Daniel Dorndorf @.***>:

Hi @22markets https://github.com/22markets,

have you used the latest way for custom translations https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/ApiOverview/Internationalization/ManagingTranslations.html#custom-translations as refered in #20 https://github.com/mindshape-GmbH/mindshape_cookie_consent/issues/20!?

As far as I know translations in TypoScript are not that favoured anymore. (correct me if I'm wrong)

Greetings Daniel

— Reply to this email directly, view it on GitHub https://github.com/mindshape-GmbH/mindshape_cookie_consent/issues/26#issuecomment-1014807617, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMP5HLR42VTG6YA5IZULVTUWRPB5ANCNFSM5MD7ONNA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.

featdd commented 2 years ago

Hi @22markets,

could you update the extension (2.1) and your TYPO3 instance to its latest versions and verify this still doesn't work?

I will try consider adding a custom label field for the deny button for the next update.

How did you add your custom translations, as explained in the documentation? Did you create a proper XLIFF file? Maybe have another look or please submit a bit more details of your implentation.

Greetings Daniel

SimonWpt commented 2 years ago

I have the same problems as @22markets

First language is german, second is english. I fill in BE the fields with german and english texts. Most text on english site are german.

image

image

SimonWpt commented 2 years ago

Second problem: I can't edit the necassary cookie.

image

Working with ddev, TYPO3 10.4.23 and mindshape_cookie_consent 2.1.2.

stephangrass commented 2 years ago

Same problems here ...

featdd commented 2 years ago

Hi @22markets, @SimonWpt, @stephangrass,

I managed to reproduce this, I don't know why the repository doesn't handle the language context properly, maybe it depends on an early instantiation stage in the hook or something.

I just wrote a patch and would be happy if some of you guys can confirm that it's also working for you.

See: 49b8e4a2655e03fcf8766fc0b610661a5c6737ca

Greetings Daniel

stephangrass commented 2 years ago

Hi @featdd,

thanks, it really looks like it works in the frontend.

But in the backend the error Call to undefined method Doctrine\DBAL\Driver\Mysqli\MysqliStatement::fetchAllAssociative() appears if you want to edit the consent configuration.

My TYPO3 10.4.24 installation is not based on composer ...

featdd commented 2 years ago

Hi @featdd,

thanks, it really looks like it works in the frontend.

But in the backend the error Call to undefined method Doctrine\DBAL\Driver\Mysqli\MysqliStatement::fetchAllAssociative() appears if you want to edit the consent configuration.

My TYPO3 10.4.24 installation is not based on composer ...

Have you installed the latest TYPO3 v10?

stephangrass commented 2 years ago

Have you installed the latest TYPO3 v10?

Yes: TYPO3 10.4.24

featdd commented 2 years ago

HI @stephangrass,

the issue is caused by the none composer installation, I have a composer installation wich provides a forward compatibility package with the methods used in v11.

I replaced all methods with the proper v10 variants, see: c8409cf5cb118c064423888c284ee02ea3fb1446

May you have another try? I will try to release an Update next week.

Greetings Daniel

stephangrass commented 2 years ago

Hi @featdd

thanks a lot! Unfortunately, I have some installations that cannot be switched to Composer for various reasons. And I guess I'm not the only one with this...

But there is still one more place where fetchAllAssociative() is used:

Call to undefined method Doctrine\DBAL\Driver\Mysqli\MysqliStatement::fetchAllAssociative() in /Users/stephangrass/Documents/_Webs_/kirchhoff-mobility.com/typo3/www/typo3conf/ext/mindshape_cookie_consent/Classes/UserFunc/ConfigurationTcaUserFunc.php line 61

Greetings Stephan

featdd commented 2 years ago

@stephangrass have you checked out the correct commit?

I amended the changes to the bugfix commit, see this commit: 85c38de8d2f9325f683a0f4b4821b4f1426468fc

stephangrass commented 2 years ago

Argh, ok. Thanks. I will try it later.

nice weekend Stephan

stephangrass commented 2 years ago

Moin Daniel, thanks a lot, it looks really good now.

Stephan

featdd commented 2 years ago

@stephangrass @SimonWpt @22markets Update 2.1.3 with this fix is available in TER