msikma / pokesprite

Database project of box and inventory sprites from the Pokémon core series games
https://msikma.github.io/pokesprite/
MIT License
976 stars 167 forks source link

Add Hepburn romaji to pokemon.json #88

Closed msikma closed 3 years ago

msikma commented 4 years ago

As mentioned in #85, it's useful to have Hepburn romaji versions of the Pokémon names since the GF official romaji names aren't well known and are not useful for searching.

The following format will be used:

  "023": {
    "idx": "023",
    "name": {
      "eng": "Ekans",
      "chs": "阿柏蛇",
      "jpn": "アーボ",
      "jpn_ro": "Arbo"
    },
    "slug": {
      "eng": "ekans",
      "jpn": "aabo",
      "jpn_ro": "arbo",
    },

So in other words, slug.jpn will now contain a Hepburn romanization (traditional since macrons are hard to type).

msikma commented 4 years ago

Some people type a name like アーボ as "a-bo" rather than "aabo". If needed, the slugs can be modified with a regex like:

'aabo'.replace(/(aa|ii|uu|ee|oo)/g, v => `${v.slice(0, 1)}-`) // returns 'a-bo'
msikma commented 3 years ago

This has been merged now, albeit slightly different than the format from the first post. Now long vowel markers are represented as dashes. The documentation has been updated too.