Skip to content

Commit

Permalink
fix: use english classifications, not japanese
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Mar 2, 2024
1 parent ed37461 commit b363816
Show file tree
Hide file tree
Showing 10 changed files with 425 additions and 416 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,17 @@ await each(getBulbapediaReadyPokemon(), async (pokemon) => {
? new RegExp(`{{ArtP\\|${paddedNumber}\\|[^}}]+\\|form=-${pokemon.forme}}} \\|\\|(?<content>[^]*?)\\n`, 'i')
: new RegExp(`{{ArtP\\|${paddedNumber}\\|.+}} \\|\\|(?<content>[^]*?)\\n`);
const match = text.match(regex);
const regexForTranslateBlock = /\{\{tt\|([^|]+)\|[^}]+\}\}/;

const useHigherIndexFromTable = pokemon.forme || pokemon.number === 720 || pokemon.number === 964 || pokemon.number === 999;

const classification = match?.groups?.content
.trim()
.split('||')
.at(useHigherIndexFromTable ? 1 : 0)
?.trim()
.replace(regexForTranslateBlock, '$1');

const classification = match?.groups?.content.trim().split('||').at(-1)?.trim();
if (classification) {
succeededPokemon.push({
num: pokemon.number,
Expand Down
84 changes: 42 additions & 42 deletions src/lib/assets/pokedex-data/gen1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Water],
weightkg: 9,
aliases: ['zenigame'],
classification: 'Young Turtle Pokémon'
classification: 'Tiny Turtle Pokémon'
}
],
[
Expand Down Expand Up @@ -388,7 +388,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Water],
weightkg: 85.5,
aliases: ['kamekkusu'],
classification: 'Shell Pokémon'
classification: 'Shellfish Pokémon'
}
],
[
Expand Down Expand Up @@ -462,7 +462,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Bug],
weightkg: 2.9,
aliases: ['kyatapii'],
classification: 'Caterpillar Pokémon'
classification: 'Worm Pokémon'
}
],
[
Expand Down Expand Up @@ -490,7 +490,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Bug],
weightkg: 9.9,
aliases: ['toranseru'],
classification: 'Chrysalis Pokémon'
classification: 'Cocoon Pokémon'
}
],
[
Expand Down Expand Up @@ -566,7 +566,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Bug, TypesEnum.Poison],
weightkg: 3.2,
aliases: ['biidoru'],
classification: 'Hairy Caterpillar Pokémon'
classification: 'Hairy Bug Pokémon'
}
],
[
Expand Down Expand Up @@ -594,7 +594,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Bug, TypesEnum.Poison],
weightkg: 10,
aliases: ['kokuun'],
classification: 'Chrysalis Pokémon'
classification: 'Cocoon Pokémon'
}
],
[
Expand Down Expand Up @@ -2651,7 +2651,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Normal],
weightkg: 4.2,
aliases: ['nyaasu'],
classification: '{{wp|Bakeneko}} Pokémon'
classification: 'Scratch Cat Pokémon'
}
],
[
Expand Down Expand Up @@ -2761,7 +2761,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Normal],
weightkg: 32,
aliases: ['perushian'],
classification: 'Siamese Cat Pokémon'
classification: 'Classy Cat Pokémon'
}
],
[
Expand Down Expand Up @@ -2950,7 +2950,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Fire, TypesEnum.Rock],
weightkg: 22.7,
aliases: ['hisuiangrowlithe', 'growlitheh'],
classification: 'Lookout Pokémon'
classification: 'Scout Pokémon'
}
],
[
Expand All @@ -2975,7 +2975,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Fire],
weightkg: 155,
aliases: ['uindi'],
classification: 'Legend Pokémon'
classification: 'Legendary Pokémon'
}
],
[
Expand Down Expand Up @@ -3114,7 +3114,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Psychic],
weightkg: 19.5,
aliases: ['keeshy'],
classification: 'Psychic Power Pokémon'
classification: 'Psi Pokémon'
}
],
[
Expand Down Expand Up @@ -3146,7 +3146,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Psychic],
weightkg: 56.5,
aliases: ['yungeraa'],
classification: 'Psychic Power Pokémon'
classification: 'Psi Pokémon'
}
],
[
Expand Down Expand Up @@ -3175,7 +3175,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Psychic],
weightkg: 48,
aliases: ['fuudin', 'zam'],
classification: 'Psychic Power Pokémon'
classification: 'Psi Pokémon'
}
],
[
Expand Down Expand Up @@ -3226,7 +3226,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Fighting],
weightkg: 19.5,
aliases: ['wanrikii'],
classification: 'Superhuman Strength Pokémon'
classification: 'Superpower Pokémon'
}
],
[
Expand All @@ -3251,7 +3251,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Fighting],
weightkg: 70.5,
aliases: ['goorikii'],
classification: 'Superhuman Strength Pokémon'
classification: 'Superpower Pokémon'
}
],
[
Expand All @@ -3276,7 +3276,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Fighting],
weightkg: 130,
aliases: ['kairikii'],
classification: 'Superhuman Strength Pokémon'
classification: 'Superpower Pokémon'
}
],
[
Expand Down Expand Up @@ -3657,7 +3657,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
species: 'ponyta-galar',
types: [TypesEnum.Psychic],
weightkg: 24,
classification: 'One Horn Pokémon'
classification: 'Unique Horn Pokémon'
}
],
[
Expand Down Expand Up @@ -3713,7 +3713,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
species: 'rapidash-galar',
types: [TypesEnum.Psychic, TypesEnum.Fairy],
weightkg: 95,
classification: 'One Horn Pokémon'
classification: 'Unique Horn Pokémon'
}
],
[
Expand All @@ -3739,7 +3739,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Water, TypesEnum.Psychic],
weightkg: 36,
aliases: ['yadon'],
classification: 'Stupid Pokémon'
classification: 'Dopey Pokémon'
}
],
[
Expand Down Expand Up @@ -3917,7 +3917,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Normal, TypesEnum.Flying],
weightkg: 15,
aliases: ['kamonegi'],
classification: 'Spot-Billed Duck Pokémon'
classification: 'Wild Duck Pokémon'
}
],
[
Expand Down Expand Up @@ -3992,7 +3992,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Normal, TypesEnum.Flying],
weightkg: 85.2,
aliases: ['doodorio'],
classification: 'Triplet Bird Pokémon'
classification: 'Triple Bird Pokémon'
}
],
[
Expand Down Expand Up @@ -4234,7 +4234,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Ghost, TypesEnum.Poison],
weightkg: 0.1,
aliases: ['goosu'],
classification: 'Gaseous Pokémon'
classification: 'Gas Pokémon'
}
],
[
Expand All @@ -4259,7 +4259,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Ghost, TypesEnum.Poison],
weightkg: 0.1,
aliases: ['goosuto'],
classification: 'Gaseous Pokémon'
classification: 'Gas Pokémon'
}
],
[
Expand Down Expand Up @@ -4437,7 +4437,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Water],
weightkg: 6.5,
aliases: ['kurabu'],
classification: 'Freshwater Crab Pokémon'
classification: 'River Crab Pokémon'
}
],
[
Expand Down Expand Up @@ -4746,7 +4746,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Ground],
weightkg: 45,
aliases: ['garagara'],
classification: 'Bone Lover Pokémon'
classification: 'Bone Keeper Pokémon'
}
],
[
Expand Down Expand Up @@ -4826,7 +4826,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Fighting],
weightkg: 49.8,
aliases: ['sawamuraa'],
classification: 'Kick Pokémon'
classification: 'Kicking Pokémon'
}
],
[
Expand All @@ -4850,7 +4850,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Fighting],
weightkg: 50.2,
aliases: ['ebiwaraa'],
classification: 'Punch Pokémon'
classification: 'Punching Pokémon'
}
],
[
Expand Down Expand Up @@ -4982,7 +4982,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Ground, TypesEnum.Rock],
weightkg: 115,
aliases: ['saihoon'],
classification: 'Spiky Pokémon'
classification: 'Spikes Pokémon'
}
],
[
Expand Down Expand Up @@ -5082,7 +5082,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Normal],
weightkg: 80,
aliases: ['garuura', 'kanga'],
classification: 'Parent and Child Pokémon'
classification: 'Parent Pokémon'
}
],
[
Expand Down Expand Up @@ -5328,7 +5328,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Ice, TypesEnum.Psychic],
weightkg: 56.8,
aliases: ['gmime', 'gmrmime'],
classification: 'Dance Pokémon'
classification: 'Dancing Pokémon'
}
],
[
Expand Down Expand Up @@ -5375,7 +5375,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Ice, TypesEnum.Psychic],
weightkg: 40.6,
aliases: ['ruujura'],
classification: 'Humanoid Pokémon'
classification: 'Human Shape Pokémon'
}
],
[
Expand All @@ -5400,7 +5400,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Electric],
weightkg: 30,
aliases: ['erebuu'],
classification: 'Electric Shock Pokémon'
classification: 'Electric Pokémon'
}
],
[
Expand Down Expand Up @@ -5739,7 +5739,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Normal],
weightkg: 4,
aliases: ['metamon'],
classification: 'Transformation Pokémon'
classification: 'Transform Pokémon'
}
],
[
Expand Down Expand Up @@ -5848,7 +5848,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Water],
weightkg: 29,
aliases: ['shawaazu'],
classification: 'Foam-Spitting Pokémon'
classification: 'Bubble Jet Pokémon'
}
],
[
Expand Down Expand Up @@ -5919,7 +5919,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Normal],
weightkg: 36.5,
aliases: ['porigon'],
classification: '{{tt|Virtual Pokémon|CG Pokémon before Pokémon Blue}}'
classification: 'Virtual Pokémon'
}
],
[
Expand Down Expand Up @@ -5992,7 +5992,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
species: 'kabuto',
types: [TypesEnum.Rock, TypesEnum.Water],
weightkg: 11.5,
classification: 'Shell Pokémon'
classification: 'Shellfish Pokémon'
}
],
[
Expand Down Expand Up @@ -6020,7 +6020,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Rock, TypesEnum.Water],
weightkg: 40.5,
aliases: ['kabutopusu'],
classification: 'Shell Pokémon'
classification: 'Shellfish Pokémon'
}
],
[
Expand Down Expand Up @@ -6093,7 +6093,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Normal],
weightkg: 460,
aliases: ['kabigon'],
classification: 'Dozing Pokémon'
classification: 'Sleeping Pokémon'
}
],
[
Expand Down Expand Up @@ -6142,7 +6142,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
weightkg: 55.4,
aliases: ['furiizaa'],
legendary: true,
classification: 'Freezing Pokémon'
classification: 'Freeze Pokémon'
}
],
[
Expand Down Expand Up @@ -6192,7 +6192,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
weightkg: 52.6,
aliases: ['sandaa'],
legendary: true,
classification: 'Electric Shock Pokémon'
classification: 'Electric Pokémon'
}
],
[
Expand All @@ -6218,7 +6218,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Fighting, TypesEnum.Flying],
weightkg: 58.2,
legendary: true,
classification: 'Good Walker Pokémon'
classification: 'Strong Legs Pokémon'
}
],
[
Expand Down Expand Up @@ -6268,7 +6268,7 @@ const entries: [string, PokemonTypes.DexEntry][] = [
types: [TypesEnum.Dark, TypesEnum.Flying],
weightkg: 66,
legendary: true,
classification: 'Evil Pokémon'
classification: 'Malevolent Pokémon'
}
],
[
Expand Down
Loading

0 comments on commit b363816

Please sign in to comment.