Card db refactoring (#105)

* Code refactoring for card db change (#86)
This assumes the following file structure:
```
card_db/
    cards_db.json
    sets_db.json
    <language>/
        cards_text.json
        sets_text.json
```
Files that are needed are:

- cards_db.json
- cards_text.json and sets_text.json for each supported language

**Other changes:**

Added option called `--edition` that can be "1", "2", "latest", or "all". Defaults to "all".
This allows for a quick filtering for those that don't want everything (i.e., "all").

- "1" is for all 1st editions of expansions. It also includes 2nd edition update packs.
- "2" is for all 2nd editions of expansions. So base, Dominion 2nd ed., and Intrigue 2nd ed. (no update packs, since already in 2nd edition)
- "latest" is for base, Dominion 2nd ed., and Intrigue 2nd ed., and all the remaining 1st editions.

Cards can be grouped 3 ways:

- No grouping (default)
- In expansion grouping invoked with `--special_card_groups`.
- Grouping across expansions with `--exclude_events` and `--exclude_landmarks`.  These groups are placed in a set called "Extras".   `--exclude_prizes` is not currently implemented.

Added an option called `--upgrade_with_expansion` which will put the upgraded cards into the corresponding earlier expansion.  So all 1st edition cards as well as the upgrade cards appear in the 1st edition set.  That way the cards are listed on the expansion dividers and any tab/ordering fit the expansion as a whole.  And because of the deleted cards in 2nd edition, this is a different list of cards than just using the 2nd edition.

* update set image mapping for 2nd edition icons
* add improved set icons from https://boardgamegeek.com/filepage/73273/dominion-card-icons-vector-images
* recompress all images
* new format for cards_db.json and translations
* Added short name to sets
* Updates to allow blank set images for base cards and fix blank set image for the "Extras" set.  Also removed base_set.png which is no longer needed (again!)
* scaled all set images to be exactly 300 x 300 pixels for consistency and better printing
* Updated __init__.py and cards.py to automatically find the "lowest cost" value from all the cards in a group.
* Update carddb_tests.py
  * Updated set information in testcases
  * Changed test of cardset to test cardset_tag instead.  Since that is what everything keys off of now.
  * Updated the language tests to pull in the language parts before making the check.
* Standardize on ISO8859-15 (#98)
* Remove Trash Card from 2nd edition, replace HTML line breaks & unicode
* Better Error Handling for Font Errors
* Added text formating codes
Added text formatting codes for "extra" and "description" fields.  This includes:
<tab> and <t> to add a tab (4 spaces)
<n> as an alternative to \n (hard new line)
<br> as an alternative to <br /> (soft new line)
<c> and <center> to center text in this paragraph until the next hard new line
<l> and <left> to left align text in this paragraph until the next hard new line
<r> and <right> to right align text in this paragraph until the next hard new line.
<line> to add a hard new line, a centered dividing line, and a trailing hard new line.
<line> to put a centered line
This goes with the <b>..</b> for bold, <i>..</i> for italics, and <u>..</u> for underline that was already existing (but probably not remembered.
* Update card count presentation (#116)
* wvoigt added automatic bonus highlighting (#119)
This commit is contained in:
Nick Vance authored and Peter committed 2016-12-10 21:05:34 -08:00
1 parent 3b732fa47f
commit 250a9e4b51
135 files changed
+20228 -14089

No files matched your search

+399
View File
@@ -0,0 +1,399 @@
"Set","card_tag","en_us","de","it","fr"
"Adventures","Amulet","Amulet","Amulett",,"Amulette"
"Adventures","Lost Arts","Lost Arts","Verlorene Kunst",,"Arts anciens"
"Adventures","Alms","Alms","Almosen",,"Aumône"
"Adventures","Ferry","Ferry","Überfahrt",,"Bac"
"Adventures","Ball","Ball","Ball",,"Bal"
"Adventures","Haunted Woods","Haunted Woods","Geisterwald",,"Bois hantés"
"Adventures","Champion","Champion","Champion",,"Championne"
"Adventures","Ratcatcher","Ratcatcher","Rattenfänger",,"Chasseur de rats"
"Adventures","Treasure Hunter","Treasure Hunter","Schatzsucher",,"Chasseuse de Trésors"
"Adventures","Lost City","Lost City","Verlorene Stadt",,"Cité perdue"
"Adventures","Trade","Trade","Handel",,"Commerce"
"Adventures","Storyteller","Storyteller","Geschichtenerzähler",,"Conteuse"
"Adventures","Duplicate","Duplicate","Duplikat",,"Copie"
"Adventures","Royal Carriage","Royal Carriage","Königliche Kutsche",,"Cortège royal"
"Adventures","Messenger","Messenger","Kurier",,"Courrier"
"Adventures","Raze","Raze","Zerstörung",,"Démolition"
"Adventures","Disciple","Disciple","Schüler",,"Disciple"
"Adventures","Dungeon","Dungeon","Verlies",,"Donjon"
"Adventures","Borrow","Borrow","Leihgabe",,"Emprunt"
"Adventures","Training","Training","Training",,"Entraînement"
"Adventures","Gear","Gear","Ausrüstung",,"Équipement"
"Adventures","Caravan Guard","Caravan Guard","Karawanenwächter",,"Escorte"
"Adventures","Expedition","Expedition","Expedition",,"Expédition"
"Adventures","Bonfire","Bonfire","Freudenfeuer",,"Feu de joie"
"Adventures","Travelling Fair","Travelling Fair","Wanderzirkus",,"Forains"
"Adventures","Ranger","Ranger","Wildhüter",,"Forestier"
"Adventures","Fugitive","Fugitive","Flüchtling",,"Fugitif"
"Adventures","Giant","Giant","Riese",,"Géant"
"Adventures","Warrior","Warrior","Krieger",,"Guerrière"
"Adventures","Guide","Guide","Kundschafter",,"Guide"
"Adventures","Inheritance","Inheritance","Erbschaft",,"Héritage"
"Adventures","Hero","Hero","Held",,"Héroïne"
"Adventures","Teacher","Teacher","Lehrer",,"Maître"
"Adventures","Artificer","Artificer","Kunsthandwerker",,"Maître-artisan"
"Adventures","Wine Merchant","Wine Merchant","Weinhändler",,"Marchand de vin"
"Adventures","Miser","Miser","Geizhals",,"Miséreux"
"Adventures","Mission","Mission","Mission",,"Mission"
"Adventures","Coin of the Realm","Coin of the Realm","Königliche Münzen",,"Monnaie Royale"
"Adventures","Page","Page","Page",,"Page"
"Adventures","Peasant","Peasant","Kleinbauer",,"Paysan"
"Adventures","Pilgrimage","Pilgrimage","Pilgerfahrt",,"Pèlerinage"
"Adventures","Magpie","Magpie","Elster",,"Pie voleuse"
"Adventures","Treasure Trove","Treasure Trove","Schatz",,"Pierres précieuses"
"Adventures","Scouting Party","Scouting Party","Spähtrupp",,"Pistage"
"Adventures","Plan","Plan","Planung",,"Plan de Bataille"
"Adventures","Bridge Troll","Bridge Troll","Brückentroll",,"Pont aux Trolls"
"Adventures","Quest","Quest","Quest",,"Quête"
"Adventures","Raid","Raid","Überfall",,"Raid"
"Adventures","Pathfinding","Pathfinding","Wegsuche",,"Reconnaissance"
"Adventures","Hireling","Hireling","Gefolgsmann",,"Recrue"
"Adventures","Relic","Relic","Relikt",,"Relique"
"Adventures","Save","Save","Zuflucht",,"Resserre"
"Adventures","Seaway","Seaway","Seeweg",,"Route Maritime"
"Adventures","Soldier","Soldier","Soldat",,"Soldat"
"Adventures","Swamp Hag","Swamp Hag","Sumpfhexe",,"Sorcière des marais"
"Adventures","Distant Lands","Distant Lands","Ferne Lande",,"Terres lointaines"
"Adventures","Transmogrify","Transmogrify","Transformation",,"Transfiguration"
"Adventures","Port","Port","Hafenstadt",,"Ville portuaire"
"Alchemy","Alchemist","Alchemist","Alchemist","Alchimista","Alchimiste"
"Alchemy","Apothecary","Apothecary","Apotheker","Farmacista","Apothicaire"
"Alchemy","Apprentice","Apprentice","Lehrling","Apprendista","Apprenti"
"Alchemy","Scrying Pool","Scrying Pool","Vision","Divinazione","Bassin divinatoire"
"Alchemy","Familiar","Familiar","Vertrauter","Famiglio","Familier"
"Alchemy","Golem","Golem","Golem","Golem","Golem"
"Alchemy","Herbalist","Herbalist","Kräuterkundiger","Erborista","Herboriste"
"Alchemy","Philosopher's Stone","Philosopher's Stone","Stein der Weisen","Pietra Filosofale","Pierre philosophale"
"Alchemy","Possession","Possession","Besessenheit","Possessione","Possession"
"Alchemy","Potion","Potion","Trank","Pozione","Potion"
"Alchemy","Transmute","Transmute","Verwandlung","Trasmutazione","Transmutation"
"Alchemy","University","University","Universität","Università","Université"
"Alchemy","Vineyard","Vineyard","Weinberg","Vigna","Vignoble"
"Base","Silver","Silver","Silber","Argento","Argent"
"Base","Copper","Copper","Kupfer","Rame","Cuivre"
"Base","Estate","Estate","Anwesen","Tenuta","Domaine"
"Base","Duchy","Duchy","Herzogtum","Ducato","Duché"
"Base","Curse","Curse","Fluch","Maledizione","Malédiction"
"Base","Gold","Gold","Gold","Oro","Or"
"Base","Province","Province","Provinz","Provincia","Province"
"Base","Trash","Trash","Müll","Carte Eliminate",
"Cornucopia","Jester","Jester","Harlekin","Giullare","Bouffon"
"Cornucopia","Fairgrounds","Fairgrounds","Festplatz","Mercatino","Champ de foire"
"Cornucopia","Hunting Party","Hunting Party","Treibjagd","Battuta di Caccia","Chasseurs"
"Cornucopia","Horn of Plenty","Horn of Plenty","Füllhorn","Cornucopia","Corne d'abondance"
"Cornucopia","Diadem","Diadem","Diadem","Diadema","Diadème"
"Cornucopia","Fortune Teller","Fortune Teller","Wahrsagerin","Indovina","Diseuse de bonne aventure"
"Cornucopia","Trusty Steed","Trusty Steed","Streitross","Destriero Fedele","Fidèle destrier"
"Cornucopia","Hamlet","Hamlet","Weiler","Borgo","Hameau"
"Cornucopia","Young Witch","Young Witch","Junge Hexe","Giovane Strega","Jeune sorcière"
"Cornucopia","Horse Traders","Horse Traders","Pferdehändler","Mercanti di Cavalli","Maquignons"
"Cornucopia","Menagerie","Menagerie","Menagerie","Serraglio","Ménagerie"
"Cornucopia","Followers","Followers","Gefolge","Seguaci","Partisans"
"Cornucopia","Princess","Princess","Prinzessin","Principessa","Princesse"
"Cornucopia","Harvest","Harvest","Ernte","Mietitura","Récolte"
"Cornucopia","Remake","Remake","Nachbau","Rifacimento","Renouvellement"
"Cornucopia","Bag of Gold","Bag of Gold","Ein Sack voll Gold","Borsa d'Oro","Sac d'or"
"Cornucopia","Tournament","Tournament","Turnier","Torneo","Tournoi"
"Cornucopia","Farming Village","Farming Village","Bauerndorf","Villaggio Agricolo","Village agricole"
"Dark Ages","Armory","Armory","Waffenkammer",,"Armurerie"
"Dark Ages","Altar","Altar","Altar",,"Autel"
"Dark Ages","Rogue","Rogue","Schurke",,"Bandit"
"Dark Ages","Ruined Library","Ruined Library","Zerstörte Bibliothek",,"Bibliothèque en ruines"
"Dark Ages","Junk Dealer","Junk Dealer","Schrotthändler",,"Brocanteur"
"Dark Ages","Spoils","Spoils","Beute",,"Butin"
"Dark Ages","Hovel","Hovel","Hütte",,"Cabane"
"Dark Ages","Bandit Camp","Bandit Camp","Banditenlager",,"Camp de bandits"
"Dark Ages","Catacombs","Catacombs","Katakomben",,"Catacombes"
"Dark Ages","Death Cart","Death Cart","Leichenkarren",,"Charrette de cadavres"
"Dark Ages","Knights","Knights","Ritter",,"Chevalier"
"Dark Ages","Count","Count","Graf",,"Comte"
"Dark Ages","Counterfeit","Counterfeit","Falschgeld",,"Contrefaçon"
"Dark Ages","Forager","Forager","Mundraub",,"Cueilleur"
"Dark Ages","Cultist","Cultist","Kultist",,"Cultiste"
"Dark Ages","Overgrown Estate","Overgrown Estate","Verfallenes Anwesen",,"Domaine luxuriant"
"Dark Ages","Squire","Squire","Knappe",,"Écuyer"
"Dark Ages","Hermit","Hermit","Eremit",,"Ermite"
"Dark Ages","Ironmonger","Ironmonger","Eisenhändler",,"Ferronnier"
"Dark Ages","Feodum","Feodum","Lehen",,"Fief"
"Dark Ages","Fortress","Fortress","Festung",,"Forteresse"
"Dark Ages","Madman","Madman","Verrückter",,"Fou"
"Dark Ages","Poor House","Poor House","Armenhaus",,"Hospice"
"Dark Ages","Band of Misfits","Band of Misfits","Vogelfreie",,"Malfaiteurs"
"Dark Ages","Marauder","Marauder","Marodeur",,"Maraudeur"
"Dark Ages","Ruined Market","Ruined Market","Zerstörter Markt",,"Marché en ruines"
"Dark Ages","Beggar","Beggar","Bettler",,"Mendiant"
"Dark Ages","Wandering Minstrel","Wandering Minstrel","Barde",,"Ménestrel errant"
"Dark Ages","Mercenary","Mercenary","Söldner",,"Mercenaire"
"Dark Ages","Abandoned Mine","Abandoned Mine","Verlassene Mine",,"Mine abandonnée"
"Dark Ages","Mystic","Mystic","Medium",,"Mystique"
"Dark Ages","Necropolis","Necropolis","Totenstadt",,"Nécropole"
"Dark Ages","Urchin","Urchin","Gassenjunge",,"Orphelin"
"Dark Ages","Pillage","Pillage","Raubzug",,"Pillage"
"Dark Ages","Scavenger","Scavenger","Lumpensammler",,"Pilleur"
"Dark Ages","Graverobber","Graverobber","Grabräuber",,"Pilleur de tombes"
"Dark Ages","Market Square","Market Square","Marktplatz",,"Place du marché"
"Dark Ages","Procession","Procession","Prozession",,"Procession"
"Dark Ages","Rats","Rats","Ratten",,"Rats"
"Dark Ages","Rebuild","Rebuild","Neubau",,"Reconstruction"
"Dark Ages","Survivors","Survivors","Überlebende",,"Rescapés"
"Dark Ages","Sage","Sage","Weiser",,"Sage"
"Dark Ages","Storeroom","Storeroom","Lagerraum",,"Salle d'entreposage"
"Dark Ages","Hunting Grounds","Hunting Grounds","Jagdgründe",,"Territoire de chasse"
"Dark Ages","Vagrant","Vagrant","Landstreicher",,"Vagabond"
"Dark Ages","Ruined Village","Ruined Village","Zerstörtes Dorf",,"Ville en ruines"
"Dominion 1","Adventurer","Adventurer","Abenteurer","Esploratore","Aventurier"
"Dominion 1","Woodcutter","Woodcutter","Holzfäller","Taglialegna","Bûcheron"
"Dominion 1","Chancellor","Chancellor","Kanzler","Cancelliere","Chancelier"
"Dominion 1","Spy","Spy","Spion","Spia","Espion"
"Dominion 1","Feast","Feast","Festmahl","Banchetto","Festin"
"Dominion 1","Thief","Thief","Dieb","Ladro","Voleur"
"Dominion 1 & 2","Workshop","Workshop","Werkstatt","Officina","Atelier"
"Dominion 1 & 2","Library","Library","Bibliothek","Biblioteca","Bibliothèque"
"Dominion 1 & 2","Bureaucrat","Bureaucrat","Bürokrat","Burocrate","Bureaucrate"
"Dominion 1 & 2","Cellar","Cellar","Keller","Sotterraneo","Cave"
"Dominion 1 & 2","Council Room","Council Room","Ratsversammlung","Sala del Consiglio","Chambre du conseil"
"Dominion 1 & 2","Chapel","Chapel","Kapelle","Cappella","Chapelle"
"Dominion 1 & 2","Moat","Moat","Burggraben","Fossato","Douves"
"Dominion 1 & 2","Festival","Festival","Jahrmarkt","Fiera","Festival"
"Dominion 1 & 2","Smithy","Smithy","Schmiede","Fucina","Forgeron"
"Dominion 1 & 2","Gardens","Gardens","Gärten","Giardini","Jardins"
"Dominion 1 & 2","Laboratory","Laboratory","Laboratorium","Laboratorio","Laboratoire"
"Dominion 1 & 2","Market","Market","Markt","Mercato","Marché"
"Dominion 1 & 2","Militia","Militia","Miliz","Milizia","Milice"
"Dominion 1 & 2","Mine","Mine","Mine","Miniera","Mine"
"Dominion 1 & 2","Moneylender","Moneylender","Geldverleiher","Usuraio","Prêteur sur gages"
"Dominion 1 & 2","Remodel","Remodel","Umbau","Miglioria","Rénovation"
"Dominion 1 & 2","Throne Room","Throne Room","Thronsaal","Sala del Trono","Salle du Trône"
"Dominion 1 & 2","Witch","Witch","Hexe","Strega","Sorcière"
"Dominion 1 & 2","Village","Village","Dorf","Villaggio","Village"
"Dominion 2","Artisan","Artisan",,,
"Dominion 2","Bandit","Bandit",,,
"Dominion 2","Harbinger","Harbinger",,,
"Dominion 2","Merchant","Merchant",,,
"Dominion 2","Poacher","Poacher",,,
"Dominion 2","Vassal","Vassal",,,
"Dominion 2","Sentry","Sentry",,,
"Empires","Aqueduct","Aqueduct","Aquädukt",,
"Empires","Archive","Archive","Archiv",,
"Empires","Arena","Arena","Arena",,
"Empires","Advance","Advance","Aufstieg",,
"Empires","Sprawling Castle","Sprawling Castle","Ausgedehntes Schloss",,
"Empires","Baths","Baths","Badehaus",,
"Empires","Banquet","Banquet","Bankett",,
"Empires","Basilica","Basilica","Basilika",,
"Empires","Farmers' Market","Farmers' Market","Bauernmarkt",,
"Empires","Dominate","Dominate","Beherrschen",,
"Empires","Humble Castle","Humble Castle","Bescheidenes Schloss",,
"Empires","Keep","Keep","Bollwerk",,
"Empires","Fountain","Fountain","Brunnen",,
"Empires","Plunder","Plunder","Diebesgut",,
"Empires","Bustling Village","Bustling Village","Emsiges Dorf",,
"Empires","Defiled Shrine","Defiled Shrine","Entweihter Schrein",,
"Empires","Delve","Delve","Erforschen",,
"Empires","Conquest","Conquest","Eroberung",,
"Empires","Encampment","Encampment","Feldlager",,
"Empires","Rocks","Rocks","Felsen",,
"Empires","Forum","Forum","Forum",,
"Empires","Groundskeeper","Groundskeeper","Gärtnerin",,
"Empires","Mountain Pass","Mountain Pass","Gebirgspass",,
"Empires","Windfall","Windfall","Glüksfall",,
"Empires","Gladiator","Gladiator","Gladiator",,
"Empires","Tomb","Tomb","Grabmal",,
"Empires","Emporium","Emporium","Handelsplatz",,
"Empires","Wedding","Wedding","Hochzeit",,
"Empires","Engineer","Engineer","Ingenieurin",,
"Empires","Royal Blacksmith","Royal Blacksmith","Königlicher Schmied",,
"Empires","King's Castle","King's Castle","Königsschloss",,
"Empires","Catapult","Catapult","Katapult",,
"Empires","Small Castle","Small Castle","Kleines Schloss",,
"Empires","Colonnade","Colonnade","Kolonnaden",,
"Empires","Crown","Crown","Krone",,
"Empires","Labyrinth","Labyrinth","Labyrinth",,
"Empires","Legionary","Legionary","Legionär",,
"Empires","Overlord","Overlord","Lehnsherr",,
"Empires","Wall","Wall","Mauer",,
"Empires","Museum","Museum","Museum",,
"Empires","Obelisk","Obelisk","Obelisk",,
"Empires","Orchard","Orchard","Obstgarten",,
"Empires","Sacrifice","Sacrifice","Opfer",,
"Empires","Palace","Palace","Palast",,
"Empires","Patrician","Patrician","Patrizier",,
"Empires","Grand Castle","Grand Castle","Prunkschloss",,
"Empires","Bandit Fort","Bandit Fort","Räuberfestung",,
"Empires","Opulent Castle","Opulent Castle","Reiches Schloss",,
"Empires","Fortune","Fortune","Reichtum",,
"Empires","Ritual","Ritual","Ritual",,
"Empires","Castles","Castles","Schlösser",,
"Empires","Annex","Annex","Schlacht",,
"Empires","Battlefield","Battlefield","Schlachtfeld",,
"Empires","Settlers","Settlers","Siedler",,
"Empires","Triumph","Triumph","Siegeszug",,
"Empires","Donate","Donate","Spende",,
"Empires","Haunted Castle","Haunted Castle","Spukschloss",,
"Empires","City Quarter","City Quarter","Stadtviertel",,
"Empires","Tax","Tax","Steuer",,
"Empires","Temple","Temple","Tempel",,
"Empires","Triumphal Arch","Triumphal Arch","Triumphbogen",,
"Empires","Tower","Tower","Turm",,
"Empires","Crumbling Castle","Crumbling Castle","Verfallendes Schloss",,
"Empires","Capital","Capital","Vermögen",,
"Empires","Salt the Earth","Salt the Earth","Versalztes Land",,
"Empires","Villa","Villa","Villa",,
"Empires","Chariot Race","Chariot Race","Wagenrennen",,
"Empires","Wild Hunt","Wild Hunt","Wilde Jagd",,
"Empires","Wolf Den","Wolf Den","Wolfsbau",,
"Empires","Charm","Charm","Zauber",,
"Empires","Enchantress","Enchantress","Zauberin",,
"Groups","Urchin - Mercenary","Urchin / Mercenary","Gassenjunge / Söldner",,"Orphelin / Mercenaire"
"Groups","Sauna - Avanto","Sauna / Avanto","Sauna / Eisloch",,
"Groups","Tournament and Prizes","Tournament and Prizes","Turnier und Preise",,
"Groups","Hermit - Madman","Hermit / Madman","Eremit / Verrückter",,
"Groups","Shelters","Shelters","Unterschlupfe",,
"Groups","Settlers - Bustling Village","Settlers / Bustling Village","Siedler / Emsiges Dorf",,
"Groups","Catapult - Rocks","Catapult / Rocks","Katapult / Felsen",,
"Groups","Encampment - Plunder","Encampment / Plunder","Feldlager / Diebesgut",,
"Groups","Gladiator - Fortune","Gladiator / Fortune","Gladiator / Reichtum",,
"Groups","Patrician - Emporium","Patrician / Emporium","Patrizier / Handelsplatz",,
"Groups","adventures events","Events Adventures","Ereignisse Abenteuer",,
"Groups","empires events","Events Empires","Ereignisse Empires",,
"Groups","promo events","Events Promo","Ereignisse Promo",,
"Groups","events","Events","Ereignisse",,
"Groups","empires landmarks","Landmarks Empires","Wahrzeichen Empires",,
"Groups","landmarks","Landmarks","Wahrzeichen",,
"Groups","Page -> Champion","Page -> Champion","Page -> Champion",,
"Groups","Peasant -> Teacher","Peasant -> Teacher","Kleinbauer -> Lehrer",,
"Groups","Ruins","Ruins","Ruinen","Rovine","Ruines"
"Guilds","Butcher","Butcher","Metzger",,"Boucher"
"Guilds","Baker","Baker","Bäcker",,"Boulanger"
"Guilds","Masterpiece","Masterpiece","Meisterstück",,"Chef-d'½uvre"
"Guilds","Candlestick Maker","Candlestick Maker","Leuchtenmacher",,"Cirier"
"Guilds","Journeyman","Journeyman","Wandergeselle",,"Compagnon"
"Guilds","Advisor","Advisor","Berater",,"Conseiller"
"Guilds","Soothsayer","Soothsayer","Wahrsager",,"Devin"
"Guilds","Merchant Guild","Merchant Guild","Kaufmannsgilde",,"Guilde des Marchands"
"Guilds","Herald","Herald","Herold",,"Héraut"
"Guilds","Doctor","Doctor","Arzt",,"Médecin"
"Guilds","Taxman","Taxman","Steuereintreiber",,"Percepteur"
"Guilds","Plaza","Plaza","Platz",,"Place du village"
"Guilds","Stonemason","Stonemason","Steinmetz",,"Tailleur de pierre"
"Hinterlands","Embassy","Embassy","Botschaft","Diplomatico","Ambassade"
"Hinterlands","Ill-Gotten Gains","Ill-Gotten Gains","Blutzoll","Infame Profitto","Argent noir"
"Hinterlands","Inn","Inn","Gasthaus","Locanda","Auberge"
"Hinterlands","Cache","Cache","Schatztruhe","Forziere","Cache"
"Hinterlands","Nomad Camp","Nomad Camp","Nomadencamp","Campo Nomadi","Campement nomade"
"Hinterlands","Crossroads","Crossroads","Wegkreuzung","Incrocio","Carrefour"
"Hinterlands","Cartographer","Cartographer","Kartograph","Cartografo","Cartographe"
"Hinterlands","Scheme","Scheme","Komplott","Macchinazione","Complot"
"Hinterlands","Develop","Develop","Aufbau","Sviluppo","Développement"
"Hinterlands","Duchess","Duchess","Herzogin","Duchessa","Duchesse"
"Hinterlands","Stables","Stables","Stallungen","Stalla","Écuries"
"Hinterlands","Mandarin","Mandarin","Mandarin","Mandarino","Mandarin"
"Hinterlands","Spice Merchant","Spice Merchant","Gewürzhändler","Mercante di Spezie","Marchand d'épices"
"Hinterlands","Haggler","Haggler","Feilscher","Contrattazione","Marchandeur"
"Hinterlands","Margrave","Margrave","Markgraf","Margravio","Margrave"
"Hinterlands","Noble Brigand","Noble Brigand","Edler Räuber","Ladro Gentiluomo","Noble brigand"
"Hinterlands","Oasis","Oasis","Oase","Oasi","Oasis"
"Hinterlands","Fool's Gold","Fool's Gold","Katzengold","Oro dello Stolto","Or des fous"
"Hinterlands","Oracle","Oracle","Orakel","Oracolo","Oracle"
"Hinterlands","Highway","Highway","Fernstraße","Strada Maestra","Route"
"Hinterlands","Silk Road","Silk Road","Seidenstraße","Via della Seta","Route de la soie"
"Hinterlands","Farmland","Farmland","Fruchtbares Land","Terra Coltivata","Terre agricole"
"Hinterlands","Jack of all Trades","Jack of all Trades","Lebenskünstler","Tuttofare","Touche-à-tout"
"Hinterlands","Trader","Trader","Fahrender Händler","Commerciante","Troqueuse"
"Hinterlands","Tunnel","Tunnel","Tunnel","Galleria","Tunnel"
"Hinterlands","Border Village","Border Village","Grenzdorf","Villaggio di Frontiera","Village frontalier"
"Intrigue 1","Secret Chamber","Secret Chamber","Geheimkammer","Stanza Segreta","Chambre secrète"
"Intrigue 1","Coppersmith","Coppersmith","Kupferschmied","Battirame","Chaudronnier"
"Intrigue 1","Scout","Scout","Späher","Scout","Éclaireur"
"Intrigue 1","Great Hall","Great Hall","Große Halle","Grande Salone","Grand Hall"
"Intrigue 1","Tribute","Tribute","Tribut","Tributo","Hommage"
"Intrigue 1","Saboteur","Saboteur","Saboteur","Sabotatore","Saboteur"
"Intrigue 1 & 2","Baron","Baron","Baron","Barone","Baron"
"Intrigue 1 & 2","Torturer","Torturer","Kerkermeister","Carceriere","Bourreau"
"Intrigue 1 & 2","Trading Post","Trading Post","Handelposten","Stazione Commerciale","Comptoir"
"Intrigue 1 & 2","Conspirator","Conspirator","Verschwörer","Cospiratore","Conspirateur"
"Intrigue 1 & 2","Courtyard","Courtyard","Burghof","Cortile di Campagna","Cour"
"Intrigue 1 & 2","Duke","Duke","Herzog","Duca","Duc"
"Intrigue 1 & 2","Swindler","Swindler","Trickser","Truffatore","Escroc"
"Intrigue 1 & 2","Ironworks","Ironworks","Eisenhütte","Fonderia","Fonderie"
"Intrigue 1 & 2","Harem","Harem","Harem","Harem","Harem"
"Intrigue 1 & 2","Steward","Steward","Verwalter","Maggiordomo","Intendant"
"Intrigue 1 & 2","Minion","Minion","Lakai","Tirapiedi","Larbin"
"Intrigue 1 & 2","Masquerade","Masquerade","Maskerade","Ballo in Maschera","Mascarade"
"Intrigue 1 & 2","Upgrade","Upgrade","Anbau","Potenziamento","Mise à niveau"
"Intrigue 1 & 2","Nobles","Nobles","Adelige","Nobili","Nobles"
"Intrigue 1 & 2","Pawn","Pawn","Handlanger","Pedina","Pion"
"Intrigue 1 & 2","Bridge","Bridge","Brücke","Ponte","Pont"
"Intrigue 1 & 2","Wishing Well","Wishing Well","Wunschbrunnen","Pozzo dei Desideri","Puits aux souhaits"
"Intrigue 1 & 2","Shanty Town","Shanty Town","Armenviertel","Baraccopoli","Taudis"
"Intrigue 1 & 2","Mining Village","Mining Village","Bergwerk","Villaggio Minerario","Village minier"
"Intrigue 2","Lurker","Lurker",,,
"Intrigue 2","Diplomat","Diplomat",,,
"Intrigue 2","Mill","Mill",,,
"Intrigue 2","Secret Passage","Secret Passage",,,
"Intrigue 2","Courtier","Courtier",,,
"Intrigue 2","Patrol","Patrol",,,
"Intrigue 2","Replace","Replace",,,
"Promo","Stash","Stash","Geldversteck","Gruzzolo","Cachette"
"Promo","Envoy","Envoy","Gesandter","Inviato","Délégué"
"Promo","Governor","Governor","Gouverneur",,"Gouverneur"
"Promo","Black Market","Black Market","Schwarzmarkt","Mercato Nero","Marché noir"
"Promo","Prince","Prince","Prinz",,"Prince"
"Promo","Walled Village","Walled Village","Carcassonne",,"Ville fortifiée"
"Promo","Summon","Summon","Einladung",,
"Promo","Avanto","Avanto","Eisloch",,
"Promo","Sauna","Sauna","Sauna",,
"Prosperity","Expand","Expand","Ausbau","Ampliamento","Agrandissement"
"Prosperity","Bank","Bank","Bank","Banca","Banque"
"Prosperity","Counting House","Counting House","Leihhaus","Contabilità","Bureau de comptabilité"
"Prosperity","Quarry","Quarry","Steinbruch","Cava","Carrière"
"Prosperity","Vault","Vault","Gewölbe","Nascondiglio","Chambre forte"
"Prosperity","Mountebank","Mountebank","Quacksalber","Ciarlatano","Charlatan"
"Prosperity","Colony","Colony","Kolonie","Colonia","Colonie"
"Prosperity","Peddler","Peddler","Hausierer","Ambulante","Colporteur"
"Prosperity","Contraband","Contraband","Schmuggelware","Contrabbando","Contrebande"
"Prosperity","King's Court","King's Court","Königshof","Corte","Cour du Roi"
"Prosperity","Venture","Venture","Abenteuer","Soldo","Entreprise risquée"
"Prosperity","Bishop","Bishop","Bischof","Vescovo","Évêque"
"Prosperity","Goons","Goons","Halsabschneider","Scagnozzi","Fiers-à-bras"
"Prosperity","Forge","Forge","Kunstschmiede","Incastonare","Forge"
"Prosperity","Rabble","Rabble","Gesindel","Tumulto","Foule"
"Prosperity","Grand Market","Grand Market","Großer Markt","Mercato di Lusso","Grand marché"
"Prosperity","Mint","Mint","Münzer","Zecca","Hôtel de la Monnaie"
"Prosperity","Hoard","Hoard","Hort","Mucchio","Magot"
"Prosperity","Watchtower","Watchtower","Wachturm","Torre di Guardia","Mirador"
"Prosperity","Monument","Monument","Denkmal","Monumento","Monument"
"Prosperity","Platinum","Platinum","Platin","Platino","Platine"
"Prosperity","Loan","Loan","Lohn","Prestito","Prêt"
"Prosperity","Trade Route","Trade Route","Handelsroute","Mercante","Route commerciale"
"Prosperity","Royal Seal","Royal Seal","Königliches Siegel","Sigillo Reale","Sceau royal"
"Prosperity","Talisman","Talisman","Talisman","Talismano","Talisman"
"Prosperity","Worker's Village","Worker's Village","Arbeiterdorf","Cantiere","Village ouvrier"
"Prosperity","City","City","Stadt","Città","Ville"
"Seaside","Ambassador","Ambassador","Botschafter","Ambasciatore","Ambassadeur"
"Seaside","Outpost","Outpost","Aussenposten","Avamposto","Avant-poste"
"Seaside","Pirate Ship","Pirate Ship","Piratenschiff","Nave Pirata","Bateau pirate"
"Seaside","Bazaar","Bazaar","Bazar","Bazar","Bazar"
"Seaside","Caravan","Caravan","Karawane","Carovana","Caravane"
"Seaside","Treasure Map","Treasure Map","Schatzkarte","Mappa del Tesoro","Carte aux trésors"
"Seaside","Smugglers","Smugglers","Schmuggler","Contrabbandieri","Contrebandiers"
"Seaside","Cutpurse","Cutpurse","Beutelschneider","Borseggiatore","Coupeur de bourses"
"Seaside","Embargo","Embargo","Embargo","Embargo","Embargo"
"Seaside","Warehouse","Warehouse","Lagerhaus","Magazzino","Entrepôt"
"Seaside","Explorer","Explorer","Entdecker","Avventuriero","Explorateur"
"Seaside","Haven","Haven","Hafen","Rada","Havre"
"Seaside","Island","Island","Insel","Isola","Île"
"Seaside","Navigator","Navigator","Navigator","Navigatore","Navigateur"
"Seaside","Merchant Ship","Merchant Ship","Handelsschiff","Nave Mercantile","Navire marchand"
"Seaside","Lighthouse","Lighthouse","Leuchtturm","Faro","Phare"
"Seaside","Pearl Diver","Pearl Diver","Perlentaucher","Pescatore di Perle","Plongeur de perles"
"Seaside","Wharf","Wharf","Werft","Molo","Quai"
"Seaside","Salvager","Salvager","Müllverwerter","Recupero","Sauveteur"
"Seaside","Sea Hag","Sea Hag","Seehexe","Megera dei Mari","Sorcière de mer"
"Seaside","Tactician","Tactician","Taktiker","Stratega","Tacticien"
"Seaside","Treasury","Treasury","Schatzkammer","Tesoro","Trésorerie"
"Seaside","Ghost Ship","Ghost Ship","Geisterschiff","Nave Fantasma","Vaisseau fantôme"
"Seaside","Lookout","Lookout","Ausguck","Vedetta","Vigie"
"Seaside","Fishing Village","Fishing Village","Fischerdorf","Villaggio di Pescatori","Village de pêcheurs"
"Seaside","Native Village","Native Village","Eingeborenendorf","Villaggio Indigeno","Village indigène"
1 Set card_tag en_us de it fr
2 Adventures Amulet Amulet Amulett Amulette
3 Adventures Lost Arts Lost Arts Verlorene Kunst Arts anciens
4 Adventures Alms Alms Almosen Aumône
5 Adventures Ferry Ferry Überfahrt Bac
6 Adventures Ball Ball Ball Bal
7 Adventures Haunted Woods Haunted Woods Geisterwald Bois hantés
8 Adventures Champion Champion Champion Championne
9 Adventures Ratcatcher Ratcatcher Rattenfänger Chasseur de rats
10 Adventures Treasure Hunter Treasure Hunter Schatzsucher Chasseuse de Trésors
11 Adventures Lost City Lost City Verlorene Stadt Cité perdue
12 Adventures Trade Trade Handel Commerce
13 Adventures Storyteller Storyteller Geschichtenerzähler Conteuse
14 Adventures Duplicate Duplicate Duplikat Copie
15 Adventures Royal Carriage Royal Carriage Königliche Kutsche Cortège royal
16 Adventures Messenger Messenger Kurier Courrier
17 Adventures Raze Raze Zerstörung Démolition
18 Adventures Disciple Disciple Schüler Disciple
19 Adventures Dungeon Dungeon Verlies Donjon
20 Adventures Borrow Borrow Leihgabe Emprunt
21 Adventures Training Training Training Entraînement
22 Adventures Gear Gear Ausrüstung Équipement
23 Adventures Caravan Guard Caravan Guard Karawanenwächter Escorte
24 Adventures Expedition Expedition Expedition Expédition
25 Adventures Bonfire Bonfire Freudenfeuer Feu de joie
26 Adventures Travelling Fair Travelling Fair Wanderzirkus Forains
27 Adventures Ranger Ranger Wildhüter Forestier
28 Adventures Fugitive Fugitive Flüchtling Fugitif
29 Adventures Giant Giant Riese Géant
30 Adventures Warrior Warrior Krieger Guerrière
31 Adventures Guide Guide Kundschafter Guide
32 Adventures Inheritance Inheritance Erbschaft Héritage
33 Adventures Hero Hero Held Héroïne
34 Adventures Teacher Teacher Lehrer Maître
35 Adventures Artificer Artificer Kunsthandwerker Maître-artisan
36 Adventures Wine Merchant Wine Merchant Weinhändler Marchand de vin
37 Adventures Miser Miser Geizhals Miséreux
38 Adventures Mission Mission Mission Mission
39 Adventures Coin of the Realm Coin of the Realm Königliche Münzen Monnaie Royale
40 Adventures Page Page Page Page
41 Adventures Peasant Peasant Kleinbauer Paysan
42 Adventures Pilgrimage Pilgrimage Pilgerfahrt Pèlerinage
43 Adventures Magpie Magpie Elster Pie voleuse
44 Adventures Treasure Trove Treasure Trove Schatz Pierres précieuses
45 Adventures Scouting Party Scouting Party Spähtrupp Pistage
46 Adventures Plan Plan Planung Plan de Bataille
47 Adventures Bridge Troll Bridge Troll Brückentroll Pont aux Trolls
48 Adventures Quest Quest Quest Quête
49 Adventures Raid Raid Überfall Raid
50 Adventures Pathfinding Pathfinding Wegsuche Reconnaissance
51 Adventures Hireling Hireling Gefolgsmann Recrue
52 Adventures Relic Relic Relikt Relique
53 Adventures Save Save Zuflucht Resserre
54 Adventures Seaway Seaway Seeweg Route Maritime
55 Adventures Soldier Soldier Soldat Soldat
56 Adventures Swamp Hag Swamp Hag Sumpfhexe Sorcière des marais
57 Adventures Distant Lands Distant Lands Ferne Lande Terres lointaines
58 Adventures Transmogrify Transmogrify Transformation Transfiguration
59 Adventures Port Port Hafenstadt Ville portuaire
60 Alchemy Alchemist Alchemist Alchemist Alchimista Alchimiste
61 Alchemy Apothecary Apothecary Apotheker Farmacista Apothicaire
62 Alchemy Apprentice Apprentice Lehrling Apprendista Apprenti
63 Alchemy Scrying Pool Scrying Pool Vision Divinazione Bassin divinatoire
64 Alchemy Familiar Familiar Vertrauter Famiglio Familier
65 Alchemy Golem Golem Golem Golem Golem
66 Alchemy Herbalist Herbalist Kräuterkundiger Erborista Herboriste
67 Alchemy Philosopher's Stone Philosopher's Stone Stein der Weisen Pietra Filosofale Pierre philosophale
68 Alchemy Possession Possession Besessenheit Possessione Possession
69 Alchemy Potion Potion Trank Pozione Potion
70 Alchemy Transmute Transmute Verwandlung Trasmutazione Transmutation
71 Alchemy University University Universität Università Université
72 Alchemy Vineyard Vineyard Weinberg Vigna Vignoble
73 Base Silver Silver Silber Argento Argent
74 Base Copper Copper Kupfer Rame Cuivre
75 Base Estate Estate Anwesen Tenuta Domaine
76 Base Duchy Duchy Herzogtum Ducato Duché
77 Base Curse Curse Fluch Maledizione Malédiction
78 Base Gold Gold Gold Oro Or
79 Base Province Province Provinz Provincia Province
80 Base Trash Trash Müll Carte Eliminate
81 Cornucopia Jester Jester Harlekin Giullare Bouffon
82 Cornucopia Fairgrounds Fairgrounds Festplatz Mercatino Champ de foire
83 Cornucopia Hunting Party Hunting Party Treibjagd Battuta di Caccia Chasseurs
84 Cornucopia Horn of Plenty Horn of Plenty Füllhorn Cornucopia Corne d'abondance
85 Cornucopia Diadem Diadem Diadem Diadema Diadème
86 Cornucopia Fortune Teller Fortune Teller Wahrsagerin Indovina Diseuse de bonne aventure
87 Cornucopia Trusty Steed Trusty Steed Streitross Destriero Fedele Fidèle destrier
88 Cornucopia Hamlet Hamlet Weiler Borgo Hameau
89 Cornucopia Young Witch Young Witch Junge Hexe Giovane Strega Jeune sorcière
90 Cornucopia Horse Traders Horse Traders Pferdehändler Mercanti di Cavalli Maquignons
91 Cornucopia Menagerie Menagerie Menagerie Serraglio Ménagerie
92 Cornucopia Followers Followers Gefolge Seguaci Partisans
93 Cornucopia Princess Princess Prinzessin Principessa Princesse
94 Cornucopia Harvest Harvest Ernte Mietitura Récolte
95 Cornucopia Remake Remake Nachbau Rifacimento Renouvellement
96 Cornucopia Bag of Gold Bag of Gold Ein Sack voll Gold Borsa d'Oro Sac d'or
97 Cornucopia Tournament Tournament Turnier Torneo Tournoi
98 Cornucopia Farming Village Farming Village Bauerndorf Villaggio Agricolo Village agricole
99 Dark Ages Armory Armory Waffenkammer Armurerie
100 Dark Ages Altar Altar Altar Autel
101 Dark Ages Rogue Rogue Schurke Bandit
102 Dark Ages Ruined Library Ruined Library Zerstörte Bibliothek Bibliothèque en ruines
103 Dark Ages Junk Dealer Junk Dealer Schrotthändler Brocanteur
104 Dark Ages Spoils Spoils Beute Butin
105 Dark Ages Hovel Hovel Hütte Cabane
106 Dark Ages Bandit Camp Bandit Camp Banditenlager Camp de bandits
107 Dark Ages Catacombs Catacombs Katakomben Catacombes
108 Dark Ages Death Cart Death Cart Leichenkarren Charrette de cadavres
109 Dark Ages Knights Knights Ritter Chevalier
110 Dark Ages Count Count Graf Comte
111 Dark Ages Counterfeit Counterfeit Falschgeld Contrefaçon
112 Dark Ages Forager Forager Mundraub Cueilleur
113 Dark Ages Cultist Cultist Kultist Cultiste
114 Dark Ages Overgrown Estate Overgrown Estate Verfallenes Anwesen Domaine luxuriant
115 Dark Ages Squire Squire Knappe Écuyer
116 Dark Ages Hermit Hermit Eremit Ermite
117 Dark Ages Ironmonger Ironmonger Eisenhändler Ferronnier
118 Dark Ages Feodum Feodum Lehen Fief
119 Dark Ages Fortress Fortress Festung Forteresse
120 Dark Ages Madman Madman Verrückter Fou
121 Dark Ages Poor House Poor House Armenhaus Hospice
122 Dark Ages Band of Misfits Band of Misfits Vogelfreie Malfaiteurs
123 Dark Ages Marauder Marauder Marodeur Maraudeur
124 Dark Ages Ruined Market Ruined Market Zerstörter Markt Marché en ruines
125 Dark Ages Beggar Beggar Bettler Mendiant
126 Dark Ages Wandering Minstrel Wandering Minstrel Barde Ménestrel errant
127 Dark Ages Mercenary Mercenary Söldner Mercenaire
128 Dark Ages Abandoned Mine Abandoned Mine Verlassene Mine Mine abandonnée
129 Dark Ages Mystic Mystic Medium Mystique
130 Dark Ages Necropolis Necropolis Totenstadt Nécropole
131 Dark Ages Urchin Urchin Gassenjunge Orphelin
132 Dark Ages Pillage Pillage Raubzug Pillage
133 Dark Ages Scavenger Scavenger Lumpensammler Pilleur
134 Dark Ages Graverobber Graverobber Grabräuber Pilleur de tombes
135 Dark Ages Market Square Market Square Marktplatz Place du marché
136 Dark Ages Procession Procession Prozession Procession
137 Dark Ages Rats Rats Ratten Rats
138 Dark Ages Rebuild Rebuild Neubau Reconstruction
139 Dark Ages Survivors Survivors Überlebende Rescapés
140 Dark Ages Sage Sage Weiser Sage
141 Dark Ages Storeroom Storeroom Lagerraum Salle d'entreposage
142 Dark Ages Hunting Grounds Hunting Grounds Jagdgründe Territoire de chasse
143 Dark Ages Vagrant Vagrant Landstreicher Vagabond
144 Dark Ages Ruined Village Ruined Village Zerstörtes Dorf Ville en ruines
145 Dominion 1 Adventurer Adventurer Abenteurer Esploratore Aventurier
146 Dominion 1 Woodcutter Woodcutter Holzfäller Taglialegna Bûcheron
147 Dominion 1 Chancellor Chancellor Kanzler Cancelliere Chancelier
148 Dominion 1 Spy Spy Spion Spia Espion
149 Dominion 1 Feast Feast Festmahl Banchetto Festin
150 Dominion 1 Thief Thief Dieb Ladro Voleur
151 Dominion 1 & 2 Workshop Workshop Werkstatt Officina Atelier
152 Dominion 1 & 2 Library Library Bibliothek Biblioteca Bibliothèque
153 Dominion 1 & 2 Bureaucrat Bureaucrat Bürokrat Burocrate Bureaucrate
154 Dominion 1 & 2 Cellar Cellar Keller Sotterraneo Cave
155 Dominion 1 & 2 Council Room Council Room Ratsversammlung Sala del Consiglio Chambre du conseil
156 Dominion 1 & 2 Chapel Chapel Kapelle Cappella Chapelle
157 Dominion 1 & 2 Moat Moat Burggraben Fossato Douves
158 Dominion 1 & 2 Festival Festival Jahrmarkt Fiera Festival
159 Dominion 1 & 2 Smithy Smithy Schmiede Fucina Forgeron
160 Dominion 1 & 2 Gardens Gardens Gärten Giardini Jardins
161 Dominion 1 & 2 Laboratory Laboratory Laboratorium Laboratorio Laboratoire
162 Dominion 1 & 2 Market Market Markt Mercato Marché
163 Dominion 1 & 2 Militia Militia Miliz Milizia Milice
164 Dominion 1 & 2 Mine Mine Mine Miniera Mine
165 Dominion 1 & 2 Moneylender Moneylender Geldverleiher Usuraio Prêteur sur gages
166 Dominion 1 & 2 Remodel Remodel Umbau Miglioria Rénovation
167 Dominion 1 & 2 Throne Room Throne Room Thronsaal Sala del Trono Salle du Trône
168 Dominion 1 & 2 Witch Witch Hexe Strega Sorcière
169 Dominion 1 & 2 Village Village Dorf Villaggio Village
170 Dominion 2 Artisan Artisan
171 Dominion 2 Bandit Bandit
172 Dominion 2 Harbinger Harbinger
173 Dominion 2 Merchant Merchant
174 Dominion 2 Poacher Poacher
175 Dominion 2 Vassal Vassal
176 Dominion 2 Sentry Sentry
177 Empires Aqueduct Aqueduct Aquädukt
178 Empires Archive Archive Archiv
179 Empires Arena Arena Arena
180 Empires Advance Advance Aufstieg
181 Empires Sprawling Castle Sprawling Castle Ausgedehntes Schloss
182 Empires Baths Baths Badehaus
183 Empires Banquet Banquet Bankett
184 Empires Basilica Basilica Basilika
185 Empires Farmers' Market Farmers' Market Bauernmarkt
186 Empires Dominate Dominate Beherrschen
187 Empires Humble Castle Humble Castle Bescheidenes Schloss
188 Empires Keep Keep Bollwerk
189 Empires Fountain Fountain Brunnen
190 Empires Plunder Plunder Diebesgut
191 Empires Bustling Village Bustling Village Emsiges Dorf
192 Empires Defiled Shrine Defiled Shrine Entweihter Schrein
193 Empires Delve Delve Erforschen
194 Empires Conquest Conquest Eroberung
195 Empires Encampment Encampment Feldlager
196 Empires Rocks Rocks Felsen
197 Empires Forum Forum Forum
198 Empires Groundskeeper Groundskeeper Gärtnerin
199 Empires Mountain Pass Mountain Pass Gebirgspass
200 Empires Windfall Windfall Glüksfall
201 Empires Gladiator Gladiator Gladiator
202 Empires Tomb Tomb Grabmal
203 Empires Emporium Emporium Handelsplatz
204 Empires Wedding Wedding Hochzeit
205 Empires Engineer Engineer Ingenieurin
206 Empires Royal Blacksmith Royal Blacksmith Königlicher Schmied
207 Empires King's Castle King's Castle Königsschloss
208 Empires Catapult Catapult Katapult
209 Empires Small Castle Small Castle Kleines Schloss
210 Empires Colonnade Colonnade Kolonnaden
211 Empires Crown Crown Krone
212 Empires Labyrinth Labyrinth Labyrinth
213 Empires Legionary Legionary Legionär
214 Empires Overlord Overlord Lehnsherr
215 Empires Wall Wall Mauer
216 Empires Museum Museum Museum
217 Empires Obelisk Obelisk Obelisk
218 Empires Orchard Orchard Obstgarten
219 Empires Sacrifice Sacrifice Opfer
220 Empires Palace Palace Palast
221 Empires Patrician Patrician Patrizier
222 Empires Grand Castle Grand Castle Prunkschloss
223 Empires Bandit Fort Bandit Fort Räuberfestung
224 Empires Opulent Castle Opulent Castle Reiches Schloss
225 Empires Fortune Fortune Reichtum
226 Empires Ritual Ritual Ritual
227 Empires Castles Castles Schlösser
228 Empires Annex Annex Schlacht
229 Empires Battlefield Battlefield Schlachtfeld
230 Empires Settlers Settlers Siedler
231 Empires Triumph Triumph Siegeszug
232 Empires Donate Donate Spende
233 Empires Haunted Castle Haunted Castle Spukschloss
234 Empires City Quarter City Quarter Stadtviertel
235 Empires Tax Tax Steuer
236 Empires Temple Temple Tempel
237 Empires Triumphal Arch Triumphal Arch Triumphbogen
238 Empires Tower Tower Turm
239 Empires Crumbling Castle Crumbling Castle Verfallendes Schloss
240 Empires Capital Capital Vermögen
241 Empires Salt the Earth Salt the Earth Versalztes Land
242 Empires Villa Villa Villa
243 Empires Chariot Race Chariot Race Wagenrennen
244 Empires Wild Hunt Wild Hunt Wilde Jagd
245 Empires Wolf Den Wolf Den Wolfsbau
246 Empires Charm Charm Zauber
247 Empires Enchantress Enchantress Zauberin
248 Groups Urchin - Mercenary Urchin / Mercenary Gassenjunge / Söldner Orphelin / Mercenaire
249 Groups Sauna - Avanto Sauna / Avanto Sauna / Eisloch
250 Groups Tournament and Prizes Tournament and Prizes Turnier und Preise
251 Groups Hermit - Madman Hermit / Madman Eremit / Verrückter
252 Groups Shelters Shelters Unterschlupfe
253 Groups Settlers - Bustling Village Settlers / Bustling Village Siedler / Emsiges Dorf
254 Groups Catapult - Rocks Catapult / Rocks Katapult / Felsen
255 Groups Encampment - Plunder Encampment / Plunder Feldlager / Diebesgut
256 Groups Gladiator - Fortune Gladiator / Fortune Gladiator / Reichtum
257 Groups Patrician - Emporium Patrician / Emporium Patrizier / Handelsplatz
258 Groups adventures events Events Adventures Ereignisse Abenteuer
259 Groups empires events Events Empires Ereignisse Empires
260 Groups promo events Events Promo Ereignisse Promo
261 Groups events Events Ereignisse
262 Groups empires landmarks Landmarks Empires Wahrzeichen Empires
263 Groups landmarks Landmarks Wahrzeichen
264 Groups Page -> Champion Page -> Champion Page -> Champion
265 Groups Peasant -> Teacher Peasant -> Teacher Kleinbauer -> Lehrer
266 Groups Ruins Ruins Ruinen Rovine Ruines
267 Guilds Butcher Butcher Metzger Boucher
268 Guilds Baker Baker Bäcker Boulanger
269 Guilds Masterpiece Masterpiece Meisterstück Chef-d'½uvre
270 Guilds Candlestick Maker Candlestick Maker Leuchtenmacher Cirier
271 Guilds Journeyman Journeyman Wandergeselle Compagnon
272 Guilds Advisor Advisor Berater Conseiller
273 Guilds Soothsayer Soothsayer Wahrsager Devin
274 Guilds Merchant Guild Merchant Guild Kaufmannsgilde Guilde des Marchands
275 Guilds Herald Herald Herold Héraut
276 Guilds Doctor Doctor Arzt Médecin
277 Guilds Taxman Taxman Steuereintreiber Percepteur
278 Guilds Plaza Plaza Platz Place du village
279 Guilds Stonemason Stonemason Steinmetz Tailleur de pierre
280 Hinterlands Embassy Embassy Botschaft Diplomatico Ambassade
281 Hinterlands Ill-Gotten Gains Ill-Gotten Gains Blutzoll Infame Profitto Argent noir
282 Hinterlands Inn Inn Gasthaus Locanda Auberge
283 Hinterlands Cache Cache Schatztruhe Forziere Cache
284 Hinterlands Nomad Camp Nomad Camp Nomadencamp Campo Nomadi Campement nomade
285 Hinterlands Crossroads Crossroads Wegkreuzung Incrocio Carrefour
286 Hinterlands Cartographer Cartographer Kartograph Cartografo Cartographe
287 Hinterlands Scheme Scheme Komplott Macchinazione Complot
288 Hinterlands Develop Develop Aufbau Sviluppo Développement
289 Hinterlands Duchess Duchess Herzogin Duchessa Duchesse
290 Hinterlands Stables Stables Stallungen Stalla Écuries
291 Hinterlands Mandarin Mandarin Mandarin Mandarino Mandarin
292 Hinterlands Spice Merchant Spice Merchant Gewürzhändler Mercante di Spezie Marchand d'épices
293 Hinterlands Haggler Haggler Feilscher Contrattazione Marchandeur
294 Hinterlands Margrave Margrave Markgraf Margravio Margrave
295 Hinterlands Noble Brigand Noble Brigand Edler Räuber Ladro Gentiluomo Noble brigand
296 Hinterlands Oasis Oasis Oase Oasi Oasis
297 Hinterlands Fool's Gold Fool's Gold Katzengold Oro dello Stolto Or des fous
298 Hinterlands Oracle Oracle Orakel Oracolo Oracle
299 Hinterlands Highway Highway Fernstraße Strada Maestra Route
300 Hinterlands Silk Road Silk Road Seidenstraße Via della Seta Route de la soie
301 Hinterlands Farmland Farmland Fruchtbares Land Terra Coltivata Terre agricole
302 Hinterlands Jack of all Trades Jack of all Trades Lebenskünstler Tuttofare Touche-à-tout
303 Hinterlands Trader Trader Fahrender Händler Commerciante Troqueuse
304 Hinterlands Tunnel Tunnel Tunnel Galleria Tunnel
305 Hinterlands Border Village Border Village Grenzdorf Villaggio di Frontiera Village frontalier
306 Intrigue 1 Secret Chamber Secret Chamber Geheimkammer Stanza Segreta Chambre secrète
307 Intrigue 1 Coppersmith Coppersmith Kupferschmied Battirame Chaudronnier
308 Intrigue 1 Scout Scout Späher Scout Éclaireur
309 Intrigue 1 Great Hall Great Hall Große Halle Grande Salone Grand Hall
310 Intrigue 1 Tribute Tribute Tribut Tributo Hommage
311 Intrigue 1 Saboteur Saboteur Saboteur Sabotatore Saboteur
312 Intrigue 1 & 2 Baron Baron Baron Barone Baron
313 Intrigue 1 & 2 Torturer Torturer Kerkermeister Carceriere Bourreau
314 Intrigue 1 & 2 Trading Post Trading Post Handelposten Stazione Commerciale Comptoir
315 Intrigue 1 & 2 Conspirator Conspirator Verschwörer Cospiratore Conspirateur
316 Intrigue 1 & 2 Courtyard Courtyard Burghof Cortile di Campagna Cour
317 Intrigue 1 & 2 Duke Duke Herzog Duca Duc
318 Intrigue 1 & 2 Swindler Swindler Trickser Truffatore Escroc
319 Intrigue 1 & 2 Ironworks Ironworks Eisenhütte Fonderia Fonderie
320 Intrigue 1 & 2 Harem Harem Harem Harem Harem
321 Intrigue 1 & 2 Steward Steward Verwalter Maggiordomo Intendant
322 Intrigue 1 & 2 Minion Minion Lakai Tirapiedi Larbin
323 Intrigue 1 & 2 Masquerade Masquerade Maskerade Ballo in Maschera Mascarade
324 Intrigue 1 & 2 Upgrade Upgrade Anbau Potenziamento Mise à niveau
325 Intrigue 1 & 2 Nobles Nobles Adelige Nobili Nobles
326 Intrigue 1 & 2 Pawn Pawn Handlanger Pedina Pion
327 Intrigue 1 & 2 Bridge Bridge Brücke Ponte Pont
328 Intrigue 1 & 2 Wishing Well Wishing Well Wunschbrunnen Pozzo dei Desideri Puits aux souhaits
329 Intrigue 1 & 2 Shanty Town Shanty Town Armenviertel Baraccopoli Taudis
330 Intrigue 1 & 2 Mining Village Mining Village Bergwerk Villaggio Minerario Village minier
331 Intrigue 2 Lurker Lurker
332 Intrigue 2 Diplomat Diplomat
333 Intrigue 2 Mill Mill
334 Intrigue 2 Secret Passage Secret Passage
335 Intrigue 2 Courtier Courtier
336 Intrigue 2 Patrol Patrol
337 Intrigue 2 Replace Replace
338 Promo Stash Stash Geldversteck Gruzzolo Cachette
339 Promo Envoy Envoy Gesandter Inviato Délégué
340 Promo Governor Governor Gouverneur Gouverneur
341 Promo Black Market Black Market Schwarzmarkt Mercato Nero Marché noir
342 Promo Prince Prince Prinz Prince
343 Promo Walled Village Walled Village Carcassonne Ville fortifiée
344 Promo Summon Summon Einladung
345 Promo Avanto Avanto Eisloch
346 Promo Sauna Sauna Sauna
347 Prosperity Expand Expand Ausbau Ampliamento Agrandissement
348 Prosperity Bank Bank Bank Banca Banque
349 Prosperity Counting House Counting House Leihhaus Contabilità Bureau de comptabilité
350 Prosperity Quarry Quarry Steinbruch Cava Carrière
351 Prosperity Vault Vault Gewölbe Nascondiglio Chambre forte
352 Prosperity Mountebank Mountebank Quacksalber Ciarlatano Charlatan
353 Prosperity Colony Colony Kolonie Colonia Colonie
354 Prosperity Peddler Peddler Hausierer Ambulante Colporteur
355 Prosperity Contraband Contraband Schmuggelware Contrabbando Contrebande
356 Prosperity King's Court King's Court Königshof Corte Cour du Roi
357 Prosperity Venture Venture Abenteuer Soldo Entreprise risquée
358 Prosperity Bishop Bishop Bischof Vescovo Évêque
359 Prosperity Goons Goons Halsabschneider Scagnozzi Fiers-à-bras
360 Prosperity Forge Forge Kunstschmiede Incastonare Forge
361 Prosperity Rabble Rabble Gesindel Tumulto Foule
362 Prosperity Grand Market Grand Market Großer Markt Mercato di Lusso Grand marché
363 Prosperity Mint Mint Münzer Zecca Hôtel de la Monnaie
364 Prosperity Hoard Hoard Hort Mucchio Magot
365 Prosperity Watchtower Watchtower Wachturm Torre di Guardia Mirador
366 Prosperity Monument Monument Denkmal Monumento Monument
367 Prosperity Platinum Platinum Platin Platino Platine
368 Prosperity Loan Loan Lohn Prestito Prêt
369 Prosperity Trade Route Trade Route Handelsroute Mercante Route commerciale
370 Prosperity Royal Seal Royal Seal Königliches Siegel Sigillo Reale Sceau royal
371 Prosperity Talisman Talisman Talisman Talismano Talisman
372 Prosperity Worker's Village Worker's Village Arbeiterdorf Cantiere Village ouvrier
373 Prosperity City City Stadt Città Ville
374 Seaside Ambassador Ambassador Botschafter Ambasciatore Ambassadeur
375 Seaside Outpost Outpost Aussenposten Avamposto Avant-poste
376 Seaside Pirate Ship Pirate Ship Piratenschiff Nave Pirata Bateau pirate
377 Seaside Bazaar Bazaar Bazar Bazar Bazar
378 Seaside Caravan Caravan Karawane Carovana Caravane
379 Seaside Treasure Map Treasure Map Schatzkarte Mappa del Tesoro Carte aux trésors
380 Seaside Smugglers Smugglers Schmuggler Contrabbandieri Contrebandiers
381 Seaside Cutpurse Cutpurse Beutelschneider Borseggiatore Coupeur de bourses
382 Seaside Embargo Embargo Embargo Embargo Embargo
383 Seaside Warehouse Warehouse Lagerhaus Magazzino Entrepôt
384 Seaside Explorer Explorer Entdecker Avventuriero Explorateur
385 Seaside Haven Haven Hafen Rada Havre
386 Seaside Island Island Insel Isola Île
387 Seaside Navigator Navigator Navigator Navigatore Navigateur
388 Seaside Merchant Ship Merchant Ship Handelsschiff Nave Mercantile Navire marchand
389 Seaside Lighthouse Lighthouse Leuchtturm Faro Phare
390 Seaside Pearl Diver Pearl Diver Perlentaucher Pescatore di Perle Plongeur de perles
391 Seaside Wharf Wharf Werft Molo Quai
392 Seaside Salvager Salvager Müllverwerter Recupero Sauveteur
393 Seaside Sea Hag Sea Hag Seehexe Megera dei Mari Sorcière de mer
394 Seaside Tactician Tactician Taktiker Stratega Tacticien
395 Seaside Treasury Treasury Schatzkammer Tesoro Trésorerie
396 Seaside Ghost Ship Ghost Ship Geisterschiff Nave Fantasma Vaisseau fantôme
397 Seaside Lookout Lookout Ausguck Vedetta Vigie
398 Seaside Fishing Village Fishing Village Fischerdorf Villaggio di Pescatori Village de pêcheurs
399 Seaside Native Village Native Village Eingeborenendorf Villaggio Indigeno Village indigène
Binary file not shown.
+380
View File
@@ -0,0 +1,380 @@
###########################################################################
# This file provides maintenance on the various language files
# 1. Create new "xx/cards_xx.json" files that have entries ordered as:
# a. the card_tag entries in "cards_db.json"
# b. the group_tag entries as found in "cards_db.json"
# c. the super group entries (grouping across all expansions"
# d. any unused entries existing in the file (assumed to be work in progress)
#
# 2. Create new "sets_db.json" and "xx/cards_xx.json" with entries sorted alphabetically
#
# All output is in the designated output directory. Original files are not overwritten.
###########################################################################
import os
import io
import codecs
import json
from shutil import copyfile
LANGUAGE_DEFAULT = 'en_us' # default language, which takes priority
LANGUAGE_XX = 'xx' # language for starting a translation
card_db_dir = os.path.join("..", "card_db") # directory of card data
output_dir = os.path.join(".", "card_db") # directory for output data
def get_lang_dirs(path):
# Find all valid languages.
languages = []
for name in os.listdir(path):
dir_path = os.path.join(path, name)
if os.path.isdir(dir_path):
cards_file = os.path.join(dir_path, "cards_" + name + ".json")
sets_file = os.path.join(dir_path, "sets_" + name + ".json")
if os.path.isfile(cards_file) and os.path.isfile(sets_file):
languages.append(name)
return languages
def get_json_data(json_file_path):
# Read in the json from the specified file
with codecs.open(json_file_path, 'r', 'utf-8') as json_file:
data = json.load(json_file)
assert data, "Could not load json at: '%r' " % json_file_path
return data
def json_dict_entry(entry, separator=''):
# Return a nicely formated json dict entry.
# It does not include the enclosing {} and removes trailing white space
json_data = json.dumps(entry, indent=4, ensure_ascii=False, sort_keys=True)
json_data = json_data.strip('{}').rstrip() # Remove outer{} and then trailing whitespace
return separator + json_data
# Multikey sort
# see: http://stackoverflow.com/questions/1143671/python-sorting-list-of-dictionaries-by-multiple-keys
def multikeysort(items, columns):
from operator import itemgetter
comparers = [((itemgetter(col[1:].strip()), -1) if col.startswith('-') else
(itemgetter(col.strip()), 1)) for col in columns]
def comparer(left, right):
for fn, mult in comparers:
result = cmp(fn(left), fn(right))
if result:
return mult * result
else:
return 0
return sorted(items, cmp=comparer)
###########################################################################
# Get all the languages, and place the default language first in the list
###########################################################################
languages = get_lang_dirs(card_db_dir)
languages.remove(LANGUAGE_DEFAULT)
languages.insert(0, LANGUAGE_DEFAULT)
if LANGUAGE_XX not in languages:
languages.append(LANGUAGE_XX)
print "Languages:"
print languages
print
###########################################################################
# Make sure the directories exist to hold the output
###########################################################################
# main output directory
if not os.path.exists(output_dir):
os.makedirs(output_dir)
# each language directory
for lang in languages:
# Make sure the directory is there to hold the file
lang_dir = os.path.join(output_dir,lang)
if not os.path.exists(lang_dir):
os.makedirs(lang_dir)
###########################################################################
# Get the types_db information
# Store in a list in the order found in types[]. Ordered by card_type
# 1. card_tags, 2. group_tags, 3. super groups
###########################################################################
types = []
type_parts = []
# Get the card data
type_data = get_json_data(os.path.join(card_db_dir, "types_db.json"))
# Sort the cards by cardset_tags, then card_tag
sorted_type_data = multikeysort(type_data, ['card_type'])
with io.open(os.path.join(output_dir, "types_db.json"), 'w', encoding='utf-8') as lang_out:
lang_out.write(unicode("[")) # Start of list
sep = ""
for type in sorted_type_data:
# Collect all the individual types
type_parts = list(set(type['card_type']) | set(type_parts))
lang_out.write(sep + json.dumps(type, indent=4, ensure_ascii=False, sort_keys=True))
sep = ","
lang_out.write(unicode("\n]\n")) # End of List
type_parts.sort()
print "Unique Types:"
print type_parts
print
###########################################################################
# Fix up all the xx/types_xx.json files
# Place entries in alphabetical order
# If entries don't exist:
# If the default language, set from information in the "types_db.json" file,
# If not the default language, set based on information from the default language.
# Lastly, keep any extra entries that are not currently used, just in case needed
# in the future or is a work in progress.
###########################################################################
for lang in languages:
lang_file = "types_" + lang + ".json"
fname = os.path.join(card_db_dir, lang, lang_file)
if os.path.isfile(fname):
lang_type_data = get_json_data(fname)
else:
lang_type_data = {}
with io.open( os.path.join(output_dir, lang, lang_file), 'w',encoding='utf-8') as lang_out:
lang_out.write(unicode("{")) # Start of types
sep = ""
used = []
for type in sorted(type_parts):
if type not in lang_type_data:
if lang == LANGUAGE_DEFAULT:
lang_type_data[type] = type
else:
lang_type_data[type] = lang_type_default[type]
lang_out.write(json_dict_entry({type:lang_type_data[type]}, sep))
used.append(type)
sep = ","
# Now keep any unused values just in case needed in the future
for key in lang_type_data:
if key not in used:
lang_out.write(json_dict_entry({key:lang_type_data[key]}, sep))
sep = ","
lang_out.write(unicode("\n}\n")) # End of Types
if lang == LANGUAGE_DEFAULT:
lang_type_default = lang_type_data # Keep for later languages
###########################################################################
# Get the cards_db information
# Store in a list in the order found in cards[]. Ordered as follows:
# 1. card_tags, 2. group_tags, 3. super groups
###########################################################################
cards = []
groups = []
super_groups = [u'events', u'landmarks']
# Get the card data
card_data = get_json_data(os.path.join(card_db_dir, "cards_db.json"))
# Sort the cardset_tags
for card in card_data:
card["cardset_tags"].sort()
# But put all the base cards together by moving to front of the list
if 'base' in card["cardset_tags"]:
card["cardset_tags"].remove('base')
card["cardset_tags"].insert(0, 'base')
# Sort the cards by cardset_tags, then card_tag
sorted_card_data = multikeysort(card_data, ['cardset_tags', 'card_tag'])
with io.open(os.path.join(output_dir, "cards_db.json"), 'w', encoding='utf-8') as lang_out:
lang_out.write(unicode("[")) # Start of list
sep = ""
for card in sorted_card_data:
if card['card_tag'] not in cards:
cards.append(card['card_tag'])
if 'group_tag' in card:
if card['group_tag'] not in groups:
groups.append(card['group_tag'])
lang_out.write(sep + json.dumps(card, indent=4, ensure_ascii=False, sort_keys=True))
sep = ","
lang_out.write(unicode("\n]\n")) # End of List
cards.extend(groups)
cards.extend(super_groups)
print "Cards:"
print cards
print
###########################################################################
# Fix up all the cards_xx.json files
# Place entries in the same order as given in "cards_db.json".
# If entries don't exist:
# If the default language, set base on information in the "cards_db.json" file,
# If not the default language, set based on information from the default language.
# Lastly, keep any extra entries that are not currently used, just in case needed
# in the future or is a work in progress.
###########################################################################
for lang in languages:
# contruct the cards json file name
lang_file = "cards_" + lang + ".json"
fname = os.path.join(card_db_dir, lang, lang_file)
if os.path.isfile(fname):
lang_data = get_json_data(fname)
else:
lang_data = {}
# Process the file
with io.open(os.path.join(output_dir, lang, lang_file), 'w', encoding='utf-8') as lang_out:
lang_out.write(unicode("{")) # Start of set
sep = ""
fields = [u"description", u"extra", u"name"]
for card in cards:
if card not in lang_data or lang == LANGUAGE_XX:
# Card is missing, need to add it
lang_data[card] = {}
if lang == LANGUAGE_DEFAULT:
# Default language gets bare minimum. Really need to add by hand.
lang_data[card]["extra"] = ""
lang_data[card]["name"] = card
lang_data[card]["description"] = ""
lang_data[card]["untranslated"] = ', '.join(fields)
else:
# All other languages should get the default languages' text
lang_data[card]["extra"] = lang_default[card]["extra"]
lang_data[card]["name"] = lang_default[card]["name"]
lang_data[card]["description"] = lang_default[card]["description"]
lang_data[card]["untranslated"] = ', '.join(fields)
else:
# Card exists, figure out what needs updating (don't update default language)
if lang != LANGUAGE_DEFAULT:
if 'untranslated' in lang_data[card]:
# Has an 'untranslated' field. Process accordingly
if not lang_data[card]["untranslated"].strip():
# It is empty, so just remove it
del lang_data[card]["untranslated"]
else:
# If a field remains untranslated, then replace with the default languages copy
for field in fields:
if field in lang_data[card]['untranslated']:
lang_data[card][field] = lang_default[card][field]
else:
# Need to create the 'untranslated' field and update based upon existing fields
untranslated = []
for field in fields:
if field not in lang_data[card]:
lang_data[card][field] = lang_default[card][field]
untranslated.append(field)
if untranslated:
# only add if something is still needing translation
lang_data[card]["untranslated"] = ', '.join(untranslated)
lang_out.write(json_dict_entry({card:lang_data[card]}, sep))
lang_data[card]['used'] = True
sep = ","
# Now keep any unused values just in case needed in the future
for key in lang_data:
if 'used' not in lang_data[key]:
lang_data[key]["untranslated"] = "Note: This card is currently not used."
lang_out.write(json_dict_entry({key:lang_data[key]}, sep))
sep = ","
lang_out.write(unicode("\n}\n")) # End of Set
if lang == LANGUAGE_DEFAULT:
lang_default = lang_data # Keep for later languages
###########################################################################
# Fix up the sets_db.json file
# Place entries in alphabetical order
###########################################################################
lang_file = "sets_db.json"
set_data = get_json_data(os.path.join(card_db_dir, lang_file))
with io.open( os.path.join(output_dir, lang_file), 'w',encoding='utf-8') as lang_out:
lang_out.write(unicode("{")) # Start of set
sep = ""
sets = []
for set in sorted(set_data):
lang_out.write(json_dict_entry({set:set_data[set]}, sep))
sep = ","
if set not in sets:
sets.append(set)
lang_out.write(unicode("\n}\n")) # End of Set
print "Sets:"
print sets
print
###########################################################################
# Fix up all the xx/sets_xx.json files
# Place entries in alphabetical order
# If entries don't exist:
# If the default language, set from information in the "sets_db.json" file,
# If not the default language, set based on information from the default language.
# Lastly, keep any extra entries that are not currently used, just in case needed
# in the future or is a work in progress.
###########################################################################
for lang in languages:
lang_file = "sets_" + lang + ".json"
fname = os.path.join(card_db_dir, lang, lang_file)
if os.path.isfile(fname):
lang_set_data = get_json_data(fname)
else:
lang_set_data = {}
with io.open( os.path.join(output_dir, lang, lang_file), 'w',encoding='utf-8') as lang_out:
lang_out.write(unicode("{")) # Start of set
sep = ""
for set in sorted(set_data):
if set not in lang_set_data:
lang_set_data[set] = {}
if lang == LANGUAGE_DEFAULT:
lang_set_data[set]["set_name"] = set.title()
lang_set_data[set]["text_icon"] = set_data[set]["text_icon"]
if 'short_name' in set_data[set]:
lang_set_data[set]["short_name"] = set_data[set]["short_name"]
else:
lang_set_data[set]["set_name"] = lang_default[set]["set_name"]
lang_set_data[set]["text_icon"] = lang_default[set]["text_icon"]
if 'short_name' in lang_default[set]:
lang_set_data[set]["short_name"] = lang_default[set]["short_name"]
lang_out.write(json_dict_entry({set:lang_set_data[set]}, sep))
lang_set_data[set]['used'] = True
sep = ","
# Now keep any unused values just in case needed in the future
for key in lang_set_data:
if 'used' not in lang_set_data[key]:
lang_out.write(json_dict_entry({key:lang_set_data[key]}, sep))
sep = ","
lang_out.write(unicode("\n}\n")) # End of Set
if lang == LANGUAGE_DEFAULT:
lang_default = lang_set_data # Keep for later languages
###########################################################################
# translation.txt
###########################################################################
copyfile(os.path.join(card_db_dir, "translation.txt" ),
os.path.join(output_dir, "translation.txt" ))
# Since xx is the starting point for new translations,
# make sure xx has the latest copy of translation.txt
copyfile(os.path.join(card_db_dir, "translation.txt" ),
os.path.join(output_dir, LANGUAGE_XX, "translation.txt" ))