1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-07-29 11:09:51 +00:00

Update interfaces

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2020-02-08 00:41:23 +01:00
parent f6aa8fc5e8
commit 4190dd8e27
5 changed files with 80 additions and 276 deletions

View File

@ -5,7 +5,31 @@ enum AbilityType {
ANCIENTTRAIT
}
const en = [
"Poké-Body",
"Poké-Power",
"Ability",
"Ancient Trait"
]
const fr = [
"Poké-Body",
"Poké-Power",
"Talent",
"Trait Ancien"
]
namespace AbilityType {
export function toLang(a: AbilityType, lang: string): string {
switch (lang) {
case "en":
return en[a]
case "fr":
return fr[a]
}
throw new Error(`Error , abilityType not translated! (${lang})`)
}
export function getFromText(txt: string): AbilityType {
switch (txt) {
case "Ability":