MdnAgency / magento-cookie-consent

A simple cookie consent module for magento. It relies on new GTM consent functionality.
Open Software License 3.0
6 stars 4 forks source link

Unable to get content for 'frontend/****/Theme/nl_NL/Maisondunet_CookieConsent/translation.json' #3

Open Redouan-Hajjari opened 4 months ago

Redouan-Hajjari commented 4 months ago

Dear,

I get a error that says Unable to get content for 'frontend/****/Theme/nl_NL/Maisondunet_CookieConsent/translation.json' could you fix that?

Greetings

hgati commented 4 months ago

Dear,

I get a error that says Unable to get content for 'frontend/****/Theme/nl_NL/Maisondunet_CookieConsent/translation.json' could you fix that?

Greetings

I've fixed. Use the patch file below. https://github.com/hgati/magento-cookie-consent/commit/5c4364d67c7b6a3d2728bb9179b967d8658c4e4f.patch

vberthet commented 4 months ago

Hi,

If you declare your translated asset in your theme this should works.

Following the magento convention, you'll have to create a file named :

app/design/frontend/**/Maisondunet_CookieConsent/web/i18n/nl_NL/translation.json

image

vberthet commented 4 months ago

As an improvment we should fallback to en_US when the translation is missing instead of throwing an Exception. (See #4)