AlanOC91 / YGOPRODeck

Yu-Gi-Oh! Card Database and Deck Share Site
81 stars 4 forks source link

Set-Code localization across multiple Languages #516

Open ardesan opened 1 week ago

ardesan commented 1 week ago

Hi ygoprodeck Team,

i noticed that the language locale specific card info for de, pt, it, and fr only contains the set codes (print codes) in English, instead of the language-specific set codes.

An example:

https://db.ygoprodeck.com/api/v7/cardinfo.php?language=de

The ID "20036055" contains the set codes:

However, in the German language, the correct set codes (printcodes) would be:

Since it is not as simple as just replacing "EN" with "DE" (or "E" with "G"), I took the time to correct the set codes in my dataset for all card IDs in the ygoprodeck database that contain a konami_id.

I have attached a dump for de, pt, it, and fr. There are 12.802 records per language.

The format looks like this:

"20036055": {
    "konami_id": 11321,
    "cards": [
        {
            "set_code": "PGL3-DE097",
            "rarity": "Gold Rare"
        },
        {
            "set_code": "DUEA-DE086",
            "rarity": "Super Rare"
        }
    ]
}

Based on the set prefix in combination with the rarity, my hope is that the set codes for each language in the ygoprodeck API can be replaced and corrected accordingly. I have also attached a file containing the ids that I was unable to correct yet.

The dataset is based on YGOPRODeck DB version 137.41. In the meantime, some new cards have likely been added, which I can provide later when I update my dataset in a future iteration. I hope that the current data can help correct a large portion of the entries.

de.json fr.json it.json pt.json missing.json