From 1e4fd1f3c24819290cc9791b80e952eb05b2bf0b Mon Sep 17 00:00:00 2001 From: ChenReuven Date: Sun, 25 Aug 2024 15:14:54 +0300 Subject: [PATCH 1/3] Add Hebrew bird example --- .gitignore | 3 ++- packages/falso/src/lib/i18n/he/bird.i18n.json | 22 +++++++++++++++++++ packages/falso/src/lib/i18n/he/bird.ts | 22 +++++++++++++++++++ packages/falso/src/lib/i18n/he/index.ts | 1 + 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 packages/falso/src/lib/i18n/he/bird.i18n.json create mode 100644 packages/falso/src/lib/i18n/he/bird.ts create mode 100644 packages/falso/src/lib/i18n/he/index.ts diff --git a/.gitignore b/.gitignore index f44c1524..cc2d02af 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ node_modules *.launch .settings/ *.sublime-workspace +.history # IDE - VSCode .vscode/* @@ -38,4 +39,4 @@ testem.log .DS_Store Thumbs.db -.nx/cache \ No newline at end of file +.nx/cache diff --git a/packages/falso/src/lib/i18n/he/bird.i18n.json b/packages/falso/src/lib/i18n/he/bird.i18n.json new file mode 100644 index 00000000..760d872c --- /dev/null +++ b/packages/falso/src/lib/i18n/he/bird.i18n.json @@ -0,0 +1,22 @@ +{ + "data": [ + "פלרופוס צוואר-אדום", + "סנונית מצוקים", + "טירן ראש-גדול", + "קיכלי אצטקית", + "סבכי מצויץ", + "צולל מצוי", + "אוריול סקוט", + "אלבטרוס גבה-שחור", + "תוכי נזירי", + "קוליברי מפואר", + "חופמי מקור-רחב", + "ירגזי שיחים", + "עורבני מקסיקני", + "מרגון מצויץ", + "חסידה יערנית", + "שחף רוס", + "ביצנית ירוקת-רגל", + "עגור צווח" + ] +} diff --git a/packages/falso/src/lib/i18n/he/bird.ts b/packages/falso/src/lib/i18n/he/bird.ts new file mode 100644 index 00000000..df834015 --- /dev/null +++ b/packages/falso/src/lib/i18n/he/bird.ts @@ -0,0 +1,22 @@ +import { FakeOptions, fake } from '../../core/core'; +import { data } from './bird.i18n.json'; + +/** + * Generate a random bird. + * + * @category animals + * + * @example + * + * randBird() + * + * @example + * + * randBird({ length: 10 }) + * + */ +export function randBird( + options?: Options +) { + return fake(data, options); +} diff --git a/packages/falso/src/lib/i18n/he/index.ts b/packages/falso/src/lib/i18n/he/index.ts new file mode 100644 index 00000000..5110b00d --- /dev/null +++ b/packages/falso/src/lib/i18n/he/index.ts @@ -0,0 +1 @@ +export { randBird } from './bird'; From bc34bddec1a1a9f7d2fc249a2c64b8f0703fa464 Mon Sep 17 00:00:00 2001 From: ChenReuven Date: Sun, 25 Aug 2024 15:37:14 +0300 Subject: [PATCH 2/3] feat: Add accesory list for hebrew --- packages/falso/src/lib/i18n/he/accessory.json | 43 +++++++++++++++++++ packages/falso/src/lib/i18n/he/accessory.ts | 22 ++++++++++ 2 files changed, 65 insertions(+) create mode 100644 packages/falso/src/lib/i18n/he/accessory.json create mode 100644 packages/falso/src/lib/i18n/he/accessory.ts diff --git a/packages/falso/src/lib/i18n/he/accessory.json b/packages/falso/src/lib/i18n/he/accessory.json new file mode 100644 index 00000000..d1e8567c --- /dev/null +++ b/packages/falso/src/lib/i18n/he/accessory.json @@ -0,0 +1,43 @@ +{ + "data": [ + "אביזר אופנה", + "סרט זרוע", + "מנשא תינוקות", + "כובע בייסבול", + "כובע צמר", + "תכשיט", + "חולצונת", + "נרתיק סיגריות", + "מחזיק סיגריות", + "ארנק מטבעות", + "סיכת צווארון", + "קומפקט", + "אבנט", + "כובע בובה", + "וו שמלה", + "כתפייה", + "כפפת ערב", + "אבזם מתקפל", + "ביריות", + "תליון שיער", + "מקל שיער", + "כובע", + "מניפת יד", + "ממחטה", + "טלפון נייד", + "מחמם ידיים", + "גומיית שיער", + "משקפת שמש", + "ארנק", + "שעון", + "גרביים", + "עניבה", + "כפפות", + "גרבי ניילון", + "כובע צמר", + "כובע מצחייה", + "ברט", + "כובע קש", + "כובע דרבי" + ] +} diff --git a/packages/falso/src/lib/i18n/he/accessory.ts b/packages/falso/src/lib/i18n/he/accessory.ts new file mode 100644 index 00000000..fb9eae78 --- /dev/null +++ b/packages/falso/src/lib/i18n/he/accessory.ts @@ -0,0 +1,22 @@ +import { FakeOptions, fake } from './core/core'; +import { data } from './accessory.json'; + +/** + * Generate a random accessory. + * + * @category Commerce + * + * @example + * + * randAccessory() + * + * @example + * + * randAccessory({ length: 10 }) + * + */ +export function randAccessory( + options?: Options +) { + return fake(data, options); +} From 974a63bda73bfad655e13751d99c38f0331e13f1 Mon Sep 17 00:00:00 2001 From: ChenReuven Date: Sun, 25 Aug 2024 15:38:37 +0300 Subject: [PATCH 3/3] fixes --- .../src/lib/i18n/he/{accessory.json => accessory.i18n.json} | 0 packages/falso/src/lib/i18n/he/accessory.ts | 4 ++-- packages/falso/src/lib/i18n/he/index.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) rename packages/falso/src/lib/i18n/he/{accessory.json => accessory.i18n.json} (100%) diff --git a/packages/falso/src/lib/i18n/he/accessory.json b/packages/falso/src/lib/i18n/he/accessory.i18n.json similarity index 100% rename from packages/falso/src/lib/i18n/he/accessory.json rename to packages/falso/src/lib/i18n/he/accessory.i18n.json diff --git a/packages/falso/src/lib/i18n/he/accessory.ts b/packages/falso/src/lib/i18n/he/accessory.ts index fb9eae78..420aab15 100644 --- a/packages/falso/src/lib/i18n/he/accessory.ts +++ b/packages/falso/src/lib/i18n/he/accessory.ts @@ -1,5 +1,5 @@ -import { FakeOptions, fake } from './core/core'; -import { data } from './accessory.json'; +import { FakeOptions, fake } from '../../core/core'; +import { data } from './accessory.i18n.json'; /** * Generate a random accessory. diff --git a/packages/falso/src/lib/i18n/he/index.ts b/packages/falso/src/lib/i18n/he/index.ts index 5110b00d..1e94c41a 100644 --- a/packages/falso/src/lib/i18n/he/index.ts +++ b/packages/falso/src/lib/i18n/he/index.ts @@ -1 +1,2 @@ export { randBird } from './bird'; +export { randAccessory } from './accessory';