Signed-off-by: Avior <github@avior.me>
This commit is contained in:
Florian Bouillon 2021-10-11 16:32:53 +02:00 committed by GitHub
parent 87614dde42
commit f5c22f87c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 421 deletions

View File

@ -1,12 +1,18 @@
import { SupportedLanguages } from 'db/interfaces' import { SupportedLanguages } from 'db/interfaces'
import es from './translations/es.json' import es from '../db/meta/translations/es.json'
import fr from './translations/fr.json' import it from '../db/meta/translations/it.json'
import pt from '../db/meta/translations/pt.json'
import de from '../db/meta/translations/de.json'
import fr from '../db/meta/translations/fr.json'
type translatable = 'types' | 'rarity' | 'stage' | 'category' | 'suffix' | 'abilityType' | 'trainerType' | 'energyType' type translatable = 'types' | 'rarity' | 'stage' | 'category' | 'suffix' | 'abilityType' | 'trainerType' | 'energyType'
const translations: Record<string, Record<translatable, Record<string, string>>> = { const translations: Record<string, Record<translatable, Record<string, string>>> = {
es, es,
fr fr,
it,
pt,
de
} }
export default function translate(item: translatable, key: string | undefined, lang: SupportedLanguages): string | undefined { export default function translate(item: translatable, key: string | undefined, lang: SupportedLanguages): string | undefined {

View File

@ -1,72 +0,0 @@
{
"$schema": "./schema.json",
"__comment__": "Missing some abilityTypes and some Trainer Types",
"abilityType": {
"Ability": "Habilidad",
"Ancient Trait": "Ancient Trait",
"Poke-BODY": "Poke-BODY",
"Poke-POWER": "Poke-POWER",
"Pokemon Power": "Pokemon Power"
},
"category": {
"Energy": "Energía",
"Pokemon": "Pokémon",
"Trainer": "Entrenador"
},
"energyType": {
"Normal": "Básico",
"Special": "Especial"
},
"rarity": {
"Amazing": "Increíbles",
"Common": "Commún",
"None": "Ninguno",
"Rare": "Rara",
"Secret Rare": "Rara Secreto",
"Ultra Rare": "Rara Ultra",
"Uncommon": "Uncommon"
},
"stage": {
"BREAK": "TURBO",
"Basic": "Basico",
"LEVEL-UP": "Subir de nivel",
"MEGA": "MEGA",
"RESTORED": "Recreado",
"Stage1": "Fase 1",
"Stage2": "Fase 2",
"VMAX": "VMAX"
},
"suffix": {
"EX": "EX",
"GX": "GX",
"Legend": "LEYENDA",
"Prime": "Prime",
"SP": "SP",
"TAG TEAM-GX": "TAG TEAM-GX",
"V": "V"
},
"trainerType": {
"Ace Spec": "Ace Spec",
"Goldenrod Game Corner": "Goldenrod Game Corner",
"Item": "Objeto",
"Rocket's Secret Machine": "Máquina Secreta de Rocket",
"Stadium": "Estaio",
"Supporter": "Partidario",
"Technical Machine": "Máquina Técnica",
"Tool": "Herramienta"
},
"types": {
"Colorless": "Incolora",
"Darkness": "Oscura",
"Dragon": "Dragón",
"Fairy": "Hada",
"Fighting": "Lucha",
"Fire": "Guego",
"Grass": "Planta",
"Lightning": "Rayo",
"Metal": "Metálica",
"Psychic": "Psíquico",
"Water": "Agua"
}
}

View File

@ -1,70 +0,0 @@
{
"$schema": "./schema.json",
"abilityType": {
"Ability": "Talent",
"Ancient Trait": "Trait Antique",
"Poke-BODY": "Poké-BODY",
"Poke-POWER": "Poké-POWER",
"Pokemon Power": "Pouvoir Pokémon"
},
"category": {
"Energy": "Énergie",
"Pokemon": "Pokémon",
"Trainer": "Dresseur"
},
"energyType": {
"Normal": "De base",
"Special": "Spécial"
},
"rarity": {
"Amazing": "Magnifique",
"Common": "Commune",
"None": "Sans Rareté",
"Rare": "Rare",
"Secret Rare": "Magnifique rare",
"Ultra Rare": "Ultra Rare",
"Uncommon": "Peu Commune"
},
"stage": {
"BREAK": "TURBO",
"Basic": "De base",
"LEVEL-UP": "Niveau Sup",
"MEGA": "MÉGA",
"RESTORED": "Restauré",
"Stage1": "Niveau 1",
"Stage2": "Niveau 2",
"VMAX": "ESCOUADE"
},
"suffix": {
"EX": "EX",
"GX": "GX",
"Legend": "LÉGENDE",
"Prime": "Prime",
"SP": "SP",
"TAG TEAM-GX": "TAG TEAM-GX",
"V": "V"
},
"trainerType": {
"Ace Spec": "High-Tech",
"Goldenrod Game Corner": "Salle de jeu de Doublonville",
"Item": "Objet",
"Rocket's Secret Machine": "Machine secrète des Rocket",
"Stadium": "Stade",
"Supporter": "Supporter",
"Technical Machine": "Machine Technique",
"Tool": "Outil"
},
"types": {
"Colorless": "Incolore",
"Darkness": "Obscurité",
"Dragon": "Dragon",
"Fairy": "Fée",
"Fighting": "Combat",
"Fire": "Feu",
"Grass": "Plante",
"Lightning": "Électrique",
"Metal": "Métal",
"Psychic": "Psy",
"Water": "Eau"
}
}

View File

@ -1,276 +0,0 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"abilityType": {
"type": "object",
"properties": {
"Ability": {
"type": "string"
},
"Ancient Trait": {
"type": "string"
},
"Poke-BODY": {
"type": "string"
},
"Poke-POWER": {
"type": "string"
},
"Pokemon Power": {
"type": "string"
}
},
"required": [
"Ability",
"Ancient Trait",
"Poke-BODY",
"Poke-POWER",
"Pokemon Power"
]
},
"category": {
"type": "object",
"properties": {
"Energy": {
"type": "string"
},
"Pokemon": {
"type": "string"
},
"Trainer": {
"type": "string"
}
},
"required": [
"Energy",
"Pokemon",
"Trainer"
]
},
"energyType": {
"type": "object",
"properties": {
"Normal": {
"type": "string"
},
"Special": {
"type": "string"
}
},
"required": [
"Normal",
"Special"
]
},
"rarity": {
"type": "object",
"properties": {
"Amazing": {
"type": "string"
},
"Common": {
"type": "string"
},
"None": {
"type": "string"
},
"Rare": {
"type": "string"
},
"Secret Rare": {
"type": "string"
},
"Ultra Rare": {
"type": "string"
},
"Uncommon": {
"type": "string"
}
},
"required": [
"Amazing",
"Common",
"None",
"Rare",
"Secret Rare",
"Ultra Rare",
"Uncommon"
]
},
"stage": {
"type": "object",
"properties": {
"BREAK": {
"type": "string"
},
"Basic": {
"type": "string"
},
"LEVEL-UP": {
"type": "string"
},
"MEGA": {
"type": "string"
},
"RESTORED": {
"type": "string"
},
"Stage1": {
"type": "string"
},
"Stage2": {
"type": "string"
},
"VMAX": {
"type": "string"
}
},
"required": [
"BREAK",
"Basic",
"LEVEL-UP",
"MEGA",
"RESTORED",
"Stage1",
"Stage2",
"VMAX"
]
},
"suffix": {
"type": "object",
"properties": {
"EX": {
"type": "string"
},
"GX": {
"type": "string"
},
"Legend": {
"type": "string"
},
"Prime": {
"type": "string"
},
"SP": {
"type": "string"
},
"TAG TEAM-GX": {
"type": "string"
},
"V": {
"type": "string"
}
},
"required": [
"EX",
"GX",
"Legend",
"Prime",
"SP",
"TAG TEAM-GX",
"V"
]
},
"trainerType": {
"type": "object",
"properties": {
"Ace Spec": {
"type": "string"
},
"Goldenrod Game Corner": {
"type": "string"
},
"Item": {
"type": "string"
},
"Rocket's Secret Machine": {
"type": "string"
},
"Stadium": {
"type": "string"
},
"Supporter": {
"type": "string"
},
"Technical Machine": {
"type": "string"
},
"Tool": {
"type": "string"
}
},
"required": [
"Ace Spec",
"Goldenrod Game Corner",
"Item",
"Rocket's Secret Machine",
"Stadium",
"Supporter",
"Technical Machine",
"Tool"
]
},
"types": {
"type": "object",
"properties": {
"Colorless": {
"type": "string"
},
"Darkness": {
"type": "string"
},
"Dragon": {
"type": "string"
},
"Fairy": {
"type": "string"
},
"Fighting": {
"type": "string"
},
"Fire": {
"type": "string"
},
"Grass": {
"type": "string"
},
"Lightning": {
"type": "string"
},
"Metal": {
"type": "string"
},
"Psychic": {
"type": "string"
},
"Water": {
"type": "string"
}
},
"required": [
"Colorless",
"Darkness",
"Dragon",
"Fairy",
"Fighting",
"Fire",
"Grass",
"Lightning",
"Metal",
"Psychic",
"Water"
]
}
},
"required": [
"abilityType",
"category",
"energyType",
"rarity",
"stage",
"suffix",
"trainerType",
"types"
]
}