aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbrar Shahriar Adib <[email protected]>2025-03-17 01:42:59 +0600
committerGitHub <[email protected]>2025-03-16 20:42:59 +0100
commitfef0ad7859ff5994947c2c02afd6bdf13dffd234 (patch)
treee5e1f133044cc018933c7181b18110a53009222c
parent50b3241629f6c314eb21af134a0b67dd3671ab33 (diff)
downloadfaker-fef0ad7859ff5994947c2c02afd6bdf13dffd234.tar.xz
faker-fef0ad7859ff5994947c2c02afd6bdf13dffd234.zip
feat(locale): Add bn_BD locale (#3439)
-rw-r--r--docs/guide/localization.md1
-rw-r--r--src/locale/bn_BD.ts25
-rw-r--r--src/locale/index.ts3
-rw-r--r--src/locales/bn_BD/date/index.ts14
-rw-r--r--src/locales/bn_BD/date/month.ts30
-rw-r--r--src/locales/bn_BD/date/weekday.ts12
-rw-r--r--src/locales/bn_BD/index.ts20
-rw-r--r--src/locales/bn_BD/metadata.ts13
-rw-r--r--src/locales/index.ts3
-rw-r--r--test/__snapshots__/locale-data.spec.ts.snap1
-rw-r--r--test/locale-imports.spec.ts1
11 files changed, 123 insertions, 0 deletions
diff --git a/docs/guide/localization.md b/docs/guide/localization.md
index b548d523..61abade1 100644
--- a/docs/guide/localization.md
+++ b/docs/guide/localization.md
@@ -54,6 +54,7 @@ In this example there are 5 locales. Each of these is checked in order, and the
| `ar` | Arabic | `fakerAR` |
| `az` | Azerbaijani | `fakerAZ` |
| `base` | Base | `fakerBASE` |
+| `bn_BD` | Bengali (Bangladesh) | `fakerBN_BD` |
| `cs_CZ` | Czech (Czechia) | `fakerCS_CZ` |
| `da` | Danish | `fakerDA` |
| `de` | German | `fakerDE` |
diff --git a/src/locale/bn_BD.ts b/src/locale/bn_BD.ts
new file mode 100644
index 00000000..d8044e25
--- /dev/null
+++ b/src/locale/bn_BD.ts
@@ -0,0 +1,25 @@
+/*
+ * This file is automatically generated.
+ * Run 'pnpm run generate:locales' to update.
+ */
+
+import { Faker } from '../faker';
+import base from '../locales/base';
+import bn_BD from '../locales/bn_BD';
+import en from '../locales/en';
+
+/**
+ * The faker instance for the `bn_BD` locale.
+ *
+ * - Language: Bengali (Bangladesh)
+ * - Endonym: বাংলা (বাংলাদেশ)
+ *
+ * This instance uses the following locales internally (in descending precedence):
+ *
+ * - `bn_BD`
+ * - `en`
+ * - `base`
+ */
+export const faker = new Faker({
+ locale: [bn_BD, en, base],
+});
diff --git a/src/locale/index.ts b/src/locale/index.ts
index cf1e6f50..2ef2120c 100644
--- a/src/locale/index.ts
+++ b/src/locale/index.ts
@@ -7,6 +7,7 @@ import { faker as fakerAF_ZA } from './af_ZA';
import { faker as fakerAR } from './ar';
import { faker as fakerAZ } from './az';
import { faker as fakerBASE } from './base';
+import { faker as fakerBN_BD } from './bn_BD';
import { faker as fakerCS_CZ } from './cs_CZ';
import { faker as fakerDA } from './da';
import { faker as fakerDE } from './de';
@@ -77,6 +78,7 @@ export { faker as fakerAF_ZA } from './af_ZA';
export { faker as fakerAR } from './ar';
export { faker as fakerAZ } from './az';
export { faker as fakerBASE } from './base';
+export { faker as fakerBN_BD } from './bn_BD';
export { faker as fakerCS_CZ } from './cs_CZ';
export { faker as fakerDA } from './da';
export { faker as fakerDE } from './de';
@@ -148,6 +150,7 @@ export const allFakers = {
ar: fakerAR,
az: fakerAZ,
base: fakerBASE,
+ bn_BD: fakerBN_BD,
cs_CZ: fakerCS_CZ,
da: fakerDA,
de: fakerDE,
diff --git a/src/locales/bn_BD/date/index.ts b/src/locales/bn_BD/date/index.ts
new file mode 100644
index 00000000..a28ce823
--- /dev/null
+++ b/src/locales/bn_BD/date/index.ts
@@ -0,0 +1,14 @@
+/*
+ * This file is automatically generated.
+ * Run 'pnpm run generate:locales' to update.
+ */
+import type { DateDefinition } from '../../..';
+import month from './month';
+import weekday from './weekday';
+
+const date: DateDefinition = {
+ month,
+ weekday,
+};
+
+export default date;
diff --git a/src/locales/bn_BD/date/month.ts b/src/locales/bn_BD/date/month.ts
new file mode 100644
index 00000000..ec6eefe2
--- /dev/null
+++ b/src/locales/bn_BD/date/month.ts
@@ -0,0 +1,30 @@
+export default {
+ wide: [
+ 'অক্টোবর',
+ 'আগস্ট',
+ 'এপ্রিল',
+ 'জানুয়ারি',
+ 'জুন',
+ 'জুলাই',
+ 'ডিসেম্বর',
+ 'নভেম্বর',
+ 'ফেব্রুয়ারি',
+ 'মার্চ',
+ 'মে',
+ 'সেপ্টেম্বর',
+ ],
+ abbr: [
+ 'অক্ট',
+ 'আগ',
+ 'এপ্রি',
+ 'জানু',
+ 'জুন',
+ 'জুলা',
+ 'ডিস',
+ 'নভ',
+ 'ফেব',
+ 'মার্চ',
+ 'মে',
+ 'সেপ',
+ ],
+};
diff --git a/src/locales/bn_BD/date/weekday.ts b/src/locales/bn_BD/date/weekday.ts
new file mode 100644
index 00000000..67f3b3ef
--- /dev/null
+++ b/src/locales/bn_BD/date/weekday.ts
@@ -0,0 +1,12 @@
+export default {
+ wide: [
+ 'বুধবার',
+ 'বৃহস্পতিবার',
+ 'মঙ্গলবার',
+ 'রবিবার',
+ 'শনিবার',
+ 'শুক্রবার',
+ 'সোমবার',
+ ],
+ abbr: ['বুধ', 'বৃহস্পতি', 'মঙ্গল', 'রবি', 'শনি', 'শুক্র', 'সোম'],
+};
diff --git a/src/locales/bn_BD/index.ts b/src/locales/bn_BD/index.ts
new file mode 100644
index 00000000..36ff6a7a
--- /dev/null
+++ b/src/locales/bn_BD/index.ts
@@ -0,0 +1,20 @@
+/*
+ * This file is automatically generated.
+ * Run 'pnpm run generate:locales' to update.
+ */
+import type { LocaleDefinition } from '../..';
+import date from './date';
+import metadata from './metadata';
+
+/**
+ * The locale data for the `bn_BD` locale.
+ *
+ * - Language: Bengali (Bangladesh)
+ * - Endonym: বাংলা (বাংলাদেশ)
+ */
+const bn_BD: LocaleDefinition = {
+ date,
+ metadata,
+};
+
+export default bn_BD;
diff --git a/src/locales/bn_BD/metadata.ts b/src/locales/bn_BD/metadata.ts
new file mode 100644
index 00000000..e49c7dc8
--- /dev/null
+++ b/src/locales/bn_BD/metadata.ts
@@ -0,0 +1,13 @@
+import type { PreBuiltMetadataDefinitionForCountry } from '../../definitions/metadata';
+
+const metadata: PreBuiltMetadataDefinitionForCountry = {
+ title: 'Bengali (Bangladesh)',
+ code: 'bn_BD',
+ country: 'BD',
+ language: 'bn',
+ endonym: 'বাংলা (বাংলাদেশ)',
+ dir: 'ltr',
+ script: 'Beng',
+};
+
+export default metadata;
diff --git a/src/locales/index.ts b/src/locales/index.ts
index a468e232..f410092d 100644
--- a/src/locales/index.ts
+++ b/src/locales/index.ts
@@ -7,6 +7,7 @@ import af_ZA from './af_ZA';
import ar from './ar';
import az from './az';
import base from './base';
+import bn_BD from './bn_BD';
import cs_CZ from './cs_CZ';
import da from './da';
import de from './de';
@@ -77,6 +78,7 @@ export { default as af_ZA } from './af_ZA';
export { default as ar } from './ar';
export { default as az } from './az';
export { default as base } from './base';
+export { default as bn_BD } from './bn_BD';
export { default as cs_CZ } from './cs_CZ';
export { default as da } from './da';
export { default as de } from './de';
@@ -148,6 +150,7 @@ export const allLocales = {
ar,
az,
base,
+ bn_BD,
cs_CZ,
da,
de,
diff --git a/test/__snapshots__/locale-data.spec.ts.snap b/test/__snapshots__/locale-data.spec.ts.snap
index 9408b4fd..a0eab924 100644
--- a/test/__snapshots__/locale-data.spec.ts.snap
+++ b/test/__snapshots__/locale-data.spec.ts.snap
@@ -6,6 +6,7 @@ exports[`locale-data > should only have known characters 1`] = `
"ar": " #()-.T،ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىيًٍَُِّْٱ",
"az": " #()+,-.ABCDEFGHJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyzÇÖÜçöüğİıŞşƏəабвгдеийклмнопрстуфцчьюя’",
"base": " ()+,-./:;ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",
+ "bn_BD": "অআইএকগঙচজটডতধনপফবভমযরলশসহ়ািুৃেো্",
"cs_CZ": " #()+-.ABCDEFGHIJKLMNOPRSTUVWXZabcdefghijklmnopqrstuvwxyzÁÍÚáéíóöúüýČčĎďěňŘřŠšťůűŽž",
"da": " !"#()+,-./ABCDEFGHIJKLMNOPQRSTUVWYZabcdefghijklmnopqrstuvwxyzÅÆØãåæçéíø",
"de": " #&'()+,-.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÄÖÜßàãäéíöúü",
diff --git a/test/locale-imports.spec.ts b/test/locale-imports.spec.ts
index f501946c..eb1bb508 100644
--- a/test/locale-imports.spec.ts
+++ b/test/locale-imports.spec.ts
@@ -46,6 +46,7 @@ describe.each(keys(allLocales))('locale imports', (locale) => {
expect([
'Arab',
'Armn',
+ 'Beng',
'Cyrl',
'Deva',
'Geor',