diff options
Diffstat (limited to 'src')
31 files changed, 52 insertions, 72 deletions
diff --git a/src/definitions/definitions.ts b/src/definitions/definitions.ts index dd477beb..413b2bd7 100644 --- a/src/definitions/definitions.ts +++ b/src/definitions/definitions.ts @@ -22,9 +22,9 @@ import type { WordDefinitions } from './word'; /** * Wrapper type for all definition categories that will make all properties optional and allow extra properties. */ -export type LocaleEntry<T extends Record<string, unknown>> = Partial<T> & - // Unsupported & custom entries - Record<string, unknown>; +export type LocaleEntry<T extends Record<string, unknown>> = { + [P in keyof T]?: T[P] | null; +} & Record<string, unknown>; // Unsupported & custom entries /** * The definitions as used by the translations/locales. diff --git a/src/definitions/person.ts b/src/definitions/person.ts index 9cc86d3a..b300a689 100644 --- a/src/definitions/person.ts +++ b/src/definitions/person.ts @@ -7,21 +7,21 @@ export type PersonDefinitions = LocaleEntry<{ gender: string[]; sex: string[]; - prefix?: string[]; - female_prefix?: string[]; - male_prefix?: string[]; + prefix: string[]; + female_prefix: string[]; + male_prefix: string[]; - first_name?: string[]; - female_first_name?: string[]; - male_first_name?: string[]; + first_name: string[]; + female_first_name: string[]; + male_first_name: string[]; - middle_name?: string[]; - female_middle_name?: string[]; - male_middle_name?: string[]; + middle_name: string[]; + female_middle_name: string[]; + male_middle_name: string[]; - last_name?: string[]; - female_last_name?: string[]; - male_last_name?: string[]; + last_name: string[]; + female_last_name: string[]; + male_last_name: string[]; suffix: string[]; @@ -33,11 +33,11 @@ export type PersonDefinitions = LocaleEntry<{ /** * A weighted list of patterns used to generate last names. */ - last_name_pattern?: Array<{ value: string; weight: number }>; - male_last_name_pattern?: Array<{ value: string; weight: number }>; - female_last_name_pattern?: Array<{ value: string; weight: number }>; + last_name_pattern: Array<{ value: string; weight: number }>; + male_last_name_pattern: Array<{ value: string; weight: number }>; + female_last_name_pattern: Array<{ value: string; weight: number }>; - bio_pattern?: string[]; + bio_pattern: string[]; title: PersonTitleDefinitions; @@ -47,8 +47,8 @@ export type PersonDefinitions = LocaleEntry<{ /** * The possible definitions related to people's titles. */ -export interface PersonTitleDefinitions { - descriptor?: string[]; +export type PersonTitleDefinitions = LocaleEntry<{ + descriptor: string[]; job: string[]; - level?: string[]; -} + level: string[]; +}>; diff --git a/src/locales/az/company/suffix.ts b/src/locales/az/company/suffix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/az/company/suffix.ts +++ b/src/locales/az/company/suffix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/az/location/state.ts b/src/locales/az/location/state.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/az/location/state.ts +++ b/src/locales/az/location/state.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/az/person/female_prefix.ts b/src/locales/az/person/female_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/az/person/female_prefix.ts +++ b/src/locales/az/person/female_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/az/person/male_prefix.ts b/src/locales/az/person/male_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/az/person/male_prefix.ts +++ b/src/locales/az/person/male_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/az/person/prefix.ts b/src/locales/az/person/prefix.ts index cb1d846e..7646bbd1 100644 --- a/src/locales/az/person/prefix.ts +++ b/src/locales/az/person/prefix.ts @@ -1,5 +1 @@ -import { mergeArrays } from './../../../internal/merge'; -import female_prefix from './female_prefix'; -import male_prefix from './male_prefix'; - -export default mergeArrays(female_prefix, male_prefix); +export default null; diff --git a/src/locales/az/person/suffix.ts b/src/locales/az/person/suffix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/az/person/suffix.ts +++ b/src/locales/az/person/suffix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/id_ID/person/female_prefix.ts b/src/locales/id_ID/person/female_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/id_ID/person/female_prefix.ts +++ b/src/locales/id_ID/person/female_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/id_ID/person/male_prefix.ts b/src/locales/id_ID/person/male_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/id_ID/person/male_prefix.ts +++ b/src/locales/id_ID/person/male_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/id_ID/person/prefix.ts b/src/locales/id_ID/person/prefix.ts index cb1d846e..7646bbd1 100644 --- a/src/locales/id_ID/person/prefix.ts +++ b/src/locales/id_ID/person/prefix.ts @@ -1,5 +1 @@ -import { mergeArrays } from './../../../internal/merge'; -import female_prefix from './female_prefix'; -import male_prefix from './male_prefix'; - -export default mergeArrays(female_prefix, male_prefix); +export default null; diff --git a/src/locales/it/person/suffix.ts b/src/locales/it/person/suffix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/it/person/suffix.ts +++ b/src/locales/it/person/suffix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/mk/person/suffix.ts b/src/locales/mk/person/suffix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/mk/person/suffix.ts +++ b/src/locales/mk/person/suffix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/pt_BR/location/city_prefix.ts b/src/locales/pt_BR/location/city_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/pt_BR/location/city_prefix.ts +++ b/src/locales/pt_BR/location/city_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/pt_PT/location/city_prefix.ts b/src/locales/pt_PT/location/city_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/pt_PT/location/city_prefix.ts +++ b/src/locales/pt_PT/location/city_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/pt_PT/location/city_suffix.ts b/src/locales/pt_PT/location/city_suffix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/pt_PT/location/city_suffix.ts +++ b/src/locales/pt_PT/location/city_suffix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/pt_PT/person/suffix.ts b/src/locales/pt_PT/person/suffix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/pt_PT/person/suffix.ts +++ b/src/locales/pt_PT/person/suffix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/ru/person/female_prefix.ts b/src/locales/ru/person/female_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/ru/person/female_prefix.ts +++ b/src/locales/ru/person/female_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/ru/person/male_prefix.ts b/src/locales/ru/person/male_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/ru/person/male_prefix.ts +++ b/src/locales/ru/person/male_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/ru/person/prefix.ts b/src/locales/ru/person/prefix.ts index cb1d846e..7646bbd1 100644 --- a/src/locales/ru/person/prefix.ts +++ b/src/locales/ru/person/prefix.ts @@ -1,5 +1 @@ -import { mergeArrays } from './../../../internal/merge'; -import female_prefix from './female_prefix'; -import male_prefix from './male_prefix'; - -export default mergeArrays(female_prefix, male_prefix); +export default null; diff --git a/src/locales/ru/person/suffix.ts b/src/locales/ru/person/suffix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/ru/person/suffix.ts +++ b/src/locales/ru/person/suffix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/sk/location/state.ts b/src/locales/sk/location/state.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/sk/location/state.ts +++ b/src/locales/sk/location/state.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/sk/location/state_abbr.ts b/src/locales/sk/location/state_abbr.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/sk/location/state_abbr.ts +++ b/src/locales/sk/location/state_abbr.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/th/location/city_prefix.ts b/src/locales/th/location/city_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/th/location/city_prefix.ts +++ b/src/locales/th/location/city_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/th/location/city_suffix.ts b/src/locales/th/location/city_suffix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/th/location/city_suffix.ts +++ b/src/locales/th/location/city_suffix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/zh_CN/person/female_prefix.ts b/src/locales/zh_CN/person/female_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/zh_CN/person/female_prefix.ts +++ b/src/locales/zh_CN/person/female_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/zh_CN/person/male_prefix.ts b/src/locales/zh_CN/person/male_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/zh_CN/person/male_prefix.ts +++ b/src/locales/zh_CN/person/male_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/zh_CN/person/prefix.ts b/src/locales/zh_CN/person/prefix.ts index cb1d846e..7646bbd1 100644 --- a/src/locales/zh_CN/person/prefix.ts +++ b/src/locales/zh_CN/person/prefix.ts @@ -1,5 +1 @@ -import { mergeArrays } from './../../../internal/merge'; -import female_prefix from './female_prefix'; -import male_prefix from './male_prefix'; - -export default mergeArrays(female_prefix, male_prefix); +export default null; diff --git a/src/locales/zh_TW/person/female_prefix.ts b/src/locales/zh_TW/person/female_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/zh_TW/person/female_prefix.ts +++ b/src/locales/zh_TW/person/female_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/zh_TW/person/male_prefix.ts b/src/locales/zh_TW/person/male_prefix.ts index d6d1738d..7646bbd1 100644 --- a/src/locales/zh_TW/person/male_prefix.ts +++ b/src/locales/zh_TW/person/male_prefix.ts @@ -1 +1 @@ -export default []; +export default null; diff --git a/src/locales/zh_TW/person/prefix.ts b/src/locales/zh_TW/person/prefix.ts index cb1d846e..7646bbd1 100644 --- a/src/locales/zh_TW/person/prefix.ts +++ b/src/locales/zh_TW/person/prefix.ts @@ -1,5 +1 @@ -import { mergeArrays } from './../../../internal/merge'; -import female_prefix from './female_prefix'; -import male_prefix from './male_prefix'; - -export default mergeArrays(female_prefix, male_prefix); +export default null; |
