Skip to content

Commit

Permalink
create lorem class
Browse files Browse the repository at this point in the history
  • Loading branch information
BolajiOlajide committed Sep 5, 2024
1 parent 00bbc20 commit 01df677
Show file tree
Hide file tree
Showing 16 changed files with 391 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/locales/benin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Localizer } from '..';
import type { Random } from '../../random';
import { Gender } from '../../types';
import { maleFirstNames, femaleFirstNames, lastNames, prefix } from './names';
import { phrases, words } from './words';

class BeninLocale implements Localizer {
private random: Random;
Expand All @@ -23,6 +24,14 @@ class BeninLocale implements Localizer {
public prefix(): string {
return this.random.arrayElement(prefix) as string;
}

public word(): string {
return this.random.arrayElement(words) as string;
}

public phrase(): string {
return this.random.arrayElement(phrases) as string;
}
}

export { BeninLocale };
34 changes: 34 additions & 0 deletions lib/locales/benin/words.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
export const words = [
'Ọýenmwen',
'Agiengien egbe',
'muegberiotọ',
'Udedemwen',
'Ọvbokhanmwen',
'Ugie Oronmwen',
'Ọdafen',
'Izọmon',
'Uvbi',
'Alaghodaro',
'Ọyenmwen',
'Ọfumwengbe',
'Egberanmwen',
'Ọfumwengbe'
];

export const phrases = [
"Kóyo", // Hello
"Óbó khian", // How are you?
"Órékha?", // Where are you going?
"Míwérè", // I'm fine
"Ó ghan mwèn?", // What is your name?
"Mwèn rru", // My name is...
"Dó nù khunmwén", // Thank you
"Vbé dé", // Come in
"Kpé dè", // Sit down
"Ó yi mè", // I love you
"Mò sòré", // I don’t understand
"Órè gua", // See you later
"Í màrè é?", // Do you understand?
"Gha sòré", // Let’s go
"Mí wè ìgbè", // I am happy
];
9 changes: 9 additions & 0 deletions lib/locales/efik/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Localizer } from '..';
import type { Random } from '../../random';
import { Gender } from '../../types';
import { maleFirstNames, femaleFirstNames, lastNames, prefix } from './names';
import { phrases, words } from './words';

class EfikLocale implements Localizer {
private random: Random;
Expand All @@ -23,6 +24,14 @@ class EfikLocale implements Localizer {
public prefix(): string {
return this.random.arrayElement(prefix) as string;
}

public word(): string {
return this.random.arrayElement(words) as string;
}

public phrase(): string {
return this.random.arrayElement(phrases) as string;
}
}

export { EfikLocale };
65 changes: 65 additions & 0 deletions lib/locales/efik/words.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
export const words = [
'Di',
'Ufok',
'Awan',
'Erenowo',
'Udia',
'Abasi',
'Ufok-Ibok',
'Usan',
'Ufan',
'Ekon-eyo',
'Usen-Ubok',
'Okpokoro',
'Nai-nai',
'Itam',
'Ikpang',
'Efere',
'Ikpa-Ukod',
'Eto-Udari',
'Ineun',
'Ebua',
'Mmong',
'Usung Abia',
'Afai',
'Obubud',
'Ndad-ndad',
'Biong',
'Idab',
'Akamba',
'Nwed',
'Ekondo',
'Ima',
'Ufen',
'Obube',
'Ekebe',
'Eku',
'Ebok',
'Iyak',
'Enang',
'Nsu',
'Nsibidi',
'Ekpe',
'Ikot',
'Edesi',
'Edi',
'Owo'
];

export const phrases = [
"Mọń ẹmẹ", // Good morning
"Abadie?", // How are you?
"Enye ete?", // What’s happening?
"Sọsoñọ fi", // Thank you
"K'idem fo?", // How is your body? (How are you?)
"Nkpọ ke do?", // What's going on?
"Dara óñọñ", // Good night
"Esiere", // Goodbye
"Kedụ idibọñ?", // What is your name?
"Akwaña nẹ fi", // I love you
"Mi ẹdọk fi", // I miss you
"Nsido?", // Where are you going?
"Mọ eyen ẹnọ fi", // I’m happy for you
"Dọk me nte akpa", // Stay safe
"Yak enye", // Leave it/Forget about it
];
9 changes: 9 additions & 0 deletions lib/locales/english/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Localizer } from '..';
import type { Random } from '../../random';
import { Gender } from '../../types';
import { maleFirstNames, femaleFirstNames, lastNames, prefix } from './names';
import { phrases, words } from './words';

class EnglishLocale implements Localizer {
private random: Random;
Expand All @@ -23,6 +24,14 @@ class EnglishLocale implements Localizer {
public prefix(): string {
return this.random.arrayElement(prefix) as string;
}

public word(): string {
return this.random.arrayElement(words) as string;
}

public phrase(): string {
return this.random.arrayElement(phrases) as string;
}
}

export { EnglishLocale };
22 changes: 22 additions & 0 deletions lib/locales/english/words.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export const words = [
'eat',
'puke',
'stand',
'slap',
'seat',
'sit',
'excavate',
'peace',
'food'
];

export const phrases = [
'Thanks so much.',
'I really appreciate you.',
'Excuse me.',
`I'm sorry.`,
'What do you think?',
'How does that sound?',
'That sounds great.',
'That helps a lot.'
];
9 changes: 9 additions & 0 deletions lib/locales/hausa/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Localizer } from '..';
import type { Random } from '../../random';
import { Gender } from '../../types';
import { maleFirstNames, femaleFirstNames, lastNames, prefix } from './names';
import { phrases, words } from './words';

class HausaLocale implements Localizer {
private random: Random;
Expand All @@ -23,6 +24,14 @@ class HausaLocale implements Localizer {
public prefix(): string {
return this.random.arrayElement(prefix) as string;
}

public word(): string {
return this.random.arrayElement(words) as string;
}

public phrase(): string {
return this.random.arrayElement(phrases) as string;
}
}

export { HausaLocale };
35 changes: 35 additions & 0 deletions lib/locales/hausa/words.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
export const words = [
"Gida", // House
"Rana", // Sun
"Lafiya", // Health
"Abinci", // Food
"Kudi", // Money
"Farin ciki",// Happiness
"Dare", // Night
"Mutum", // Person
"Ruwa", // Water
"Jiki", // Body
"Tarihi", // History
"Mota", // Car
"Duniya", // World
"Hanya", // Road/Path
"Makaranta" // School
];

export const phrases = [
"Sannu da aiki", // Hello (to someone working)
"Ina kwana", // Good morning
"Barka da yamma", // Good evening
"Yaya gida?", // How is home?
"Godiya ga Allah", // Thanks be to God
"Ina jin Hausa", // I understand Hausa
"Zan dawo", // I will return
"Ina so in sayi wannan", // I want to buy this
"Me sunanka?", // What is your name?
"Na gode", // Thank you
"Kada ka damu", // Don’t worry
"Ina da lafiya", // I am fine
"Zan iya taimaka maka?", // Can I help you?
"Me kake yi?", // What are you doing?
"Ina zaune a nan", // I live here
];
9 changes: 9 additions & 0 deletions lib/locales/igbo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Localizer } from '..';
import type { Random } from '../../random';
import { Gender } from '../../types';
import { maleFirstNames, femaleFirstNames, lastNames, prefix } from './names';
import { phrases, words } from './words';

class IgboLocale implements Localizer {
private random: Random;
Expand All @@ -23,6 +24,14 @@ class IgboLocale implements Localizer {
public prefix(): string {
return this.random.arrayElement(prefix) as string;
}

public word(): string {
return this.random.arrayElement(words) as string;
}

public phrase(): string {
return this.random.arrayElement(phrases) as string;
}
}

export { IgboLocale };
24 changes: 24 additions & 0 deletions lib/locales/igbo/words.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export const words = [
'bia',
'ego',
'nabania',
'wete'
];

export const phrases = [
"Kedu ka ịmere?", // How are you?
"Ekele m gị.", // Thank you.
"Biko, nyere m aka.", // Please, help me.
"A na m asụ Igbo ntakịrị.", // I speak a little Igbo.
"Ndo!", // Sorry!
"Ịhụnanya bụ ndụ.", // Love is life.
"Nke a bụ eziokwu.", // This is true.
"Ebee ka ị na-aga?", // Where are you going?
"Ọ dị mma.", // It is good.
"Gịnị bụ aha gị?", // What is your name?
"Abụ m onye Igbo.", // I am Igbo.
"Ka anyị gaa.", // Let's go.
"Anọ m na ụlọ.", // I am at home.
"Ị ga-esi aṅụ mmiri?", // Will you drink water?
"Ọ na-atọ ụtọ.", // It is sweet.
];
2 changes: 2 additions & 0 deletions lib/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ export interface Localizer {
firstName(gender: Gender): string;
lastName(): string;
prefix(): string;
word(): string;
phrase(): string;
}
9 changes: 9 additions & 0 deletions lib/locales/urhobo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Localizer } from '..';
import type { Random } from '../../random';
import { Gender } from '../../types';
import { maleFirstNames, femaleFirstNames, lastNames, prefix } from './names';
import { phrases, words } from './words';

class UrhoboLocale implements Localizer {
private random: Random;
Expand All @@ -23,6 +24,14 @@ class UrhoboLocale implements Localizer {
public prefix(): string {
return this.random.arrayElement(prefix) as string;
}

public word(): string {
return this.random.arrayElement(words) as string;
}

public phrase(): string {
return this.random.arrayElement(phrases) as string;
}
}

export { UrhoboLocale };
26 changes: 26 additions & 0 deletions lib/locales/urhobo/words.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export const words = [
'Akpö',
'Eki',
'Isabato',
'Ughegbe',
'Migwo',
'Wadoo'
];

export const phrases = [
"Mẹ̀rẹ́vwẹ̀", // Thank you
"Ọmọvwẹ hẹ", // How are you?
"Ọghẹnẹ kẹ̀", // God bless you
"Vwo ro na", // See you later
"Ọkpọ vwẹ mẹ", // Good morning
"Emete ni", // What is this?
"Ọbovwẹ kẹ mẹ", // Good afternoon
"Edovwẹ mẹ", // Good evening
"Ọrhiẹ vwẹ", // You’re beautiful
"Urhe ovwo", // Sleep well
"Wẹ bẹ́", // Come here
"Vwẹ obo kẹ́", // Where are you?
"Ọmọ vwẹ́ rha?", // Are you okay?
"Ọvọ vwẹ̀ re vwo", // You did well
"Ọrụmẹ vwẹ" // Goodbye
];
9 changes: 9 additions & 0 deletions lib/locales/yoruba/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Localizer } from '..';
import type { Random } from '../../random';
import { Gender } from '../../types';
import { maleFirstNames, femaleFirstNames, lastNames, prefix } from './names';
import { phrases, words } from './words';

class YorubaLocale implements Localizer {
private random: Random;
Expand All @@ -23,6 +24,14 @@ class YorubaLocale implements Localizer {
public prefix(): string {
return this.random.arrayElement(prefix) as string;
}

public word(): string {
return this.random.arrayElement(words) as string;
}

public phrase(): string {
return this.random.arrayElement(phrases) as string;
}
}

export { YorubaLocale };
Loading

0 comments on commit 01df677

Please sign in to comment.