aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Morais Ferreira <[email protected]>2023-01-06 00:12:09 +0100
committerGitHub <[email protected]>2023-01-05 23:12:09 +0000
commitc66f7bd70f930c4a080cc24cc8d09baab260f6d0 (patch)
treef598f65e2bd6c77c827560b55adc44c0f56f39b5
parent2a06b6a197d5fe6939eac05035ca8ef9a50a2e92 (diff)
downloadfaker-c66f7bd70f930c4a080cc24cc8d09baab260f6d0.tar.xz
faker-c66f7bd70f930c4a080cc24cc8d09baab260f6d0.zip
feat(locale): add Luxembourg (French) locale (#1693)
-rw-r--r--docs/guide/localization.md1
-rw-r--r--src/locale/fr_LU.ts17
-rw-r--r--src/locales/fr_LU/cell_phone/formats.ts10
-rw-r--r--src/locales/fr_LU/cell_phone/index.ts11
-rw-r--r--src/locales/fr_LU/index.ts19
-rw-r--r--src/locales/fr_LU/internet/domain_suffix.ts1
-rw-r--r--src/locales/fr_LU/internet/index.ts12
-rw-r--r--src/locales/fr_LU/location/city.ts1
-rw-r--r--src/locales/fr_LU/location/city_name.ts14
-rw-r--r--src/locales/fr_LU/location/index.ts18
-rw-r--r--src/locales/fr_LU/location/postcode.ts1
-rw-r--r--src/locales/fr_LU/location/state.ts14
-rw-r--r--src/locales/fr_LU/phone_number/formats.ts1
-rw-r--r--src/locales/fr_LU/phone_number/index.ts12
-rw-r--r--src/locales/index.ts3
-rw-r--r--test/__snapshots__/random.spec.ts.snap2
16 files changed, 136 insertions, 1 deletions
diff --git a/docs/guide/localization.md b/docs/guide/localization.md
index 1412ec00..b0bfbad8 100644
--- a/docs/guide/localization.md
+++ b/docs/guide/localization.md
@@ -70,6 +70,7 @@ However, in most cases, using a specific locale will be beneficial in the long t
| fr_BE | Français (Belgique) |
| fr_CA | French (Canada) |
| fr_CH | French (Switzerland) |
+| fr_LU | French (Luxembourg) |
| ge | Georgian |
| he | Hebrew |
| hr | Hrvatski |
diff --git a/src/locale/fr_LU.ts b/src/locale/fr_LU.ts
new file mode 100644
index 00000000..8e63bfdb
--- /dev/null
+++ b/src/locale/fr_LU.ts
@@ -0,0 +1,17 @@
+/*
+ * This file is automatically generated.
+ * Run 'pnpm run generate:locales' to update.
+ */
+
+import { Faker } from '../faker';
+import en from '../locales/en';
+import fr_LU from '../locales/fr_LU';
+
+export const faker = new Faker({
+ locale: 'fr_LU',
+ localeFallback: 'en',
+ locales: {
+ fr_LU,
+ en,
+ },
+});
diff --git a/src/locales/fr_LU/cell_phone/formats.ts b/src/locales/fr_LU/cell_phone/formats.ts
new file mode 100644
index 00000000..5e06f343
--- /dev/null
+++ b/src/locales/fr_LU/cell_phone/formats.ts
@@ -0,0 +1,10 @@
+export default [
+ '621 ### ###',
+ '661 ### ###',
+ '671 ### ###',
+ '691 ### ###',
+ '+352 621 ### ###',
+ '+352 661 ### ###',
+ '+352 671 ### ###',
+ '+352 691 ### ###',
+];
diff --git a/src/locales/fr_LU/cell_phone/index.ts b/src/locales/fr_LU/cell_phone/index.ts
new file mode 100644
index 00000000..337d77f0
--- /dev/null
+++ b/src/locales/fr_LU/cell_phone/index.ts
@@ -0,0 +1,11 @@
+/*
+ * This file is automatically generated.
+ * Run 'pnpm run generate:locales' to update.
+ */
+import formats from './formats';
+
+const cell_phone = {
+ formats,
+};
+
+export default cell_phone;
diff --git a/src/locales/fr_LU/index.ts b/src/locales/fr_LU/index.ts
new file mode 100644
index 00000000..916c21d5
--- /dev/null
+++ b/src/locales/fr_LU/index.ts
@@ -0,0 +1,19 @@
+/*
+ * This file is automatically generated.
+ * Run 'pnpm run generate:locales' to update.
+ */
+import type { LocaleDefinition } from '../..';
+import cell_phone from './cell_phone';
+import internet from './internet';
+import location from './location';
+import phone_number from './phone_number';
+
+const fr_LU: LocaleDefinition = {
+ title: 'French (Luxembourg)',
+ cell_phone,
+ internet,
+ location,
+ phone_number,
+};
+
+export default fr_LU;
diff --git a/src/locales/fr_LU/internet/domain_suffix.ts b/src/locales/fr_LU/internet/domain_suffix.ts
new file mode 100644
index 00000000..14d85ea5
--- /dev/null
+++ b/src/locales/fr_LU/internet/domain_suffix.ts
@@ -0,0 +1 @@
+export default ['lu'];
diff --git a/src/locales/fr_LU/internet/index.ts b/src/locales/fr_LU/internet/index.ts
new file mode 100644
index 00000000..5726872b
--- /dev/null
+++ b/src/locales/fr_LU/internet/index.ts
@@ -0,0 +1,12 @@
+/*
+ * This file is automatically generated.
+ * Run 'pnpm run generate:locales' to update.
+ */
+import type { InternetDefinitions } from '../../..';
+import domain_suffix from './domain_suffix';
+
+const internet: InternetDefinitions = {
+ domain_suffix,
+};
+
+export default internet;
diff --git a/src/locales/fr_LU/location/city.ts b/src/locales/fr_LU/location/city.ts
new file mode 100644
index 00000000..ad43b68f
--- /dev/null
+++ b/src/locales/fr_LU/location/city.ts
@@ -0,0 +1 @@
+export default ['{{location.city_name}}'];
diff --git a/src/locales/fr_LU/location/city_name.ts b/src/locales/fr_LU/location/city_name.ts
new file mode 100644
index 00000000..6c1ee8e6
--- /dev/null
+++ b/src/locales/fr_LU/location/city_name.ts
@@ -0,0 +1,14 @@
+export default [
+ 'Diekirch',
+ 'Differdange',
+ 'Dudelange',
+ 'Echternach',
+ 'Esch-sur-Alzette',
+ 'Ettelbruck',
+ 'Grevenmacher',
+ 'Luxembourg',
+ 'Remich',
+ 'Rumelange',
+ 'Vianden',
+ 'Wiltz',
+];
diff --git a/src/locales/fr_LU/location/index.ts b/src/locales/fr_LU/location/index.ts
new file mode 100644
index 00000000..1db98544
--- /dev/null
+++ b/src/locales/fr_LU/location/index.ts
@@ -0,0 +1,18 @@
+/*
+ * This file is automatically generated.
+ * Run 'pnpm run generate:locales' to update.
+ */
+import type { LocationDefinitions } from '../../..';
+import city from './city';
+import city_name from './city_name';
+import postcode from './postcode';
+import state from './state';
+
+const location: LocationDefinitions = {
+ city,
+ city_name,
+ postcode,
+ state,
+};
+
+export default location;
diff --git a/src/locales/fr_LU/location/postcode.ts b/src/locales/fr_LU/location/postcode.ts
new file mode 100644
index 00000000..a8235678
--- /dev/null
+++ b/src/locales/fr_LU/location/postcode.ts
@@ -0,0 +1 @@
+export default ['####'];
diff --git a/src/locales/fr_LU/location/state.ts b/src/locales/fr_LU/location/state.ts
new file mode 100644
index 00000000..e653413a
--- /dev/null
+++ b/src/locales/fr_LU/location/state.ts
@@ -0,0 +1,14 @@
+export default [
+ 'Capellen',
+ 'Clervaux',
+ 'Diekirch',
+ 'Echternach',
+ 'Esch-sur-Alzette',
+ 'Grevenmacher',
+ 'Luxembourg',
+ 'Mersch',
+ 'Redange',
+ 'Remich',
+ 'Vianden',
+ 'Wiltz',
+];
diff --git a/src/locales/fr_LU/phone_number/formats.ts b/src/locales/fr_LU/phone_number/formats.ts
new file mode 100644
index 00000000..f1f92d74
--- /dev/null
+++ b/src/locales/fr_LU/phone_number/formats.ts
@@ -0,0 +1 @@
+export default ['######', '########', '+352 ######', '+352 ########'];
diff --git a/src/locales/fr_LU/phone_number/index.ts b/src/locales/fr_LU/phone_number/index.ts
new file mode 100644
index 00000000..bf48a8b5
--- /dev/null
+++ b/src/locales/fr_LU/phone_number/index.ts
@@ -0,0 +1,12 @@
+/*
+ * This file is automatically generated.
+ * Run 'pnpm run generate:locales' to update.
+ */
+import type { PhoneNumberDefinitions } from '../../..';
+import formats from './formats';
+
+const phone_number: PhoneNumberDefinitions = {
+ formats,
+};
+
+export default phone_number;
diff --git a/src/locales/index.ts b/src/locales/index.ts
index 85cb540d..213442d3 100644
--- a/src/locales/index.ts
+++ b/src/locales/index.ts
@@ -33,6 +33,7 @@ import fr from './fr';
import fr_BE from './fr_BE';
import fr_CA from './fr_CA';
import fr_CH from './fr_CH';
+import fr_LU from './fr_LU';
import ge from './ge';
import he from './he';
import hr from './hr';
@@ -93,6 +94,7 @@ export type KnownLocale =
| 'fr_BE'
| 'fr_CA'
| 'fr_CH'
+ | 'fr_LU'
| 'ge'
| 'he'
| 'hr'
@@ -155,6 +157,7 @@ const locales: KnownLocales = {
fr_BE,
fr_CA,
fr_CH,
+ fr_LU,
ge,
he,
hr,
diff --git a/test/__snapshots__/random.spec.ts.snap b/test/__snapshots__/random.spec.ts.snap
index 7f01d87e..5fe3e02c 100644
--- a/test/__snapshots__/random.spec.ts.snap
+++ b/test/__snapshots__/random.spec.ts.snap
@@ -8,7 +8,7 @@ exports[`random > 42 > alphaNumeric > noArgs 1`] = `"n"`;
exports[`random > 42 > alphaNumeric > with length 1`] = `"nNWbJ"`;
-exports[`random > 42 > locale 1`] = `"es"`;
+exports[`random > 42 > locale 1`] = `"es_MX"`;
exports[`random > 42 > numeric > noArgs 1`] = `"3"`;