Skip to content

Commit fef0ad7

Browse files
feat(locale): Add bn_BD locale (#3439)
1 parent 50b3241 commit fef0ad7

File tree

11 files changed

+123
-0
lines changed

11 files changed

+123
-0
lines changed

docs/guide/localization.md

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ In this example there are 5 locales. Each of these is checked in order, and the
5454
| `ar` | Arabic | `fakerAR` |
5555
| `az` | Azerbaijani | `fakerAZ` |
5656
| `base` | Base | `fakerBASE` |
57+
| `bn_BD` | Bengali (Bangladesh) | `fakerBN_BD` |
5758
| `cs_CZ` | Czech (Czechia) | `fakerCS_CZ` |
5859
| `da` | Danish | `fakerDA` |
5960
| `de` | German | `fakerDE` |

src/locale/bn_BD.ts

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* This file is automatically generated.
3+
* Run 'pnpm run generate:locales' to update.
4+
*/
5+
6+
import { Faker } from '../faker';
7+
import base from '../locales/base';
8+
import bn_BD from '../locales/bn_BD';
9+
import en from '../locales/en';
10+
11+
/**
12+
* The faker instance for the `bn_BD` locale.
13+
*
14+
* - Language: Bengali (Bangladesh)
15+
* - Endonym: বাংলা (বাংলাদেশ)
16+
*
17+
* This instance uses the following locales internally (in descending precedence):
18+
*
19+
* - `bn_BD`
20+
* - `en`
21+
* - `base`
22+
*/
23+
export const faker = new Faker({
24+
locale: [bn_BD, en, base],
25+
});

src/locale/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { faker as fakerAF_ZA } from './af_ZA';
77
import { faker as fakerAR } from './ar';
88
import { faker as fakerAZ } from './az';
99
import { faker as fakerBASE } from './base';
10+
import { faker as fakerBN_BD } from './bn_BD';
1011
import { faker as fakerCS_CZ } from './cs_CZ';
1112
import { faker as fakerDA } from './da';
1213
import { faker as fakerDE } from './de';
@@ -77,6 +78,7 @@ export { faker as fakerAF_ZA } from './af_ZA';
7778
export { faker as fakerAR } from './ar';
7879
export { faker as fakerAZ } from './az';
7980
export { faker as fakerBASE } from './base';
81+
export { faker as fakerBN_BD } from './bn_BD';
8082
export { faker as fakerCS_CZ } from './cs_CZ';
8183
export { faker as fakerDA } from './da';
8284
export { faker as fakerDE } from './de';
@@ -148,6 +150,7 @@ export const allFakers = {
148150
ar: fakerAR,
149151
az: fakerAZ,
150152
base: fakerBASE,
153+
bn_BD: fakerBN_BD,
151154
cs_CZ: fakerCS_CZ,
152155
da: fakerDA,
153156
de: fakerDE,

src/locales/bn_BD/date/index.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* This file is automatically generated.
3+
* Run 'pnpm run generate:locales' to update.
4+
*/
5+
import type { DateDefinition } from '../../..';
6+
import month from './month';
7+
import weekday from './weekday';
8+
9+
const date: DateDefinition = {
10+
month,
11+
weekday,
12+
};
13+
14+
export default date;

src/locales/bn_BD/date/month.ts

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
export default {
2+
wide: [
3+
'অক্টোবর',
4+
'আগস্ট',
5+
'এপ্রিল',
6+
'জানুয়ারি',
7+
'জুন',
8+
'জুলাই',
9+
'ডিসেম্বর',
10+
'নভেম্বর',
11+
'ফেব্রুয়ারি',
12+
'মার্চ',
13+
'মে',
14+
'সেপ্টেম্বর',
15+
],
16+
abbr: [
17+
'অক্ট',
18+
'আগ',
19+
'এপ্রি',
20+
'জানু',
21+
'জুন',
22+
'জুলা',
23+
'ডিস',
24+
'নভ',
25+
'ফেব',
26+
'মার্চ',
27+
'মে',
28+
'সেপ',
29+
],
30+
};

src/locales/bn_BD/date/weekday.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default {
2+
wide: [
3+
'বুধবার',
4+
'বৃহস্পতিবার',
5+
'মঙ্গলবার',
6+
'রবিবার',
7+
'শনিবার',
8+
'শুক্রবার',
9+
'সোমবার',
10+
],
11+
abbr: ['বুধ', 'বৃহস্পতি', 'মঙ্গল', 'রবি', 'শনি', 'শুক্র', 'সোম'],
12+
};

src/locales/bn_BD/index.ts

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* This file is automatically generated.
3+
* Run 'pnpm run generate:locales' to update.
4+
*/
5+
import type { LocaleDefinition } from '../..';
6+
import date from './date';
7+
import metadata from './metadata';
8+
9+
/**
10+
* The locale data for the `bn_BD` locale.
11+
*
12+
* - Language: Bengali (Bangladesh)
13+
* - Endonym: বাংলা (বাংলাদেশ)
14+
*/
15+
const bn_BD: LocaleDefinition = {
16+
date,
17+
metadata,
18+
};
19+
20+
export default bn_BD;

src/locales/bn_BD/metadata.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { PreBuiltMetadataDefinitionForCountry } from '../../definitions/metadata';
2+
3+
const metadata: PreBuiltMetadataDefinitionForCountry = {
4+
title: 'Bengali (Bangladesh)',
5+
code: 'bn_BD',
6+
country: 'BD',
7+
language: 'bn',
8+
endonym: 'বাংলা (বাংলাদেশ)',
9+
dir: 'ltr',
10+
script: 'Beng',
11+
};
12+
13+
export default metadata;

src/locales/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import af_ZA from './af_ZA';
77
import ar from './ar';
88
import az from './az';
99
import base from './base';
10+
import bn_BD from './bn_BD';
1011
import cs_CZ from './cs_CZ';
1112
import da from './da';
1213
import de from './de';
@@ -77,6 +78,7 @@ export { default as af_ZA } from './af_ZA';
7778
export { default as ar } from './ar';
7879
export { default as az } from './az';
7980
export { default as base } from './base';
81+
export { default as bn_BD } from './bn_BD';
8082
export { default as cs_CZ } from './cs_CZ';
8183
export { default as da } from './da';
8284
export { default as de } from './de';
@@ -148,6 +150,7 @@ export const allLocales = {
148150
ar,
149151
az,
150152
base,
153+
bn_BD,
151154
cs_CZ,
152155
da,
153156
de,

test/__snapshots__/locale-data.spec.ts.snap

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ exports[`locale-data > should only have known characters 1`] = `
66
"ar": " #()-.T،ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىيًٍَُِّْٱ",
77
"az": " #()+,-.ABCDEFGHJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyzÇÖÜçöüğİıŞşƏəабвгдеийклмнопрстуфцчьюя’",
88
"base": " ()+,-./:;ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",
9+
"bn_BD": "অআইএকগঙচজটডতধনপফবভমযরলশসহ়ািুৃেো্",
910
"cs_CZ": " #()+-.ABCDEFGHIJKLMNOPRSTUVWXZabcdefghijklmnopqrstuvwxyzÁÍÚáéíóöúüýČčĎďěňŘřŠšťůűŽž",
1011
"da": " !"#()+,-./ABCDEFGHIJKLMNOPQRSTUVWYZabcdefghijklmnopqrstuvwxyzÅÆØãåæçéíø",
1112
"de": " #&'()+,-.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÄÖÜßàãäéíöúü",

test/locale-imports.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ describe.each(keys(allLocales))('locale imports', (locale) => {
4646
expect([
4747
'Arab',
4848
'Armn',
49+
'Beng',
4950
'Cyrl',
5051
'Deva',
5152
'Geor',

0 commit comments

Comments
 (0)