question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Common property's types differ when comparing default GVL and translations.

See original GitHub issue

I noticed that typing of common properties in GVL and translations differ.

Here’s an example: GVL url: https://vendorlist.consensu.org/v2/vendor-list.json Translations url: https://vendorlist.consensu.org/v2/purposes-fr.json

If you compare types of objects in purposes, specialPurposes, features, specialFeatures and stacks you can see that in GVL those properties are maps while in translation files they are provided as arrays.

GVL purposes:

"purposes": {
    "1": {
        "id": 1,
        "name": "Store and/or access information on a device",
        "description": "Cookies, device identifiers, or other information can be stored or accessed on your device for the purposes presented to you.",
        "descriptionLegal": "Vendors can:\n* Store and access information on the device such as cookies and device identifiers presented to a user."
    },
    ...
}

Translated purposes:

"purposes": [
    {
        "1": {
            "id": 1,
            "name": "Stocker et/ou accéder à des informations stockées sur un terminal",
            "description": "Les cookies, identifiants de votre terminal ou autres informations peuvent être stockés ou consultés sur votre terminal pour les finalités qui vous sont présentées.",
            "descriptionLegal": "Les partenaires peuvent :\n* Stocker des informations et accéder à des informations stockées sur le terminal, comme les cookies et les identifiants du terminal présentés à un utilisateur.\n"
        }
    },
    ...
]

I’m writing this because API becomes inconsistent if you’re changing the language.

So if you’re using default language GVL, you have purposes as maps while if you change lanugage with changeLanguage, purposes become arrays.

I would recommend to unify this format (and always use IntMap), otherwise it’s inconsistent and can provide you with wrong information (e.g.: fetching with [id] returns the results both for maps and array but the result differs).

Here’s a sample of runnable code exposing this issue:

import { GVL } from '@iabtcf/core';
GVL.baseUrl = "http://cmp.mysupercoolcmp.com/";
let gvl = new GVL();
gvl.readyPromise.then(() =>{
    console.log("Purpose one from default GVL: ", gvl.purposes[1]);
    gvl.changeLanguage("fr").then(() => {
       console.log("Purpose one from translations: ", gvl.purposes[1]) ;
    });
});

P.S.: I would also mention that provided link in documentation is pointing to translations of TCF v1.1 framework and not to translations for v2.0 (For the full list of iab provided language translations click here. section of documentation).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
patrickverdoncommented, Feb 5, 2020

Thanks for raising this issue. We’re still finalising the translations and will get the format issue fixed asap. On your other points the purpose archives can be found here:

https://vendorlist.consensu.org/v2/archives/purposes/v22/purposes-fr.json

And the vendorListVersion inconsistency with the GVL has been fixed now, so the version in the translations will match the GVL.

0reactions
patrickverdoncommented, Feb 6, 2020

This will not happen again. We were testing the release process for the translations and although they were publicly available, they had not been fully tested and finalised. Everything is looking good now, so we will be issuing comms to the community that the translations are ready and available.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transparency and Consent String with Global Vendor & ...
This framework is built on four components: a Global Vendor List (GVL), a Transparency and Consent String (TC String), an API for Consent...
Read more >
SoMachine - Programming Guide - 02/2018
The information provided in this documentation contains general descriptions and/or technical characteristics of the performance of the products contained ...
Read more >
Object 'Symbol Configuration'
Here you configure the details of what should be included in the symbol configuration and XML file with respect to comments and attributes....
Read more >
IAB Europe Transparency & Consent Framework Policies
This document lays out the Policies applicable to participants in the IAB Europe Transparency & Consent Framework v2.0. Participants may include publishers, ...
Read more >
Ad Manager report dimensions
Shows the performance of different ad types. Possible ad types in reporting include: Text. Image.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found