klaro-js icon indicating copy to clipboard operation
klaro-js copied to clipboard

Title of service not used in contextual consent if declared in service section

Open robinson2 opened this issue 5 years ago • 1 comments

Klaro Config

translations: {
    de: {
         googlemaps: {
            description: 'Darstellung von Karten',
        },
    },
},
services: [
    {
        name: 'googlemaps',
        purposes: ['externalmedia'],
        title: 'Google Maps',
    },
],

… results in: "Möchten Sie von Googlemaps bereitgestellte externe Inhalte laden?"

In order for the title to be displayed correctly ("Google Maps", not "Googlemaps"), it must be declared in the translation:

translations: {
    de: {
         googlemaps: {
            description: 'Darstellung von Karten',
            title: 'Google Maps',
        },
    },
},
services: [
    {
        name: 'googlemaps',
        purposes: ['externalmedia'],
    },
],

… results in: "Möchten Sie von Google Maps bereitgestellte externe Inhalte laden?"

Expected behavior

It would be nice if the title would be fetched from the service section if no translation is available.

robinson2 avatar Nov 23 '20 09:11 robinson2

Hi @robinson2! Yes that's a good point, we'll make this consistent, this will be in the upcoming release.

adewes avatar Nov 26 '20 10:11 adewes