Make better package (#132)
* make domdiv a better behaved python package (see #131) * move code from __init__.py to main.py to make import quicker and make version work without dependencies * update languages import to use pkg_resources, fix tests * update readmes * change font lookup, font readme notes
No files matched your search
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"exclude": [
|
||||
"Token",
|
||||
"Tokens",
|
||||
"Marker"
|
||||
],
|
||||
"include": [
|
||||
"Coins",
|
||||
"Coin",
|
||||
"Karten",
|
||||
"Karte",
|
||||
"Käufe",
|
||||
"Kauf",
|
||||
"Aktionen",
|
||||
"Aktion",
|
||||
"Punkt",
|
||||
"Punkte"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"adventures": {
|
||||
"set_name": "Abenteuer",
|
||||
"text_icon": "Ab"
|
||||
},
|
||||
"adventures extras": {
|
||||
"set_name": "Adventures Extras",
|
||||
"text_icon": "Ad"
|
||||
},
|
||||
"alchemy": {
|
||||
"set_name": "Die Alchemisten",
|
||||
"text_icon": "Al"
|
||||
},
|
||||
"base": {
|
||||
"set_name": "Base",
|
||||
"text_icon": "B"
|
||||
},
|
||||
"cornucopia": {
|
||||
"set_name": "Reiche Ernte",
|
||||
"text_icon": "RE"
|
||||
},
|
||||
"cornucopia extras": {
|
||||
"set_name": "Cornucopia Extras",
|
||||
"text_icon": "C"
|
||||
},
|
||||
"dark ages": {
|
||||
"set_name": "Dark Ages",
|
||||
"text_icon": "DA"
|
||||
},
|
||||
"dark ages extras": {
|
||||
"set_name": "Dark Ages Extras",
|
||||
"text_icon": "DA"
|
||||
},
|
||||
"dominion1stEdition": {
|
||||
"set_name": "Dominion 1. Ausgabe",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D1"
|
||||
},
|
||||
"dominion2ndEdition": {
|
||||
"set_name": "Dominion 2. Ausgabe",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"dominion2ndEditionUpgrade": {
|
||||
"set_name": "Dominion 2. Ausgabe Aktualisierung",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"empires": {
|
||||
"set_name": "Empires",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"empires extras": {
|
||||
"set_name": "Empires Extras",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"extras": {
|
||||
"set_name": "Extras",
|
||||
"text_icon": "Ex"
|
||||
},
|
||||
"guilds": {
|
||||
"set_name": "Die Gilden",
|
||||
"text_icon": "G"
|
||||
},
|
||||
"hinterlands": {
|
||||
"set_name": "Hinterland",
|
||||
"text_icon": "H"
|
||||
},
|
||||
"intrigue1stEdition": {
|
||||
"set_name": "Intrige 2. Ausgabe",
|
||||
"short_name": "Intrige",
|
||||
"text_icon": "I1"
|
||||
},
|
||||
"intrigue2ndEdition": {
|
||||
"set_name": "Intrige 2. Ausgabe",
|
||||
"short_name": "Intrigue",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"intrigue2ndEditionUpgrade": {
|
||||
"set_name": "Intrige 2. Ausgabe Aktualisierung",
|
||||
"short_name": "Intrigue",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"promo": {
|
||||
"set_name": "Promo",
|
||||
"text_icon": "Pm"
|
||||
},
|
||||
"prosperity": {
|
||||
"set_name": "Blütezeit",
|
||||
"text_icon": "Bl"
|
||||
},
|
||||
"seaside": {
|
||||
"set_name": "Seaside",
|
||||
"text_icon": "S"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Action": "Aktion",
|
||||
"Attack": "Angriff",
|
||||
"Blank": "Blank",
|
||||
"Castle": "Schloss",
|
||||
"Curse": "Fluch",
|
||||
"Duration": "Dauer",
|
||||
"Event": "Ereigniss",
|
||||
"Events": "Ereignisse",
|
||||
"Expansion": "Erweiterung",
|
||||
"Gathering": "Sammlung",
|
||||
"Landmark": "Wahrzeichen",
|
||||
"Landmarks": "Wahrzeichen",
|
||||
"Looter": "Plünderer",
|
||||
"Prize": "Preis",
|
||||
"Prizes": "Preise",
|
||||
"Reaction": "Reaktion",
|
||||
"Reserve": "Reserve",
|
||||
"Ruins": "Ruinen",
|
||||
"Shelter": "Unterschlupf",
|
||||
"Shelters": "Unterschlüpfe",
|
||||
"Trash": "Müll",
|
||||
"Traveller": "Reisender",
|
||||
"Treasure": "Geld",
|
||||
"Victory": "Punkte"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"exclude": [
|
||||
"token",
|
||||
"Tokens"
|
||||
],
|
||||
"include": [
|
||||
"Coins",
|
||||
"Coin",
|
||||
"Cards",
|
||||
"Card",
|
||||
"Buys",
|
||||
"Buy",
|
||||
"Actions",
|
||||
"Action",
|
||||
"<VP>"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"adventures": {
|
||||
"set_name": "Adventures",
|
||||
"text_icon": "Ad"
|
||||
},
|
||||
"adventures extras": {
|
||||
"set_name": "Adventures Extras",
|
||||
"text_icon": "Ad"
|
||||
},
|
||||
"alchemy": {
|
||||
"set_name": "Alchemy",
|
||||
"text_icon": "A"
|
||||
},
|
||||
"base": {
|
||||
"set_name": "Base",
|
||||
"text_icon": "B"
|
||||
},
|
||||
"cornucopia": {
|
||||
"set_name": "Cornucopia",
|
||||
"text_icon": "C"
|
||||
},
|
||||
"cornucopia extras": {
|
||||
"set_name": "Cornucopia Extras",
|
||||
"text_icon": "C"
|
||||
},
|
||||
"dark ages": {
|
||||
"set_name": "Dark Ages",
|
||||
"text_icon": "DA"
|
||||
},
|
||||
"dark ages extras": {
|
||||
"set_name": "Dark Ages Extras",
|
||||
"text_icon": "DA"
|
||||
},
|
||||
"dominion1stEdition": {
|
||||
"set_name": "Dominion 1st Edition",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D1"
|
||||
},
|
||||
"dominion2ndEdition": {
|
||||
"set_name": "Dominion 2nd Edition",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"dominion2ndEditionUpgrade": {
|
||||
"set_name": "Dominion 2nd Edition Upgrade",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"empires": {
|
||||
"set_name": "Empires",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"empires extras": {
|
||||
"set_name": "Empires Extras",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"extras": {
|
||||
"set_name": "Extras",
|
||||
"text_icon": "X"
|
||||
},
|
||||
"guilds": {
|
||||
"set_name": "Guilds",
|
||||
"text_icon": "G"
|
||||
},
|
||||
"hinterlands": {
|
||||
"set_name": "Hinterlands",
|
||||
"text_icon": "H"
|
||||
},
|
||||
"intrigue1stEdition": {
|
||||
"set_name": "Intrigue 1st Edition",
|
||||
"short_name": "Intrigue",
|
||||
"text_icon": "I1"
|
||||
},
|
||||
"intrigue2ndEdition": {
|
||||
"set_name": "Intrigue 2nd Edition",
|
||||
"short_name": "Intrigue",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"intrigue2ndEditionUpgrade": {
|
||||
"set_name": "Intrigue 2nd Edition Upgrade",
|
||||
"short_name": "Intrigue",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"promo": {
|
||||
"set_name": "Promo",
|
||||
"text_icon": "Pm"
|
||||
},
|
||||
"prosperity": {
|
||||
"set_name": "Prosperity",
|
||||
"text_icon": "P"
|
||||
},
|
||||
"seaside": {
|
||||
"set_name": "Seaside",
|
||||
"text_icon": "S"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Action": "Action",
|
||||
"Attack": "Attack",
|
||||
"Blank": "Blank",
|
||||
"Castle": "Castle",
|
||||
"Curse": "Curse",
|
||||
"Duration": "Duration",
|
||||
"Event": "Event",
|
||||
"Events": "Events",
|
||||
"Expansion": "Expansion",
|
||||
"Gathering": "Gathering",
|
||||
"Landmark": "Landmark",
|
||||
"Landmarks": "Landmarks",
|
||||
"Looter": "Looter",
|
||||
"Prize": "Prize",
|
||||
"Prizes": "Prizes",
|
||||
"Reaction": "Reaction",
|
||||
"Reserve": "Reserve",
|
||||
"Ruins": "Ruins",
|
||||
"Shelter": "Shelter",
|
||||
"Shelters": "Shelters",
|
||||
"Trash": "Trash",
|
||||
"Traveller": "Traveller",
|
||||
"Treasure": "Treasure",
|
||||
"Victory": "Victory"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"exclude": [
|
||||
"token",
|
||||
"Tokens"
|
||||
],
|
||||
"include": [
|
||||
"Coins",
|
||||
"Coin",
|
||||
"Cards",
|
||||
"Card",
|
||||
"Buys",
|
||||
"Buy",
|
||||
"Actions",
|
||||
"Action"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"adventures": {
|
||||
"set_name": "Aventures",
|
||||
"text_icon": "Ad"
|
||||
},
|
||||
"adventures extras": {
|
||||
"set_name": "Adventures Extras",
|
||||
"text_icon": "Ad"
|
||||
},
|
||||
"alchemy": {
|
||||
"set_name": "Alchimie",
|
||||
"text_icon": "Al"
|
||||
},
|
||||
"base": {
|
||||
"set_name": "Base",
|
||||
"text_icon": "B"
|
||||
},
|
||||
"cornucopia": {
|
||||
"set_name": "Abondance",
|
||||
"text_icon": "Ab"
|
||||
},
|
||||
"cornucopia extras": {
|
||||
"set_name": "Cornucopia Extras",
|
||||
"text_icon": "C"
|
||||
},
|
||||
"dark ages": {
|
||||
"set_name": "Age Des Ténèbres",
|
||||
"text_icon": "AT"
|
||||
},
|
||||
"dark ages extras": {
|
||||
"set_name": "Dark Ages Extras",
|
||||
"text_icon": "DA"
|
||||
},
|
||||
"dominion1stEdition": {
|
||||
"set_name": "Dominion 1er Édition",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D1"
|
||||
},
|
||||
"dominion2ndEdition": {
|
||||
"set_name": "Dominion 2e Édition",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"dominion2ndEditionUpgrade": {
|
||||
"set_name": "Dominion 2e Édition Surclassement",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"empires": {
|
||||
"set_name": "Empires",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"empires extras": {
|
||||
"set_name": "Empires Extras",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"extras": {
|
||||
"set_name": "Supplémentaire",
|
||||
"text_icon": "S"
|
||||
},
|
||||
"guilds": {
|
||||
"set_name": "Guildes",
|
||||
"text_icon": "G"
|
||||
},
|
||||
"hinterlands": {
|
||||
"set_name": "L'Arrière-pays",
|
||||
"text_icon": "Ar"
|
||||
},
|
||||
"intrigue1stEdition": {
|
||||
"set_name": "L'Intrigue 1er Édition",
|
||||
"short_name": "L'Intrigue",
|
||||
"text_icon": "I1"
|
||||
},
|
||||
"intrigue2ndEdition": {
|
||||
"set_name": "L'Intrigue 2e Édition",
|
||||
"short_name": "L'Intrigue",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"intrigue2ndEditionUpgrade": {
|
||||
"set_name": "L'Intrigue 2e Édition Surclassement",
|
||||
"short_name": "L'Intrigue",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"promo": {
|
||||
"set_name": "Promo",
|
||||
"text_icon": "Pm"
|
||||
},
|
||||
"prosperity": {
|
||||
"set_name": "Prosperité",
|
||||
"text_icon": "P"
|
||||
},
|
||||
"seaside": {
|
||||
"set_name": "Rivages",
|
||||
"text_icon": "R"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Action": "Action",
|
||||
"Attack": "Attack",
|
||||
"Blank": "Blank",
|
||||
"Castle": "Castle",
|
||||
"Curse": "Curse",
|
||||
"Duration": "Duration",
|
||||
"Event": "Event",
|
||||
"Events": "Events",
|
||||
"Expansion": "Expansion",
|
||||
"Gathering": "Gathering",
|
||||
"Landmark": "Landmark",
|
||||
"Landmarks": "Landmarks",
|
||||
"Looter": "Looter",
|
||||
"Prize": "Prize",
|
||||
"Prizes": "Prizes",
|
||||
"Reaction": "Reaction",
|
||||
"Reserve": "Reserve",
|
||||
"Ruins": "Ruins",
|
||||
"Shelter": "Shelter",
|
||||
"Shelters": "Shelters",
|
||||
"Trash": "Trash",
|
||||
"Traveller": "Traveller",
|
||||
"Treasure": "Treasure",
|
||||
"Victory": "Victory"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"exclude": [
|
||||
"token",
|
||||
"Tokens"
|
||||
],
|
||||
"include": [
|
||||
"Monete",
|
||||
"Moneta",
|
||||
"Carte",
|
||||
"Carta",
|
||||
"Acquisti",
|
||||
"Acquisto",
|
||||
"Azioni",
|
||||
"Azione"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"adventures": {
|
||||
"set_name": "Adventures",
|
||||
"text_icon": "Ad"
|
||||
},
|
||||
"adventures extras": {
|
||||
"set_name": "Adventures Extras",
|
||||
"text_icon": "Ad"
|
||||
},
|
||||
"alchemy": {
|
||||
"set_name": "Alchimia",
|
||||
"text_icon": "Al"
|
||||
},
|
||||
"base": {
|
||||
"set_name": "Base",
|
||||
"text_icon": "B"
|
||||
},
|
||||
"cornucopia": {
|
||||
"set_name": "Cornucopia",
|
||||
"text_icon": "C"
|
||||
},
|
||||
"cornucopia extras": {
|
||||
"set_name": "Cornucopia Extras",
|
||||
"text_icon": "C"
|
||||
},
|
||||
"dark ages": {
|
||||
"set_name": "Dark Ages",
|
||||
"text_icon": "D"
|
||||
},
|
||||
"dark ages extras": {
|
||||
"set_name": "Dark Ages Extras",
|
||||
"text_icon": "DA"
|
||||
},
|
||||
"dominion1stEdition": {
|
||||
"set_name": "Dominion 1° Edizione",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D1"
|
||||
},
|
||||
"dominion2ndEdition": {
|
||||
"set_name": "Dominion 2° Edizione",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"dominion2ndEditionUpgrade": {
|
||||
"set_name": "Dominion 2° Edizione di Aggiornamento",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"empires": {
|
||||
"set_name": "Empires",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"empires extras": {
|
||||
"set_name": "Empires Extras",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"extras": {
|
||||
"set_name": "Extra",
|
||||
"text_icon": "Ex"
|
||||
},
|
||||
"guilds": {
|
||||
"set_name": "Guilds",
|
||||
"text_icon": "G"
|
||||
},
|
||||
"hinterlands": {
|
||||
"set_name": "Nuovi Orizzonti",
|
||||
"text_icon": "NO"
|
||||
},
|
||||
"intrigue1stEdition": {
|
||||
"set_name": "Intrigo 2° Edizione",
|
||||
"short_name": "Intrigo",
|
||||
"text_icon": "I1"
|
||||
},
|
||||
"intrigue2ndEdition": {
|
||||
"set_name": "Intrigo 2° Edizione",
|
||||
"short_name": "Intrigo",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"intrigue2ndEditionUpgrade": {
|
||||
"set_name": "Intrigo 2° Edizione di Aggiornamento",
|
||||
"short_name": "Intrigo",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"promo": {
|
||||
"set_name": "Promo",
|
||||
"text_icon": "Pm"
|
||||
},
|
||||
"prosperity": {
|
||||
"set_name": "Prosperità",
|
||||
"text_icon": "P"
|
||||
},
|
||||
"seaside": {
|
||||
"set_name": "Seaside",
|
||||
"text_icon": "S"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Action": "Action",
|
||||
"Attack": "Attack",
|
||||
"Blank": "Blank",
|
||||
"Castle": "Castle",
|
||||
"Curse": "Curse",
|
||||
"Duration": "Duration",
|
||||
"Event": "Event",
|
||||
"Events": "Events",
|
||||
"Expansion": "Expansion",
|
||||
"Gathering": "Gathering",
|
||||
"Landmark": "Landmark",
|
||||
"Landmarks": "Landmarks",
|
||||
"Looter": "Looter",
|
||||
"Prize": "Prize",
|
||||
"Prizes": "Prizes",
|
||||
"Reaction": "Reaction",
|
||||
"Reserve": "Reserve",
|
||||
"Ruins": "Ruins",
|
||||
"Shelter": "Shelter",
|
||||
"Shelters": "Shelters",
|
||||
"Trash": "Trash",
|
||||
"Traveller": "Traveller",
|
||||
"Treasure": "Treasure",
|
||||
"Victory": "Victory"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"exclude": [
|
||||
"fiche",
|
||||
"Token",
|
||||
"Tokens"
|
||||
],
|
||||
"include": [
|
||||
"Coins",
|
||||
"Coin",
|
||||
"Kaarten",
|
||||
"Kaart",
|
||||
"Aanschaffen",
|
||||
"Aanschaf",
|
||||
"Acties",
|
||||
"Actie"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"adventures": {
|
||||
"set_name": "Avonturen",
|
||||
"text_icon": "Av"
|
||||
},
|
||||
"adventures extras": {
|
||||
"set_name": "Avonturen Extras",
|
||||
"text_icon": "Av"
|
||||
},
|
||||
"alchemy": {
|
||||
"set_name": "Alchemisten",
|
||||
"text_icon": "A"
|
||||
},
|
||||
"base": {
|
||||
"set_name": "Basis",
|
||||
"text_icon": "B"
|
||||
},
|
||||
"cornucopia": {
|
||||
"set_name": "Overvloed",
|
||||
"text_icon": "O"
|
||||
},
|
||||
"cornucopia extras": {
|
||||
"set_name": "Overvloed Extras",
|
||||
"text_icon": "O"
|
||||
},
|
||||
"dark ages": {
|
||||
"set_name": "De Donkere Middeleeuwen",
|
||||
"text_icon": "DM"
|
||||
},
|
||||
"dark ages extras": {
|
||||
"set_name": "De Donkere Middeleeuwen Extras",
|
||||
"text_icon": "DM"
|
||||
},
|
||||
"dominion1stEdition": {
|
||||
"set_name": "Dominion 1st Edition",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D1"
|
||||
},
|
||||
"dominion2ndEdition": {
|
||||
"set_name": "Dominion 2nd Edition",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"dominion2ndEditionUpgrade": {
|
||||
"set_name": "Dominion 2nd Edition Upgrade",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"empires": {
|
||||
"set_name": "Empires",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"empires extras": {
|
||||
"set_name": "Empires Extras",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"extras": {
|
||||
"set_name": "Extras",
|
||||
"text_icon": "X"
|
||||
},
|
||||
"guilds": {
|
||||
"set_name": "Gilden",
|
||||
"text_icon": "G"
|
||||
},
|
||||
"hinterlands": {
|
||||
"set_name": "Achterland",
|
||||
"text_icon": "Ac"
|
||||
},
|
||||
"intrigue1stEdition": {
|
||||
"set_name": "Intrige 1st Edition",
|
||||
"short_name": "Intrige",
|
||||
"text_icon": "I1"
|
||||
},
|
||||
"intrigue2ndEdition": {
|
||||
"set_name": "Intrige 2nd Edition",
|
||||
"short_name": "Intrige",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"intrigue2ndEditionUpgrade": {
|
||||
"set_name": "Intrige 2nd Edition Upgrade",
|
||||
"short_name": "Intrige",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"promo": {
|
||||
"set_name": "Promo",
|
||||
"text_icon": "Pm"
|
||||
},
|
||||
"prosperity": {
|
||||
"set_name": "Welvaart",
|
||||
"text_icon": "W"
|
||||
},
|
||||
"seaside": {
|
||||
"set_name": "Hijs De Zeilen",
|
||||
"text_icon": "HZ"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Action": "Actie",
|
||||
"Attack": "Attack",
|
||||
"Blank": "Blank",
|
||||
"Castle": "Castle",
|
||||
"Curse": "Curse",
|
||||
"Duration": "Duration",
|
||||
"Event": "Event",
|
||||
"Events": "Events",
|
||||
"Expansion": "Expansion",
|
||||
"Gathering": "Gathering",
|
||||
"Landmark": "Landmark",
|
||||
"Landmarks": "Landmarks",
|
||||
"Looter": "Looter",
|
||||
"Prize": "Prijs",
|
||||
"Prizes": "Prijzen",
|
||||
"Reaction": "Reaction",
|
||||
"Reserve": "Reserve",
|
||||
"Ruins": "Ruïne",
|
||||
"Shelter": "Shelter",
|
||||
"Shelters": "Shelters",
|
||||
"Trash": "Vernietigde Kaarten",
|
||||
"Traveller": "Traveller",
|
||||
"Treasure": "Treasure",
|
||||
"Victory": "Victory"
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
{
|
||||
"adventures": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "adventures_set.png",
|
||||
"set_name": "*adventures*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"adventures extras": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "adventures_set.png",
|
||||
"no_randomizer": true,
|
||||
"set_name": "*adventures extras*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"alchemy": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "alchemy_set.png",
|
||||
"set_name": "*alchemy*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"base": {
|
||||
"edition": [
|
||||
"1",
|
||||
"2",
|
||||
"latest"
|
||||
],
|
||||
"image": "",
|
||||
"set_name": "*base*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"cornucopia": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "cornucopia_set.png",
|
||||
"set_name": "*cornucopia*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"cornucopia extras": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "cornucopia_set.png",
|
||||
"no_randomizer": true,
|
||||
"set_name": "*cornucopia extras*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"dark ages": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "dark_ages_set.png",
|
||||
"set_name": "*dark ages*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"dark ages extras": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "dark_ages_set.png",
|
||||
"no_randomizer": true,
|
||||
"set_name": "*dark ages extras*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"dominion1stEdition": {
|
||||
"edition": [
|
||||
"1"
|
||||
],
|
||||
"image": "dominion1stEdition_set.png",
|
||||
"set_name": "*dominion1stEdition*",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"dominion2ndEdition": {
|
||||
"edition": [
|
||||
"2",
|
||||
"latest"
|
||||
],
|
||||
"image": "dominion2ndEdition_set.png",
|
||||
"set_name": "*dominion2ndEdition*",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"dominion2ndEditionUpgrade": {
|
||||
"edition": [
|
||||
"1"
|
||||
],
|
||||
"image": "dominion2ndEdition_set.png",
|
||||
"set_name": "*dominion2ndEditionUpgrade*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"empires": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "empires_set.png",
|
||||
"set_name": "*empires*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"empires extras": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "empires_set.png",
|
||||
"no_randomizer": true,
|
||||
"set_name": "*empires extras*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"extras": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "",
|
||||
"no_randomizer": true,
|
||||
"set_name": "*extras*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"guilds": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "guilds_set.png",
|
||||
"set_name": "*guilds*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"hinterlands": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "hinterlands_set.png",
|
||||
"set_name": "*hinterlands*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"intrigue1stEdition": {
|
||||
"edition": [
|
||||
"1"
|
||||
],
|
||||
"image": "intrigue1stEdition_set.png",
|
||||
"set_name": "*intrigue1stEdition*",
|
||||
"short_name": "Intrigue",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"intrigue2ndEdition": {
|
||||
"edition": [
|
||||
"2",
|
||||
"latest"
|
||||
],
|
||||
"image": "intrigue2ndEdition_set.png",
|
||||
"set_name": "*intrigue2ndEdition*",
|
||||
"short_name": "Intrigue",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"intrigue2ndEditionUpgrade": {
|
||||
"edition": [
|
||||
"1"
|
||||
],
|
||||
"image": "intrigue2ndEdition_set.png",
|
||||
"set_name": "*intrigue2ndEditionUpgrade*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"promo": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "promo_set.png",
|
||||
"set_name": "*promo*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"prosperity": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "prosperity_set.png",
|
||||
"set_name": "*prosperity*",
|
||||
"text_icon": "*"
|
||||
},
|
||||
"seaside": {
|
||||
"edition": [
|
||||
"1",
|
||||
"latest"
|
||||
],
|
||||
"image": "seaside_set.png",
|
||||
"set_name": "*seaside*",
|
||||
"text_icon": "*"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
# Translation Instructions
|
||||
|
||||
## File Format
|
||||
/card_db/
|
||||
xx/
|
||||
bonuses_xx.json
|
||||
cards_xx.json
|
||||
sets_xx.json
|
||||
types_xx.json
|
||||
|
||||
where xx is ISO 639-1 standard language code in lower case with under bar '_' replacing dash '-'
|
||||
Please rename the directory and the files to match the language you are providing.
|
||||
|
||||
|
||||
## Character encoding
|
||||
The files:
|
||||
bonuses_xx.json
|
||||
cards_xx.json
|
||||
sets_xx.json
|
||||
types_xx.json
|
||||
must be encoded in ISO 8859-15, also known as "Latin alphabet no. 9"
|
||||
This character set is used throughout the Americas, Western Europe, Oceania, and much of Africa.
|
||||
It is also commonly used in most standard romanizations of East-Asian languages.
|
||||
|
||||
If you have a language that is not supported by ISO 8859-15 please contact the developers.
|
||||
|
||||
|
||||
## Anatomy of sets_xx.json
|
||||
Entries in this file represent Dominion sets/expansions. A typical entry looks like:
|
||||
"alchemy": {
|
||||
"set_name": "Alchimia",
|
||||
"text_icon": "Al"
|
||||
},
|
||||
|
||||
The set key word (e.g., "alchemy" for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||
The key word "set_name" MUST NOT BE CHANGED, but the value after the : should be changed to the name of the set in the target language.
|
||||
The key word "text_icon" MUST NOT BE CHANGED, but the value after the : should be a one or two letter identifier to be used by the set if the set graphics are not displayed. This is usually the first letter of the set name in the target language.
|
||||
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||
|
||||
|
||||
## Anatomy of bonuses_xx.json
|
||||
Entries in this file represent Dominion bonuses. The items in the "include" list are items that will be marked bold (i.e., <b>..</b>)
|
||||
when found in the card text in the following format:
|
||||
+# item_from_include_list
|
||||
as long as this is not followed by a item from the "exclude" list.
|
||||
For example in English:
|
||||
"+2 Buys" will be made bold, but
|
||||
"+1 Action token" will not, since the key word token follows.
|
||||
|
||||
Just replace the English terms with the terms used in the target language.
|
||||
Generally you should include the singular as well as the plural version of the term.
|
||||
English versions do not need to be duplicated, since they are used automatically.
|
||||
The key words "exclude" and "include" MUST NOT BE CHANGED.
|
||||
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||
|
||||
## Anatomy of types_xx.json
|
||||
Entries in this file represent Dominion card types. A typical entry looks like:
|
||||
"Action": "Action in new language",
|
||||
|
||||
The type key word (i.e., the "Action": for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||
|
||||
## Anatomy of cards_xx.json
|
||||
Entries in this file represent Dominion cards, and groups of cards. A typical entry looks like:
|
||||
"Gold": {
|
||||
"description": "Worth 3 Coins.",
|
||||
"extra": "30 cards per game.",
|
||||
"name": "Gold",
|
||||
"untranslated" : "description, extra, name"
|
||||
},
|
||||
The card key word (e.g., "Gold": for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||
The key word "name" MUST NOT BE CHANGED, but the value after the : should be changed to the name of the card in the target language.
|
||||
The key word "description" MUST NOT BE CHANGED, but the value after the : should be changed to the card text in the target language.
|
||||
The key word "extra" MUST NOT BE CHANGED, but the value after the : should be changed to any extra rules or explanations for the card in the target language. If you purposely want no extra text, enter "".
|
||||
The key word "untranslated" MUST NOT BE CHANGED, but the value after the : should be changed. Removed any key word for which you have provided a translation.
|
||||
For example:
|
||||
- if you provided the "name" of the card, and only the "name", then change to "description, extra"
|
||||
- if you provided the "name" of the card and it's "description", but have not translated the "extra", then change to "extra"
|
||||
- if you provided all 3 entries, then change to ""
|
||||
The "untranslated" entry is used during maintanance of the language files to update any remaining default language entries that might have changed.
|
||||
|
||||
|
||||
## Special Text
|
||||
These character sequences have special meaning in the "description" and "extra" text:
|
||||
|
||||
'<b>' ... '</b>' for bold
|
||||
'<i>' ... '</i>' for italics
|
||||
'<u>' ... '</u>' for underline
|
||||
'<tab>' and '<t>' and '\t' to add a tab (4 spaces)
|
||||
'<n>' and '\n' for a "hard new line"
|
||||
'<br>' and '<br/>' and '<br />' for a "soft new line"
|
||||
'<c>' and '<center>' add hard new line and center text until the next hard new line
|
||||
'<l>' and '<left>' add hard new line and left align text until the next hard new line
|
||||
'<r>' and '<right>' add hard new line and right align text until the next hard new line
|
||||
'<j>' and '<justify>' add hard new line and justify align text until the next hard new line
|
||||
'<line>' to add a hard new line, a centered dividing line, and a trailing hard new line
|
||||
|
||||
Hard new lines ('\n' and '<n>'), will reset the paragraph formatting back to the default.
|
||||
Soft new lines will insert a new line, but will continue the current formatting.
|
||||
The "description" will be default to "center" text.
|
||||
The "extra" will default to "justify" text.
|
||||
|
||||
## Special Images
|
||||
Special character sequences are recognized by the program to substitute graphics in the text. These include:
|
||||
|
||||
'<VP>' and ' VP ' for a Victory Point graphic
|
||||
'Potion' for a small Potion graphic
|
||||
'# Coin' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||
'# Coins' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||
'# coin' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||
'# coins' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||
For example:
|
||||
- the text '1 coin' would produce a graphic of a coin with the number 1 on top.
|
||||
- the text 'empty coin' and '_ coin' would produce a graphic of only a coin.
|
||||
|
||||
'# <*COIN*>' where # is a number 0 - 13, will produce a large coin graphic with the # on top
|
||||
'# <*VP*>' where # is a number, will produce a large Victory Point graphic with the # before it
|
||||
'# <*POTION*>' where # is a number, will produce a large Potion graphic with the # before it
|
||||
|
||||
To keep the special images, please do not translate '<VP>', 'Potion', or the 'coin' variations into the target language.
|
||||
|
||||
## Style Guide
|
||||
|
||||
- If bonuses_xx.json for the target language is configured correctly, bonuses within the text will automatically be bolded.
|
||||
It will not bold the text if it is followed by 'token' or 'Token'.
|
||||
Example: "Choose one: +3 Cards; or +2 Actions." will bold '+3 Cards' and '+2 Actions'.
|
||||
|
||||
- Bonuses should be listed in the following order:
|
||||
+Cards, +Actions, +Buys, +Coins, then +<VP>
|
||||
|
||||
- When possible, bonuses should be listed vertically and centered.
|
||||
Examples: "+1 Card<br>+1 Action<br>+1 Buy<br>+1 Coin<br>+2 <VP><n>"
|
||||
"+1 Card\n+1 Action\n+1 Buy\n+1 Coin\n+2 <VP>\n"
|
||||
The "description" field by default is centered. '<br>', '<n>', and '\n' will all provide new lines.
|
||||
|
||||
- If a Dividers/Tab has more than one card explanation, if space permits, try to mimic a stand alone Dividers/Tab in the overall format.
|
||||
Example from "Settlers - Bustling Village": "<left><u>Settlers</u>:<n>+1 Card<br>+1 Action<n>Look through your discard pile. You may reveal a Copper from it and put it into your hand.<n><left><u>Bustling Village</u>:<n><center>+1 Card<br>+3 Actions<n>Look through your discard pile. You may reveal a Settlers from it and put it into your hand."
|
||||
|
||||
@@ -0,0 +1,371 @@
|
||||
[{
|
||||
"card_type": [
|
||||
"Action"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Attack"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Attack",
|
||||
"Duration"
|
||||
],
|
||||
"card_type_image": "duration.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Attack",
|
||||
"Looter"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Attack",
|
||||
"Prize"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 1,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Attack",
|
||||
"Traveller"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 5,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Duration"
|
||||
],
|
||||
"card_type_image": "duration.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Duration",
|
||||
"Reaction"
|
||||
],
|
||||
"card_type_image": "duration-reaction.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Gathering"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Looter"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Prize"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 1,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Reaction"
|
||||
],
|
||||
"card_type_image": "reaction.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Reserve"
|
||||
],
|
||||
"card_type_image": "reserve.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Reserve",
|
||||
"Victory"
|
||||
],
|
||||
"card_type_image": "reserve-victory.png",
|
||||
"defaultCardCount": 12,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Ruins"
|
||||
],
|
||||
"card_type_image": "ruins.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": 1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Shelter"
|
||||
],
|
||||
"card_type_image": "action-shelter.png",
|
||||
"defaultCardCount": 6,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Traveller"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 5,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Treasure"
|
||||
],
|
||||
"card_type_image": "action-treasure.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Action",
|
||||
"Victory"
|
||||
],
|
||||
"card_type_image": "action-victory.png",
|
||||
"defaultCardCount": 12,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Blank"
|
||||
],
|
||||
"card_type_image": "",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Curse"
|
||||
],
|
||||
"card_type_image": "curse.png",
|
||||
"defaultCardCount": 30,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 3
|
||||
},{
|
||||
"card_type": [
|
||||
"Event"
|
||||
],
|
||||
"card_type_image": "event.png",
|
||||
"defaultCardCount": 1,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Events"
|
||||
],
|
||||
"card_type_image": "event.png",
|
||||
"defaultCardCount": 0,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Expansion"
|
||||
],
|
||||
"card_type_image": "expansion.png",
|
||||
"defaultCardCount": 0,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 4
|
||||
},{
|
||||
"card_type": [
|
||||
"Landmark"
|
||||
],
|
||||
"card_type_image": "landmark.png",
|
||||
"defaultCardCount": 1,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Landmarks"
|
||||
],
|
||||
"card_type_image": "landmark.png",
|
||||
"defaultCardCount": 0,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Prize"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 1,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Prizes"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 0,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Reaction"
|
||||
],
|
||||
"card_type_image": "reaction.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Reaction",
|
||||
"Shelter"
|
||||
],
|
||||
"card_type_image": "reaction-shelter.png",
|
||||
"defaultCardCount": 6,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Shelters"
|
||||
],
|
||||
"card_type_image": "shelter.png",
|
||||
"defaultCardCount": 0,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Trash"
|
||||
],
|
||||
"card_type_image": "action.png",
|
||||
"defaultCardCount": 1,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Treasure"
|
||||
],
|
||||
"card_type_image": "treasure.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": 0,
|
||||
"tabTextHeightOffset": 3
|
||||
},{
|
||||
"card_type": [
|
||||
"Treasure",
|
||||
"Attack"
|
||||
],
|
||||
"card_type_image": "treasure.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Treasure",
|
||||
"Prize"
|
||||
],
|
||||
"card_type_image": "treasure.png",
|
||||
"defaultCardCount": 1,
|
||||
"tabCostHeightOffset": 0,
|
||||
"tabTextHeightOffset": 3
|
||||
},{
|
||||
"card_type": [
|
||||
"Treasure",
|
||||
"Reaction"
|
||||
],
|
||||
"card_type_image": "treasure-reaction.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": 1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Treasure",
|
||||
"Reserve"
|
||||
],
|
||||
"card_type_image": "reserve-treasure.png",
|
||||
"defaultCardCount": 10,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Treasure",
|
||||
"Victory"
|
||||
],
|
||||
"card_type_image": "treasure-victory.png",
|
||||
"defaultCardCount": 12,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Victory"
|
||||
],
|
||||
"card_type_image": "victory.png",
|
||||
"defaultCardCount": 12,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Victory",
|
||||
"Castle"
|
||||
],
|
||||
"card_type_image": "victory.png",
|
||||
"defaultCardCount": 12,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Victory",
|
||||
"Reaction"
|
||||
],
|
||||
"card_type_image": "victory-reaction.png",
|
||||
"defaultCardCount": 12,
|
||||
"tabCostHeightOffset": 1,
|
||||
"tabTextHeightOffset": 0
|
||||
},{
|
||||
"card_type": [
|
||||
"Victory",
|
||||
"Shelter"
|
||||
],
|
||||
"card_type_image": "victory-shelter.png",
|
||||
"defaultCardCount": 6,
|
||||
"tabCostHeightOffset": -1,
|
||||
"tabTextHeightOffset": 0
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"exclude": [
|
||||
"token",
|
||||
"Tokens"
|
||||
],
|
||||
"include": [
|
||||
"Coins",
|
||||
"Coin",
|
||||
"Cards",
|
||||
"Card",
|
||||
"Buys",
|
||||
"Buy",
|
||||
"Actions",
|
||||
"Action"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"adventures": {
|
||||
"set_name": "Adventures",
|
||||
"text_icon": "Ad"
|
||||
},
|
||||
"adventures extras": {
|
||||
"set_name": "Adventures Extras",
|
||||
"text_icon": "Ad"
|
||||
},
|
||||
"alchemy": {
|
||||
"set_name": "Alchemy",
|
||||
"text_icon": "A"
|
||||
},
|
||||
"base": {
|
||||
"set_name": "Base",
|
||||
"text_icon": "B"
|
||||
},
|
||||
"cornucopia": {
|
||||
"set_name": "Cornucopia",
|
||||
"text_icon": "C"
|
||||
},
|
||||
"cornucopia extras": {
|
||||
"set_name": "Cornucopia Extras",
|
||||
"text_icon": "C"
|
||||
},
|
||||
"dark ages": {
|
||||
"set_name": "Dark Ages",
|
||||
"text_icon": "DA"
|
||||
},
|
||||
"dark ages extras": {
|
||||
"set_name": "Dark Ages Extras",
|
||||
"text_icon": "DA"
|
||||
},
|
||||
"dominion1stEdition": {
|
||||
"set_name": "Dominion 1st Edition",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D1"
|
||||
},
|
||||
"dominion2ndEdition": {
|
||||
"set_name": "Dominion 2nd Edition",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"dominion2ndEditionUpgrade": {
|
||||
"set_name": "Dominion 2nd Edition Upgrade",
|
||||
"short_name": "Dominion",
|
||||
"text_icon": "D2"
|
||||
},
|
||||
"empires": {
|
||||
"set_name": "Empires",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"empires extras": {
|
||||
"set_name": "Empires Extras",
|
||||
"text_icon": "E"
|
||||
},
|
||||
"extras": {
|
||||
"set_name": "Extras",
|
||||
"text_icon": "X"
|
||||
},
|
||||
"guilds": {
|
||||
"set_name": "Guilds",
|
||||
"text_icon": "G"
|
||||
},
|
||||
"hinterlands": {
|
||||
"set_name": "Hinterlands",
|
||||
"text_icon": "H"
|
||||
},
|
||||
"intrigue1stEdition": {
|
||||
"set_name": "Intrigue 1st Edition",
|
||||
"short_name": "Intrigue",
|
||||
"text_icon": "I1"
|
||||
},
|
||||
"intrigue2ndEdition": {
|
||||
"set_name": "Intrigue 2nd Edition",
|
||||
"short_name": "Intrigue",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"intrigue2ndEditionUpgrade": {
|
||||
"set_name": "Intrigue 2nd Edition Upgrade",
|
||||
"short_name": "Intrigue",
|
||||
"text_icon": "I2"
|
||||
},
|
||||
"promo": {
|
||||
"set_name": "Promo",
|
||||
"text_icon": "Po"
|
||||
},
|
||||
"prosperity": {
|
||||
"set_name": "Prosperity",
|
||||
"text_icon": "Py"
|
||||
},
|
||||
"seaside": {
|
||||
"set_name": "Seaside",
|
||||
"text_icon": "S"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
# Translation Instructions
|
||||
|
||||
## File Format
|
||||
/card_db/
|
||||
xx/
|
||||
bonuses_xx.json
|
||||
cards_xx.json
|
||||
sets_xx.json
|
||||
types_xx.json
|
||||
|
||||
where xx is ISO 639-1 standard language code in lower case with under bar '_' replacing dash '-'
|
||||
Please rename the directory and the files to match the language you are providing.
|
||||
|
||||
|
||||
## Character encoding
|
||||
The files:
|
||||
bonuses_xx.json
|
||||
cards_xx.json
|
||||
sets_xx.json
|
||||
types_xx.json
|
||||
must be encoded in ISO 8859-15, also known as "Latin alphabet no. 9"
|
||||
This character set is used throughout the Americas, Western Europe, Oceania, and much of Africa.
|
||||
It is also commonly used in most standard romanizations of East-Asian languages.
|
||||
|
||||
If you have a language that is not supported by ISO 8859-15 please contact the developers.
|
||||
|
||||
|
||||
## Anatomy of sets_xx.json
|
||||
Entries in this file represent Dominion sets/expansions. A typical entry looks like:
|
||||
"alchemy": {
|
||||
"set_name": "Alchimia",
|
||||
"text_icon": "Al"
|
||||
},
|
||||
|
||||
The set key word (e.g., "alchemy" for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||
The key word "set_name" MUST NOT BE CHANGED, but the value after the : should be changed to the name of the set in the target language.
|
||||
The key word "text_icon" MUST NOT BE CHANGED, but the value after the : should be a one or two letter identifier to be used by the set if the set graphics are not displayed. This is usually the first letter of the set name in the target language.
|
||||
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||
|
||||
|
||||
## Anatomy of bonuses_xx.json
|
||||
Entries in this file represent Dominion bonuses. The items in the "include" list are items that will be marked bold (i.e., <b>..</b>)
|
||||
when found in the card text in the following format:
|
||||
+# item_from_include_list
|
||||
as long as this is not followed by a item from the "exclude" list.
|
||||
For example in English:
|
||||
"+2 Buys" will be made bold, but
|
||||
"+1 Action token" will not, since the key word token follows.
|
||||
|
||||
Just replace the English terms with the terms used in the target language.
|
||||
Generally you should include the singular as well as the plural version of the term.
|
||||
English versions do not need to be duplicated, since they are used automatically.
|
||||
The key words "exclude" and "include" MUST NOT BE CHANGED.
|
||||
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||
|
||||
## Anatomy of types_xx.json
|
||||
Entries in this file represent Dominion card types. A typical entry looks like:
|
||||
"Action": "Action in new language",
|
||||
|
||||
The type key word (i.e., the "Action": for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||
|
||||
## Anatomy of cards_xx.json
|
||||
Entries in this file represent Dominion cards, and groups of cards. A typical entry looks like:
|
||||
"Gold": {
|
||||
"description": "Worth 3 Coins.",
|
||||
"extra": "30 cards per game.",
|
||||
"name": "Gold",
|
||||
"untranslated" : "description, extra, name"
|
||||
},
|
||||
The card key word (e.g., "Gold": for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||
The key word "name" MUST NOT BE CHANGED, but the value after the : should be changed to the name of the card in the target language.
|
||||
The key word "description" MUST NOT BE CHANGED, but the value after the : should be changed to the card text in the target language.
|
||||
The key word "extra" MUST NOT BE CHANGED, but the value after the : should be changed to any extra rules or explanations for the card in the target language. If you purposely want no extra text, enter "".
|
||||
The key word "untranslated" MUST NOT BE CHANGED, but the value after the : should be changed. Removed any key word for which you have provided a translation.
|
||||
For example:
|
||||
- if you provided the "name" of the card, and only the "name", then change to "description, extra"
|
||||
- if you provided the "name" of the card and it's "description", but have not translated the "extra", then change to "extra"
|
||||
- if you provided all 3 entries, then change to ""
|
||||
The "untranslated" entry is used during maintanance of the language files to update any remaining default language entries that might have changed.
|
||||
|
||||
|
||||
## Special Text
|
||||
These character sequences have special meaning in the "description" and "extra" text:
|
||||
|
||||
'<b>' ... '</b>' for bold
|
||||
'<i>' ... '</i>' for italics
|
||||
'<u>' ... '</u>' for underline
|
||||
'<tab>' and '<t>' and '\t' to add a tab (4 spaces)
|
||||
'<n>' and '\n' for a "hard new line"
|
||||
'<br>' and '<br/>' and '<br />' for a "soft new line"
|
||||
'<c>' and '<center>' add hard new line and center text until the next hard new line
|
||||
'<l>' and '<left>' add hard new line and left align text until the next hard new line
|
||||
'<r>' and '<right>' add hard new line and right align text until the next hard new line
|
||||
'<j>' and '<justify>' add hard new line and justify align text until the next hard new line
|
||||
'<line>' to add a hard new line, a centered dividing line, and a trailing hard new line
|
||||
|
||||
Hard new lines ('\n' and '<n>'), will reset the paragraph formatting back to the default.
|
||||
Soft new lines will insert a new line, but will continue the current formatting.
|
||||
The "description" will be default to "center" text.
|
||||
The "extra" will default to "justify" text.
|
||||
|
||||
## Special Images
|
||||
Special character sequences are recognized by the program to substitute graphics in the text. These include:
|
||||
|
||||
'<VP>' and ' VP ' for a Victory Point graphic
|
||||
'Potion' for a small Potion graphic
|
||||
'# Coin' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||
'# Coins' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||
'# coin' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||
'# coins' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||
For example:
|
||||
- the text '1 coin' would produce a graphic of a coin with the number 1 on top.
|
||||
- the text 'empty coin' and '_ coin' would produce a graphic of only a coin.
|
||||
|
||||
'# <*COIN*>' where # is a number 0 - 13, will produce a large coin graphic with the # on top
|
||||
'# <*VP*>' where # is a number, will produce a large Victory Point graphic with the # before it
|
||||
'# <*POTION*>' where # is a number, will produce a large Potion graphic with the # before it
|
||||
|
||||
To keep the special images, please do not translate '<VP>', 'Potion', or the 'coin' variations into the target language.
|
||||
|
||||
## Style Guide
|
||||
|
||||
- If bonuses_xx.json for the target language is configured correctly, bonuses within the text will automatically be bolded.
|
||||
It will not bold the text if it is followed by 'token' or 'Token'.
|
||||
Example: "Choose one: +3 Cards; or +2 Actions." will bold '+3 Cards' and '+2 Actions'.
|
||||
|
||||
- Bonuses should be listed in the following order:
|
||||
+Cards, +Actions, +Buys, +Coins, then +<VP>
|
||||
|
||||
- When possible, bonuses should be listed vertically and centered.
|
||||
Examples: "+1 Card<br>+1 Action<br>+1 Buy<br>+1 Coin<br>+2 <VP><n>"
|
||||
"+1 Card\n+1 Action\n+1 Buy\n+1 Coin\n+2 <VP>\n"
|
||||
The "description" field by default is centered. '<br>', '<n>', and '\n' will all provide new lines.
|
||||
|
||||
- If a Dividers/Tab has more than one card explanation, if space permits, try to mimic a stand alone Dividers/Tab in the overall format.
|
||||
Example from "Settlers - Bustling Village": "<left><u>Settlers</u>:<n>+1 Card<br>+1 Action<n>Look through your discard pile. You may reveal a Copper from it and put it into your hand.<n><left><u>Bustling Village</u>:<n><center>+1 Card<br>+3 Actions<n>Look through your discard pile. You may reveal a Settlers from it and put it into your hand."
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Action": "Action",
|
||||
"Attack": "Attack",
|
||||
"Blank": "Blank",
|
||||
"Castle": "Castle",
|
||||
"Curse": "Curse",
|
||||
"Duration": "Duration",
|
||||
"Event": "Event",
|
||||
"Events": "Events",
|
||||
"Expansion": "Expansion",
|
||||
"Gathering": "Gathering",
|
||||
"Landmark": "Landmark",
|
||||
"Landmarks": "Landmarks",
|
||||
"Looter": "Looter",
|
||||
"Prize": "Prize",
|
||||
"Prizes": "Prizes",
|
||||
"Reaction": "Reaction",
|
||||
"Reserve": "Reserve",
|
||||
"Ruins": "Ruins",
|
||||
"Shelter": "Shelter",
|
||||
"Shelters": "Shelters",
|
||||
"Trash": "Trash",
|
||||
"Traveller": "Traveller",
|
||||
"Treasure": "Treasure",
|
||||
"Victory": "Victory"
|
||||
}
|
||||
@@ -2,6 +2,8 @@ import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
import pkg_resources
|
||||
|
||||
from reportlab.lib.units import cm
|
||||
from reportlab.pdfbase import pdfmetrics
|
||||
from reportlab.lib.styles import getSampleStyleSheet
|
||||
@@ -25,25 +27,40 @@ class DividerDrawer(object):
|
||||
self.odd = True
|
||||
self.canvas = None
|
||||
|
||||
def registerFonts(self):
|
||||
dirn = os.path.join(self.options.data_path, 'fonts')
|
||||
regularMpath = os.path.join(dirn, 'MinionPro-Regular.ttf')
|
||||
boldMpath = os.path.join(dirn, 'MinionPro-Bold.ttf')
|
||||
obliqueMpath = os.path.join(dirn, 'MinionPro-It.ttf')
|
||||
@staticmethod
|
||||
def get_image_filepath(fname):
|
||||
return pkg_resources.resource_filename('domdiv', os.path.join('images', fname))
|
||||
|
||||
if os.path.isfile(regularMpath) and os.path.isfile(boldMpath) and os.path.isfile(obliqueMpath):
|
||||
self.fontNameRegular = 'MinionPro-Regular'
|
||||
pdfmetrics.registerFont(TTFont(self.fontNameRegular, regularMpath))
|
||||
self.fontNameBold = 'MinionPro-Bold'
|
||||
pdfmetrics.registerFont(TTFont(self.fontNameBold, boldMpath))
|
||||
self.fontNameOblique = 'MinionPro-Oblique'
|
||||
pdfmetrics.registerFont(TTFont(self.fontNameOblique, obliqueMpath))
|
||||
else:
|
||||
print >> sys.stderr, "Warning, Minion Pro Font ttf file(s) not found! Falling back on Times. Tried:"
|
||||
print >> sys.stderr, regularMpath + ' ' + boldMpath + ' & ' + obliqueMpath
|
||||
self.fontNameRegular = 'Times-Roman'
|
||||
self.fontNameBold = 'Times-Bold'
|
||||
self.fontNameOblique = 'Times-Oblique'
|
||||
def registerFonts(self):
|
||||
# the following are filenames from both an Adobe Reader install and a download from fontsgeek
|
||||
fontfilenames = ['MinionPro-Regular.ttf',
|
||||
'MinionPro-Bold.ttf',
|
||||
'MinionPro-It.ttf',
|
||||
'Minion Pro Regular.ttf',
|
||||
'Minion Pro Bold.ttf',
|
||||
'Minion Pro Italic.ttf']
|
||||
# first figure out which, if any, are present
|
||||
fontpaths = [os.path.join('fonts', fname) for fname in fontfilenames]
|
||||
fontpaths = [fpath for fpath in fontpaths if pkg_resources.resource_exists('domdiv', fpath)]
|
||||
self.font_mapping = {'Regular': [fpath for fpath in fontpaths if 'Regular' in fpath],
|
||||
'Bold': [fpath for fpath in fontpaths if 'Bold' in fpath],
|
||||
'Italic': [fpath for fpath in fontpaths if 'It' in fpath]}
|
||||
# then make sure that we have at least one for each type
|
||||
for fonttype in self.font_mapping:
|
||||
if not len(self.font_mapping[fonttype]):
|
||||
print >> sys.stderr, ("Warning, Minion Pro ttf file for {} missing from domdiv/fonts!",
|
||||
" Falling back on Times font for everything.").format(fonttype)
|
||||
self.font_mapping = {'Regular': 'Times-Roman',
|
||||
'Bold': 'Times-Bold',
|
||||
'Italic': 'Times-Oblique'}
|
||||
break
|
||||
else:
|
||||
# and finally register and tag one for each type
|
||||
ftag = 'MinionPro-{}'.format(fonttype)
|
||||
pdfmetrics.registerFont(TTFont(ftag,
|
||||
pkg_resources.resource_filename('domdiv',
|
||||
self.font_mapping[fonttype][0])))
|
||||
self.font_mapping[fonttype] = ftag
|
||||
|
||||
def wantCentreTab(self, card):
|
||||
return (card.isExpansion() and self.options.centre_expansion_dividers) or self.options.tab_side == "centre"
|
||||
@@ -209,45 +226,44 @@ class DividerDrawer(object):
|
||||
|
||||
def add_inline_images(self, text, fontsize):
|
||||
# Coins
|
||||
path = os.path.join(self.options.data_path, 'images')
|
||||
replace = '<img src=' "'%s/coin_small_\\1.png'" ' width=%d height=' "'200%%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace % (path, fontsize * 2.4)
|
||||
replace = '<img src=' "'{}'" ' width={} height=' "'200%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace.format(DividerDrawer.get_image_filepath('coin_small_1.png'), fontsize * 2.4)
|
||||
text = re.sub('(\d+)\s*\<\*COIN\*\>', replace, text)
|
||||
replace = '<img src=' "'%s/coin_small_\\1.png'" ' width=%d height=' "'100%%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace % (path, fontsize * 1.2)
|
||||
replace = '<img src=' "'{}'" ' width={} height=' "'100%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace.format(DividerDrawer.get_image_filepath('coin_small_1.png'), fontsize * 1.2)
|
||||
text = re.sub('(\d+)\s(c|C)oin(s)?', replace, text)
|
||||
replace = '<img src=' "'%s/coin_small_question.png'" ' width=%d height=' "'100%%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace % (path, fontsize * 1.2)
|
||||
replace = '<img src=' "'{}'" ' width={} height=' "'100%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace.format(DividerDrawer.get_image_filepath('coin_small_question.png'), fontsize * 1.2)
|
||||
text = re.sub('\?\s(c|C)oin(s)?', replace, text)
|
||||
replace = '<img src=' "'%s/coin_small_empty.png'" ' width=%d height=' "'100%%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace % (path, fontsize * 1.2)
|
||||
replace = '<img src=' "'{}'" ' width={} height=' "'100%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace.format(DividerDrawer.get_image_filepath('coin_small_empty.png'), fontsize * 1.2)
|
||||
text = re.sub('empty\s(c|C)oin(s)?', replace, text)
|
||||
text = re.sub('\_\s(c|C)oin(s)?', replace, text)
|
||||
|
||||
# VP
|
||||
replace = '<img src=' "'%s/victory_emblem.png'" ' width=%d height=' "'120%%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace % (path, fontsize * 1.5)
|
||||
replace = '<img src=' "'{}'" ' width={} height=' "'120%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace.format(DividerDrawer.get_image_filepath('victory_emblem.png'), fontsize * 1.5)
|
||||
text = re.sub('(?:\s+|\<)VP(?:\s+|\>|\.|$)', replace, text)
|
||||
replace = '<font size=%d>\\1</font> '
|
||||
replace += '<img src=' "'%s/victory_emblem.png'" ' width=%d height=' "'200%%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace % (fontsize * 1.5, path, fontsize * 2.5)
|
||||
replace = '<font size={}>\\1</font> '
|
||||
replace += '<img src=' "'{}'" ' width={} height=' "'200%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace.format(fontsize * 1.5, DividerDrawer.get_image_filepath('victory_emblem.png'), fontsize * 2.5)
|
||||
text = re.sub('(\d+)\s*\<\*VP\*\>', replace, text)
|
||||
|
||||
# Debt
|
||||
replace = '<img src=' "'%s/debt_\\1.png'" ' width=%d height=' "'105%%'" ' valign=' "'middle'" '/> '
|
||||
replace = replace % (path, fontsize * 1.2)
|
||||
replace = '<img src=' "'{}'" ' width={} height=' "'105%'" ' valign=' "'middle'" '/> '
|
||||
replace = replace.format(DividerDrawer.get_image_filepath('debt_1.png'), fontsize * 1.2)
|
||||
text = re.sub('(\d+)\sDebt', replace, text)
|
||||
replace = '<img src=' "'%s/debt.png'" ' width=%d height=' "'105%%'" ' valign=' "'middle'" '/> '
|
||||
replace = replace % (path, fontsize * 1.2)
|
||||
replace = '<img src=' "{}" ' width={} height=' "'105%'" ' valign=' "'middle'" '/> '
|
||||
replace = replace.format(DividerDrawer.get_image_filepath('debt.png'), fontsize * 1.2)
|
||||
text = re.sub('Debt', replace, text)
|
||||
|
||||
# Potion
|
||||
replace = '<font size=%d>\\1</font> '
|
||||
replace += '<img src=' "'%s/potion_small.png'" ' width=%d height=' "'140%%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace % (fontsize * 1.5, path, fontsize * 2.0)
|
||||
replace = '<font size={}>\\1</font> '
|
||||
replace += '<img src=' "'{}'" ' width={} height=' "'140%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace.format(fontsize * 1.5, DividerDrawer.get_image_filepath('potion_small.png'), fontsize * 2.0)
|
||||
text = re.sub('(\d+)\s*\<\*POTION\*\>', replace, text)
|
||||
replace = '<img src=' "'%s/potion_small.png'" ' width=%d height=' "'100%%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace % (path, fontsize * 1.2)
|
||||
replace = '<img src=' "'{}'" ' width={} height=' "'100%'" ' valign=' "'middle'" '/>'
|
||||
replace = replace.format(DividerDrawer.get_image_filepath('potion_small.png'), fontsize * 1.2)
|
||||
text = re.sub('Potion', replace, text)
|
||||
|
||||
return text.strip()
|
||||
@@ -373,24 +389,24 @@ class DividerDrawer(object):
|
||||
width += 16
|
||||
x -= 16
|
||||
self.canvas.drawImage(
|
||||
os.path.join(self.options.data_path, 'images', 'card.png'),
|
||||
DividerDrawer.get_image_filepath('card.png'),
|
||||
x,
|
||||
countHeight,
|
||||
16,
|
||||
16,
|
||||
preserveAspectRatio=True,
|
||||
mask='auto')
|
||||
self.canvas.setFont(self.fontNameBold, 10)
|
||||
self.canvas.setFont(self.font_mapping['Bold'], 10)
|
||||
self.canvas.drawCentredString(x + 8, countHeight + 4, str(value))
|
||||
|
||||
# now draw the number of sets
|
||||
if count > 1:
|
||||
count_string = u"{}\u00d7".format(count)
|
||||
width_string = stringWidth(count_string, self.fontNameRegular, 10)
|
||||
width_string = stringWidth(count_string, self.font_mapping['Regular'], 10)
|
||||
width_string -= 1 # adjust to make it closer to image
|
||||
width += width_string
|
||||
x -= width_string
|
||||
self.canvas.setFont(self.fontNameRegular, 10)
|
||||
self.canvas.setFont(self.font_mapping['Regular'], 10)
|
||||
self.canvas.drawString(x, countHeight + 4, count_string)
|
||||
|
||||
return width + 1
|
||||
@@ -409,14 +425,14 @@ class DividerDrawer(object):
|
||||
(card.potcost and int(card.cost) == 0))):
|
||||
|
||||
self.canvas.drawImage(
|
||||
os.path.join(self.options.data_path, 'images', 'coin_small.png'),
|
||||
DividerDrawer.get_image_filepath('coin_small.png'),
|
||||
x,
|
||||
coinHeight,
|
||||
16,
|
||||
16,
|
||||
preserveAspectRatio=True,
|
||||
mask='auto')
|
||||
self.canvas.setFont(self.fontNameBold, 12)
|
||||
self.canvas.setFont(self.font_mapping['Bold'], 12)
|
||||
self.canvas.drawCentredString(x + 8, costHeight, str(card.cost))
|
||||
self.canvas.setFillColorRGB(0, 0, 0)
|
||||
x += 17
|
||||
@@ -424,7 +440,7 @@ class DividerDrawer(object):
|
||||
|
||||
if card.debtcost:
|
||||
self.canvas.drawImage(
|
||||
os.path.join(self.options.data_path, 'images', 'debt.png'),
|
||||
DividerDrawer.get_image_filepath('debt.png'),
|
||||
x,
|
||||
coinHeight,
|
||||
16,
|
||||
@@ -432,7 +448,7 @@ class DividerDrawer(object):
|
||||
preserveAspectRatio=True,
|
||||
mask=[170, 255, 170, 255, 170, 255])
|
||||
self.canvas.setFillColorRGB(1, 1, 1)
|
||||
self.canvas.setFont(self.fontNameBold, 12)
|
||||
self.canvas.setFont(self.font_mapping['Bold'], 12)
|
||||
self.canvas.drawCentredString(x + 8, costHeight, str(card.debtcost))
|
||||
self.canvas.setFillColorRGB(0, 0, 0)
|
||||
x += 17
|
||||
@@ -440,7 +456,7 @@ class DividerDrawer(object):
|
||||
|
||||
if card.potcost:
|
||||
self.canvas.drawImage(
|
||||
os.path.join(self.options.data_path, 'images', 'potion.png'),
|
||||
DividerDrawer.get_image_filepath('potion.png'),
|
||||
x,
|
||||
potHeight,
|
||||
potSize,
|
||||
@@ -455,7 +471,7 @@ class DividerDrawer(object):
|
||||
# set image
|
||||
w = 2
|
||||
self.canvas.drawImage(
|
||||
os.path.join(self.options.data_path, 'images', setImage),
|
||||
DividerDrawer.get_image_filepath(setImage),
|
||||
x,
|
||||
y,
|
||||
14,
|
||||
@@ -468,11 +484,11 @@ class DividerDrawer(object):
|
||||
name_parts = name.split()
|
||||
for i, part in enumerate(name_parts):
|
||||
if i != 0:
|
||||
w += pdfmetrics.stringWidth(' ', self.fontNameRegular,
|
||||
w += pdfmetrics.stringWidth(' ', self.font_mapping['Regular'],
|
||||
fontSize)
|
||||
w += pdfmetrics.stringWidth(part[0], self.fontNameRegular,
|
||||
w += pdfmetrics.stringWidth(part[0], self.font_mapping['Regular'],
|
||||
fontSize)
|
||||
w += pdfmetrics.stringWidth(part[1:], self.fontNameRegular,
|
||||
w += pdfmetrics.stringWidth(part[1:], self.font_mapping['Regular'],
|
||||
fontSize - 2)
|
||||
return w
|
||||
|
||||
@@ -519,7 +535,7 @@ class DividerDrawer(object):
|
||||
img = card.getType().getNoCoinTabImageFile()
|
||||
if not self.options.no_tab_artwork and img:
|
||||
self.canvas.drawImage(
|
||||
os.path.join(self.options.data_path, 'images', img),
|
||||
DividerDrawer.get_image_filepath(img),
|
||||
1,
|
||||
0,
|
||||
self.options.labelWidth - 2,
|
||||
@@ -548,7 +564,7 @@ class DividerDrawer(object):
|
||||
if self.options.use_text_set_icon:
|
||||
setImageHeight = card.getType().getTabTextHeightOffset()
|
||||
setText = card.setTextIcon()
|
||||
self.canvas.setFont(self.fontNameOblique, 8)
|
||||
self.canvas.setFont(self.font_mapping['Italic'], 8)
|
||||
if setText is None:
|
||||
setText = ""
|
||||
|
||||
@@ -611,10 +627,10 @@ class DividerDrawer(object):
|
||||
w = textInset
|
||||
|
||||
def drawWordPiece(text, fontSize):
|
||||
self.canvas.setFont(self.fontNameRegular, fontSize)
|
||||
self.canvas.setFont(self.font_mapping['Regular'], fontSize)
|
||||
if text != ' ':
|
||||
self.canvas.drawString(w, h, text)
|
||||
return pdfmetrics.stringWidth(text, self.fontNameRegular,
|
||||
return pdfmetrics.stringWidth(text, self.font_mapping['Regular'],
|
||||
fontSize)
|
||||
|
||||
for i, word in enumerate(words):
|
||||
@@ -638,10 +654,10 @@ class DividerDrawer(object):
|
||||
words.reverse()
|
||||
|
||||
def drawWordPiece(text, fontSize):
|
||||
self.canvas.setFont(self.fontNameRegular, fontSize)
|
||||
self.canvas.setFont(self.font_mapping['Regular'], fontSize)
|
||||
if text != ' ':
|
||||
self.canvas.drawRightString(w, h, text)
|
||||
return -pdfmetrics.stringWidth(text, self.fontNameRegular,
|
||||
return -pdfmetrics.stringWidth(text, self.font_mapping['Regular'],
|
||||
fontSize)
|
||||
|
||||
for i, word in enumerate(words):
|
||||
@@ -655,7 +671,7 @@ class DividerDrawer(object):
|
||||
self.canvas.translate(0, -card.getStackHeight(
|
||||
self.options.thickness)) # move into area used by the wrapper
|
||||
fontSize = 8 # use the smallest font
|
||||
self.canvas.setFont(self.fontNameRegular, fontSize)
|
||||
self.canvas.setFont(self.font_mapping['Regular'], fontSize)
|
||||
|
||||
textHeight = fontSize - 2
|
||||
textHeight = card.getStackHeight(
|
||||
@@ -666,10 +682,10 @@ class DividerDrawer(object):
|
||||
fontSize) / 2
|
||||
|
||||
def drawWordPiece(text, fontSize):
|
||||
self.canvas.setFont(self.fontNameRegular, fontSize)
|
||||
self.canvas.setFont(self.font_mapping['Regular'], fontSize)
|
||||
if text != ' ':
|
||||
self.canvas.drawString(w, h, text)
|
||||
return pdfmetrics.stringWidth(text, self.fontNameRegular,
|
||||
return pdfmetrics.stringWidth(text, self.font_mapping['Regular'],
|
||||
fontSize)
|
||||
|
||||
for i, word in enumerate(words):
|
||||
@@ -737,7 +753,7 @@ class DividerDrawer(object):
|
||||
# use all the available space, even if it is not centered on the card
|
||||
fontSize = 8
|
||||
failover = False
|
||||
width = stringWidth(card.types_name, self.fontNameRegular, fontSize)
|
||||
width = stringWidth(card.types_name, self.font_mapping['Regular'], fontSize)
|
||||
while width > textWidth:
|
||||
fontSize -= .01
|
||||
if fontSize < 6 and not failover:
|
||||
@@ -746,11 +762,11 @@ class DividerDrawer(object):
|
||||
w = left_margin + (textWidth2 / 2)
|
||||
fontSize = 8
|
||||
failover = True
|
||||
width = stringWidth(card.types_name, self.fontNameRegular, fontSize)
|
||||
width = stringWidth(card.types_name, self.font_mapping['Regular'], fontSize)
|
||||
|
||||
# Print out the text in the right spot
|
||||
h = totalHeight - usedHeight - 0.5 * cm
|
||||
self.canvas.setFont(self.fontNameRegular, fontSize)
|
||||
self.canvas.setFont(self.font_mapping['Regular'], fontSize)
|
||||
if card.types_name != ' ':
|
||||
self.canvas.drawCentredString(w, h, card.types_name)
|
||||
drewTopIcon = True
|
||||
@@ -873,7 +889,7 @@ class DividerDrawer(object):
|
||||
# calculate the text height, font size, and orientation
|
||||
maxFontsize = 12
|
||||
minFontsize = 6
|
||||
fontname = self.fontNameRegular
|
||||
fontname = self.font_mapping['Regular']
|
||||
font = pdfmetrics.getFont(fontname)
|
||||
fontHeightRelative = (
|
||||
font.face.ascent + abs(font.face.descent)) / 1000.0
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#### Fonts
|
||||
I believe I cannot distribute one font (Minion Pro) domdiv uses as they are commercially sold by Adobe. However, the font files are included with every install of the free Adobe Reader. For example, on Windows 7 they are in C:\Program Files (x86)\Adobe\Reader 9.0\Resource\Font called `MinionPro-Regular.otf`, `MinionPro-Bold.otf` and `MinionPro-It.otf`.
|
||||
|
||||
Sadly, these fonts use features of the otf format that are not support by the reportlab package. Thus, they need to first be converted to ttf (TrueType) format. I used the open source package fontforge to do the conversion. Included as 'convert.ff' is a script for fontforge to do the conversion, on Mac OS X with fontforge installed through macports you can just run `./convert.ff MinionPro-Regular.otf`, `./convert.ff MinionPro-Bold.otf` and `./convert.ff MinionPro-It.otf`. With other fontforge installations, you'll need to change the first line of convert.ff to point to your fontforge executable. I have not done this step under Windows - I imagine it may be possible with a cygwin install of fontforge or some such method. Copy these converted files to this subdirectory.
|
||||
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 925 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 217 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 10 KiB |