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:
@ -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":
|
||||
|
Reference in New Issue
Block a user