Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(locale): add Senegal locale #2525

Merged
merged 7 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/guide/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ In this example there are 5 locales. Each of these is checked in order, and the
| `fr_CA` | French (Canada) | `fakerFR_CA` |
| `fr_CH` | French (Switzerland) | `fakerFR_CH` |
| `fr_LU` | French (Luxembourg) | `fakerFR_LU` |
| `fr_SN` | French (Senegal) | `fakerFR_SN` |
| `he` | Hebrew | `fakerHE` |
| `hr` | Croatian | `fakerHR` |
| `hu` | Hungarian | `fakerHU` |
Expand Down
14 changes: 14 additions & 0 deletions src/locale/fr_SN.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/

import { Faker } from '../faker';
import base from '../locales/base';
import en from '../locales/en';
import fr from '../locales/fr';
import fr_SN from '../locales/fr_SN';

export const faker = new Faker({
locale: [fr_SN, fr, en, base],
});
3 changes: 3 additions & 0 deletions src/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { faker as fakerFR_BE } from './fr_BE';
import { faker as fakerFR_CA } from './fr_CA';
import { faker as fakerFR_CH } from './fr_CH';
import { faker as fakerFR_LU } from './fr_LU';
import { faker as fakerFR_SN } from './fr_SN';
import { faker as fakerHE } from './he';
import { faker as fakerHR } from './hr';
import { faker as fakerHU } from './hu';
Expand Down Expand Up @@ -106,6 +107,7 @@ export {
fakerFR_CA,
fakerFR_CH,
fakerFR_LU,
fakerFR_SN,
fakerHE,
fakerHR,
fakerHU,
Expand Down Expand Up @@ -176,6 +178,7 @@ export const allFakers = {
fr_CA: fakerFR_CA,
fr_CH: fakerFR_CH,
fr_LU: fakerFR_LU,
fr_SN: fakerFR_SN,
he: fakerHE,
hr: fakerHR,
hu: fakerHU,
Expand Down
14 changes: 14 additions & 0 deletions src/locales/fr_SN/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/
import type { LocaleDefinition } from '../..';
import internet from './internet';
import metadata from './metadata';

const fr_SN: LocaleDefinition = {
internet,
metadata,
};

export default fr_SN;
1 change: 1 addition & 0 deletions src/locales/fr_SN/internet/domain_suffix.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default ['sn', 'com', 'net', 'org'];
1 change: 1 addition & 0 deletions src/locales/fr_SN/internet/free_email.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default ['gmail.com', 'yahoo.com', 'hotmail.com'];
14 changes: 14 additions & 0 deletions src/locales/fr_SN/internet/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/
import type { InternetDefinition } from '../../..';
import domain_suffix from './domain_suffix';
import free_email from './free_email';

const internet: InternetDefinition = {
domain_suffix,
free_email,
};

export default internet;
13 changes: 13 additions & 0 deletions src/locales/fr_SN/metadata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { PreBuiltMetadataDefinitionForCountry } from '../../definitions/metadata';

const metadata: PreBuiltMetadataDefinitionForCountry = {
title: 'French (Senegal)',
code: 'fr_SN',
country: 'SN',
language: 'fr',
endonym: 'Français (Sénégal)',
dir: 'ltr',
script: 'Latn',
};

export default metadata;
1 change: 1 addition & 0 deletions src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export { default as fr_BE } from './fr_BE';
export { default as fr_CA } from './fr_CA';
export { default as fr_CH } from './fr_CH';
export { default as fr_LU } from './fr_LU';
export { default as fr_SN } from './fr_SN';
export { default as he } from './he';
export { default as hr } from './hr';
export { default as hu } from './hu';
Expand Down
6 changes: 3 additions & 3 deletions test/all-functional.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ const BROKEN_LOCALE_METHODS = {
person: {
prefix: ['az', 'id_ID', 'ru', 'zh_CN', 'zh_TW'],
suffix: ['az', 'it', 'mk', 'pt_PT', 'ro_MD', 'ru'],
jobArea: ['ar', 'fr', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_LU'],
jobDescriptor: ['ar', 'fr', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_LU'],
jobTitle: ['ar', 'fr', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_LU', 'ur'],
jobArea: ['ar', 'fr', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_LU', 'fr_SN'],
jobDescriptor: ['ar', 'fr', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_LU', 'fr_SN'],
jobTitle: ['ar', 'fr', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_LU', 'ur', 'fr_SN'],
jobType: ['ur'],
},
} satisfies {
Expand Down