Closed jossensei closed 2 years ago
I've created an draft pull request to have an idea of the changes in translation files https://github.com/kiprotect/klaro/pull/452
I 've juste updated to pull request to keep compatibility with current configuration format, and enhance getLinks to not look directly at "config" but use a modified version of t() to get subkeys of a specified key.
I'll just use html description finally.
Description texts can only have a privacyPolicy link. I've a case where I need to also add e cookiePolicy link.
Instead of hardcoding each link, I've thought of a solution where an unlimited number of links could be added in the config file like:
So we can use {privacyPolicyText} (if the url is set), {privacyPolicy} or {cookiePolicy} (or cookiePolicyText if we set a "text" key in cookiePolicy)
In the utils/config.js we could export a getLinks function like
And then in the consent-notice.jsx and consent-modal.jsx we could remove all the ppUrl and ppLink code to just add the links in the description :