syradar / yxans-klagan

Web tool for Forbidden Lands
https://yxans-klagan.vercel.app/
MIT License
11 stars 2 forks source link

Add translations for Name Page #37

Closed syradar closed 3 years ago

Kalima commented 3 years ago
export enum NameType {
  FirstName = 'FirstName',
  FamilyName = 'FamilyName',
  HomeName = 'HomeName',
  NickName = 'NickName',
}

interface WeightedName {
  weight: number
  type: NameType
}

export interface NameList {
  Male: {
    probabilites: WeightedName[]
    rawNames: readonly string[]
  }
  Female: {
    probabilites: WeightedName[]
    rawNames: readonly string[]
  }
  family?: readonly string[]
  nickName?: readonly string[]
}

export enum KinType {
  Human = 'Human',
  Elf = 'Elf',
}

export enum HumanKin {
  Alderlänning = 'Alderlander',
  Eländer = 'Ailander',
  Aslener = 'Aslene',
}

export enum ElfKin {
  Elf = 'Elf',
}

export type Kins = {
  [KinType.Human]: HumanKin
  [KinType.Elf]: ElfKin
}

export const humanNames: { [H in Kins['Human']]: NameList } = {
  Alderlänning: {
    Male: {
      probabilites: [
        {
          type: NameType.FirstName,
          weight: 49,
        },
        {
          type: NameType.FamilyName,
          //'[name.Alderlänning.Male] [name.Alderlänning.Family]^5',
          // '[name.Alderlänning.Male] of [getHome.output]^5',
          weight: 5,
        },
        {
          type: NameType.HomeName,
          weight: 5,
        },
      ],
      rawNames: [
        'Adalbern',
        'Alaric',
        'Alboin',
        'Baldarich',
        'Baldomar',
        'Clovis',
        'Eburwin',
        'Egino',
        'Erminigild',
        'Eward',
        'Faramund',
        'Fridumar',
        'Fulco',
        'Gerulf',
        'Gislin',
        'Haimo',
        'Hardmod',
        'Hariwald',
        'Horsa',
        'Hrodger',
        'Hrolf',
        'Ivo',
        'Joscelin',
        'Karl',
        'Kuno',
        'Landebert',
        'Lanzo',
        'Leudagar',
        'Lothar',
        'Manno',
        'Meginfrid',
        'Meino',
        'Odo',
        'Odoacer',
        'Ortwin',
        'Otmar',
        'Otto',
        'Raban',
        'Radulf',
        'Ranganhar',
        'Rochus',
        'Rudesind',
        'Sigdag',
        'Siward',
        'Tancred',
        'Trancmar',
        'Waldhar',
        'Waldo',
        'Wandal',
        'Warin',
      ],
    },
    Female: {
      probabilites: [
        { type: NameType.FirstName, weight: 49 },
        { type: NameType.FamilyName, weight: 5 },
        { type: NameType.HomeName, weight: 5 },
      ],
      rawNames: [
        'Adela',
        'Adelais',
        'Adelina',
        'Aenor',
        'Alda',
        'Aldegund',
        'Amalia',
        'Amelina',
        'Auda',
        'Aveza',
        'Avila',
        'Berengaria',
        'Bertha',
        'Brunhild',
        'Brunhilde',
        'Clothildis',
        'Cunigund',
        'Ermendrud',
        'Ermingard',
        'Erminhilt',
        'Erminlinda',
        'Frida',
        'Geretrudis',
        'Gerhild',
        'Gerlind',
        'Gisila',
        'Godeliva',
        'Gunda',
        'Hadewig',
        'Hailwic',
        'Herleva',
        'Ida',
        'Ima',
        'Irma',
        'Ishild',
        'Leutgard',
        'Luitgard',
        'Lutgardis',
        'Mahthildis',
        'Oda',
        'Odila',
        'Raganhildis',
        'Roslindis',
        'Rosmunda',
        'Rothad',
        'Roza',
        'Saxa',
        'Sigilind',
        'Waldeburg',
        'Waldedrudis',
      ],
    },
    family: [
      'Adogit',
      'Aelvaeones',
      'Batini',
      'Bergio',
      'Braemi',
      'Bui',
      'Chali',
      'Danduti',
      'Dani',
      'Eunixi',
      'Evagres',
      'Favonae ',
      'Fosi',
      'Grannii',
      'Hallin',
      'Hasdingi',
      'Helissi',
      'Heruli',
      'Hilleviones',
      'Ingriones',
      'Lemovii',
      'Levoni',
      'Manimi',
      'Mattiaci',
      'Naharvali',
      'Nemetes',
      'Njars',
      'Otingis',
      'Pharodini',
      'Quadi',
      'Racatae',
      'Racatriae',
      'Salii',
      'Scirii',
      'Segni',
      'Sigulones',
      'Suevi',
      'Taetel',
      'Teutons',
      'Thervingi',
      'Theustes',
      'Tubanti',
      'Ubi',
      'Vagoth',
      'Vangiones',
      'Varini',
      'Vinoiloth ',
      'Viruni',
      'Vispi ',
      'Zumi',
    ],
  },
  Aslener: {
    Male: {
      probabilites: [
        {
          type: NameType.FirstName,
          weight: 49,
        },
        {
          type: NameType.NickName,
          weight: 5,
        },
      ],
      rawNames: [
        'Agis',
        'Agler',
        'Alceus',
        'Altair',
        'Anker ',
        'Ares',
        'Arsene',
        'Atemas',
        'Avel',
        'Balasi',
        'Baruch',
        'Cassander',
        'Cimon',
        'Cletus',
        'Cyrus',
        'Damen',
        'Dinos',
        'Dion',
        'Dorian',
        'Dunixi',
        'Eneas',
        'Etor',
        'Feodor',
        'Gilos',
        'Gorka',
        'Guilios',
        'Hali',
        'Hesiod',
        'Hippias',
        'Kai',
        'Kuiril',
        'Kyros',
        'Leander',
        'Meletios',
        'Mentor',
        'Milos',
        'Nestor',
        'Orestes',
        'Peder',
        'Poul',
        'Preben',
        'Solon',
        'Spyridon',
        'Thanos',
        'Titos',
        'Todor',
        'Vasileous',
        'Vasilis',
        'Zeno',
        'Zorba',
      ],
    },
    Female: {
      probabilites: [
        {
          type: NameType.FirstName,
          weight: 49,
        },
        {
          type: NameType.NickName,
          weight: 5,
        },
      ],
      rawNames: [
        'Adara',
        'Alena',
        'Arete',
        'Asta',
        'Callia',
        'Cassia',
        'Charis',
        'Cyma',
        'Damia',
        'Delbin',
        'Doria',
        'Eleni',
        'Elna',
        'Evadne',
        'Evania',
        'Evanthe',
        'Filia',
        'Helia',
        'Hesper',
        'Io',
        'Iona',
        'Ionia',
        'Isaura',
        'Ismini',
        'Kaia',
        'Kama',
        'Kepa',
        'Kolete',
        'Lana',
        'Lelia',
        'Lenore',
        'Melania',
        'Melita',
        'Metea',
        'Mona',
        'Nora',
        'Nyssa',
        'Odele',
        'Pallas',
        'Panthea',
        'Pelegia',
        'Perrine',
        'Philippa',
        'Rhea',
        'Rita',
        'Sappho',
        'Sonia',
        'Tessa',
        'Vania',
        'Zenobia',
      ],
    },
    nickName: [
       'Adventurous',
       'Angry',
       'Bald',
       'Bloody',
       'Bold',
       'Accurate',
       'Sloppy',
       'Careful',
       'Good',
       'Confused',
       'Cruel',
       'Direct',
       'Dashing',
       'Thick',
       'Careful',
       'Good',
       'Hairy',
       'Stylish',
       'Happy',
       'Jumping',
       'Cheerful',
       'Happy',
       'Mighty',
       'Mild',
       'Misleading',
       'Somber',
       'Old',
       'Sharp',
       'Proud',
       'Fast',
       'Trustworthy',
       'Sad',
       'Short',
       'Sleepy',
       'Slow',
       'Powerful',
       'Strong',
       'Honest',
       'Fast',
       'Talkative',
       'Long',
       'Terrible',
       'Thin',
       'Ugly',
       'Vain',
       'Weak',
       'Wise',
       'Young',
    ],
  },
  Eländer: {
    Male: {
      probabilites: [
        {
          type: NameType.FirstName,
          weight: 49,
        },
        {
          type: NameType.FamilyName,
          weight: 10,
        },
        {
          type: NameType.HomeName,
          weight: 10,
        },
      ],
      rawNames: [
        'Alvgar',
        'Ahlred',
        'Atheric',
        'Baldred',
        'Beocca',
        'Beorn',
        'Bosa',
        'Brid',
        'Cadwallon',
        'Ceol',
        'Cuthred',
        'Cuthwulf',
        'Cynric',
        'Daela',
        'Dunn',
        'Dunstan',
        'Eadgar',
        'Eadhun',
        'Ealread',
        'Earnwulf',
        'Eohric',
        'Frithstan',
        'Guthere',
        'Guthlaf',
        'Gyric',
        'Haefoc',
        'Hrothgar',
        'Ithamar',
        'Leofgar',
        'Liofa',
        'Morchaer',
        'Odda',
        'Ordgar',
        'Osgar',
        'Osred',
        'Praen',
        'Raedwald',
        'Sidrac',
        'Sigulf',
        'Sithric',
        'Teothic',
        'Tobias',
        'Uhtred',
        'Ulf',
        'Waldere',
        'Wulfgar',
        'Wulfmaer',
        'Wulfric',
        'Wulfwig',
        'Wynstan',
      ],
    },
    Female: {
      probabilites: [
        {
          type: NameType.FirstName,
          weight: 49,
        },
        {
          type: NameType.FamilyName,
          weight: 10,
        },
        {
          type: NameType.HomeName,
          weight: 10,
        },
      ],
      rawNames: [
        'Aebbe',
        'Aedwen',
        'Alvhild',
        'Alvlaed',
        'Alvswith',
        'Alvswith',
        'Alvwyn',
        'Aethelith',
        'Aethelwyn',
        'Ailred',
        'Bebbe ',
        'Bucge',
        'Ceolburh',
        'Cuthburh',
        'Cuthswith',
        'Cyneberg',
        'Eadburg',
        'Eadgifu',
        'Ealhild',
        'Eanflaed',
        'Eangyth',
        'Eanith',
        'Eawyn',
        'Edwyn',
        'Frithwyn',
        'Gytha',
        'Heiu',
        'Helelufu',
        'Hild',
        'Hilda',
        'Inga',
        'Leofrun',
        'Maethild',
        'Mathilda',
        'Osgyth',
        'Oshild',
        'Osswith',
        'Ricola',
        'Saegyth',
        'Saehild',
        'Saeith',
        'Saewyn',
        'Saewyn',
        'Siflaed',
        'Waerburh',
        'Withith',
        'Wulfwaru',
        'Wulfwyn',
        'Wynflaed',
        'Ymma',
      ],
    },

    family: [
      'Adlard',
      'Almer',
      'Alston',
      'Alvar',
      'Balston',
      'Brunger',
      'Brunwin',
      'Burch',
      'Burward',
      'Cobbald',
      'Dewdney',
      'Eddols',
      'Elphee',
      'Elvey',
      'Erwin',
      'Frewer',
      'Frewin',
      'Goldbard',
      'Goldhawk',
      'Hulbert',
      'Isgar',
      'Kenway',
      'Kerrich',
      'Lambrick',
      'Leavins',
      'Leavold',
      'Lewin',
      'Litwin',
      'Medwin',
      'Orrick',
      'Osmer',
      'Othen',
      'Quenell',
      'Seavers',
      'Siggers',
      'Sirett',
      'Stannard',
      'Wackrill',
      'Walwin',
      'Wennell',
      'Whatman',
      'Winbolt',
      'Winbow',
      'Woolgar',
      'Wyard',
      'Wyberg',
      'Wymer',
      'Yonwin',
    ],
  },
}

export interface VillageNameModel {
  prefix: readonly string[]
  suffix: readonly string[]
}

export const villageNames: VillageNameModel = {
  prefix: [
    'Amber',
    'Angel',
    'Soul',
    'Stream',
    'Bay',
    'Cauldron',
    'Arrow',
    'Autumn',
    'Bald',
    'Bay',
    'Beach',
    'Bear',
    'Clock',
    'Black',
    'Gloomy',
    'Blind',
    'Bone',
    'Block',
    'Bridge',
    'Pot',
    'Fragile',
    'Bronze',
    'Fort',
    'Cave',
    'Leg',
    'Smiles',
    'Clear',
    'Killing',
    'Cloud',
    'Cold',
    'Slab',
    'Crow',
    'Crystal',
    'Damned',
    'Dark',
    'Dawn',
    'Death',
    'Depth',
    'Deer',
    'Demon',
    'Dew',
    'Dim',
    'Fate',
    'Dirt',
    'Dog',
    'Drake',
    'Dry',
    'Twilight',
    'Dust',
    'Eagle',
    'Soil',
    'East',
    'Brown',
    'Edge',
    'Elder',
    'Old',
    'Glow',
    'Eternal',
    'Justice',
    'Case',
    'Fake',
    'Fair',
    'Far',
    'Fairy',
    'Fear',
    'Flame',
    'Flat',
    'Free',
    'Frost',
    'Ghost',
    'Glimmer',
    'Murky',
    'Gold',
    'Grass',
    'Gray',
    'Green',
    'Gloomy',
    'Dirt',
    'Hazel',
    'Heart',
    'High',
    'Dull',
    'Honey',
    'Dog',
    'Ice',
    'Iron',
    'Wedge',
    'Knights',
    'Lake',
    'Last',
    'Light',
    'Lime',
    'Small',
    'Lost',
    'Crazy',
    'Magician',
    'Maple',
    'Middle',
    'Power',
    'Grinder',
    'Fog',
    'Moon',
    'Moss',
    'Smiles',
    'Speechless',
    'Myth',
    'Never',
    'New',
    'Night',
    'North',
    'Oak',
    'Sea',
    'Old',
    'Ox',
    'Pearl',
    'Pine',
    'Dust',
    'Clean',
    'Fast',
    'Peace',
    'Raven',
    'Red',
    'Frost',
    'River',
    'Stone',
    'Rogue',
    'Rose',
    'Rust',
    'Salt',
    'Sand',
    'Burn',
    'Protection',
    'Shadow',
    'Shimmer',
    'Veil',
    'Silent',
    'Silk',
    'Silver',
    'Smooth',
    'Slush',
    'Sneaky',
    'Small',
    'Little',
    'Smooth',
    'Snake',
    'Snow',
    'South',
    'Spring',
    'Deer',
    'Star',
    'Mist',
    'Steel',
    'Steep',
    'Still',
    'Stone',
    'Storm',
    'Summer',
    'Solar',
    'Marsh',
    'Swan',
    'Fast',
    'Thorn',
    'Timber',
    'Trade',
    'West',
    'Choice',
    'Dugg',
    'White',
    'Wild',
    'Wild',
    'Wind',
    'Winter',
    'Wolf',
  ],
  suffix: [
'acres',
    'band',
    'marsh',
    'bay',
    'clock',
    'born',
    'cleaning',
    'born',
    'crime',
    'break',
    'stream',
    'attachment',
    'burn',
    'grave',
    'cairn',
    'call',
    'cold',
    'cut',
    'coastal',
    'crown',
    'crossing',
    'valley',
    'gryt',
    'drive',
    'clear',
    'fall',
    'falls',
    'trap',
    'field',
    'firewood',
    'forest',
    'fast',
    'front',
    'frost',
    'garde',
    'port',
    'valley',
    'crime',
    'grave',
    'grove',
    'guard',
    'gap',
    'bay',
    'hall',
    'sanctify',
    'tuna',
    'hand',
    'port',
    'refuge',
    'rudder',
    'hill',
    'attachment',
    'hold',
    'lower',
    'horn',
    'host',
    'tower',
    'land',
    'light',
    'gap',
    'meadow',
    'clean',
    'mire',
    'mound',
    'heath',
    'more',
    'pike',
    'mouth',
    'passage',
    'top',
    'flats',
    'dust',
    'port',
    'mail',
    'end',
    'rest',
    'stone',
    'run',
    'scar',
    'shadow',
    'cut',
    'shell',
    'protect',
    'beach',
    'county',
    'page',
    'spell',
    'scepter',
    'village',
    'witch',
    'sanctify',
    'star',
    'storm',
    'straw',
    'top',
    'river',
    'stand',
    'valley',
    'dale',
    'vault',
    'lode',
    'view',
    'village',
    'wall',
    'tumble',
    'protection',
    'view',
    'water',
    'well',
    'bridge',
    'wick',
    'wind',
    'wood',
    'courtyard',
  ],
}
syradar commented 3 years ago
import React from 'react'
import 'twin.macro'
import { KinNameList, PageHeader, Parchment } from '../components'
import {
  getRandomAlderlänningarName,
  getRandomAslenerName,
  getRandomEländerName,
} from '../functions/name.functions'

export const NameGeneratorPage = () => {
  return (
    <div tw="flex flex-col gap-y-8 w-full">
      <PageHeader>Name</PageHeader>

      <div tw="flex flex-wrap xl:(min-w-[600px]) gap-4">
        <div tw=" flex-basis[500px]">
          <Parchment>
            <KinNameList
              tw="p-0"
              title={'Ailander'}
              nameFunc={getRandomEländerName}
            ></KinNameList>
          </Parchment>
        </div>

        <div tw=" flex-basis[500px]">
          <Parchment>
            <KinNameList
              tw="p-0"
              title={'Alderlander'}
              nameFunc={getRandomAlderlänningarName}
            ></KinNameList>
          </Parchment>
        </div>

        <div tw=" flex-basis[500px]">
          <Parchment>
            <KinNameList
              tw="p-0"
              title={'Aslene'}
              nameFunc={getRandomAslenerName}
            ></KinNameList>
          </Parchment>
        </div>
      </div>
    </div>
  )
}