diff --git a/src/index.ts b/src/index.ts index f262601d0bf..49fd0978041 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,6 +12,11 @@ import { Hacker } from './hacker'; import { Helpers } from './helpers'; import { Image } from './image'; import { Internet } from './internet'; +import { MonthsDefinition } from './locales/en/date/month'; +import { WeeksDefinition } from './locales/en/date/weekday'; +import { CreditCardDefinition } from './locales/en/finance/credit_card'; +import { CurrencyDefinition } from './locales/en/finance/currency'; +import { MimeTypesDefinition } from './locales/en/system/mimeTypes'; import { Lorem } from './lorem'; import { Mersenne } from './mersenne'; import { Music } from './music'; @@ -24,6 +29,10 @@ import { Unique } from './unique'; import { Vehicle } from './vehicle'; import { Word } from './word'; +export interface LocaleDefinitionObject { + [index: string]: any; +} + export interface LocaleDefinition { title: string; separator?: string; @@ -84,7 +93,7 @@ export interface LocaleDefinition { color: any[]; department: any[]; product_description: any[]; - product_name: any[]; + product_name: LocaleDefinitionObject; }>; company?: Partial<{ adjective: any[]; @@ -103,13 +112,13 @@ export interface LocaleDefinition { type: any[]; }>; date?: Partial<{ - month: any[]; - weekday: any[]; + month: MonthsDefinition; + weekday: WeeksDefinition; }>; finance?: Partial<{ account_type: any[]; - credit_card: any[]; - currency: any[]; + credit_card: CreditCardDefinition; + currency: CurrencyDefinition; transaction_type: any[]; }>; hacker?: Partial<{ @@ -149,18 +158,18 @@ export interface LocaleDefinition { name: string[]; prefix: string[]; suffix: string[]; - title: { + title: Partial<{ descriptor?: string[]; job: string[]; level?: string[]; - }; + }>; }>; phone_number?: Partial<{ formats: any[]; }>; system?: Partial<{ directoryPaths: any[]; - mimeTypes: any[]; + mimeTypes: MimeTypesDefinition; }>; team?: Partial<{ creature: any[]; diff --git a/src/locales/en/address/building_number.js b/src/locales/en/address/building_number.js deleted file mode 100644 index 9d08ee15ed3..00000000000 --- a/src/locales/en/address/building_number.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['#####', '####', '###']; diff --git a/src/locales/en/address/building_number.ts b/src/locales/en/address/building_number.ts new file mode 100644 index 00000000000..437433e0b31 --- /dev/null +++ b/src/locales/en/address/building_number.ts @@ -0,0 +1 @@ +export const building_number: string[] = ['#####', '####', '###']; diff --git a/src/locales/en/address/city.js b/src/locales/en/address/city.ts similarity index 84% rename from src/locales/en/address/city.js rename to src/locales/en/address/city.ts index 8a4a0183b73..fc9f88fa322 100644 --- a/src/locales/en/address/city.js +++ b/src/locales/en/address/city.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const city: string[] = [ '#{city_prefix} #{Name.first_name}#{city_suffix}', '#{city_prefix} #{Name.first_name}', '#{Name.first_name}#{city_suffix}', diff --git a/src/locales/en/address/city_name.js b/src/locales/en/address/city_name.ts similarity index 99% rename from src/locales/en/address/city_name.js rename to src/locales/en/address/city_name.ts index 6415709ae3d..63a7773ec8d 100644 --- a/src/locales/en/address/city_name.js +++ b/src/locales/en/address/city_name.ts @@ -1,4 +1,4 @@ -module.exports = [ +export const city_name: string[] = [ 'Abilene', 'Akron', 'Alafaya', diff --git a/src/locales/en/address/city_prefix.js b/src/locales/en/address/city_prefix.js deleted file mode 100644 index b0e8b20fdde..00000000000 --- a/src/locales/en/address/city_prefix.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['North', 'East', 'West', 'South', 'New', 'Lake', 'Port']; diff --git a/src/locales/en/address/city_prefix.ts b/src/locales/en/address/city_prefix.ts new file mode 100644 index 00000000000..910fff48176 --- /dev/null +++ b/src/locales/en/address/city_prefix.ts @@ -0,0 +1,9 @@ +export const city_prefix: string[] = [ + 'North', + 'East', + 'West', + 'South', + 'New', + 'Lake', + 'Port', +]; diff --git a/src/locales/en/address/city_suffix.js b/src/locales/en/address/city_suffix.ts similarity index 83% rename from src/locales/en/address/city_suffix.js rename to src/locales/en/address/city_suffix.ts index 1e6795ccca2..c990e90e121 100644 --- a/src/locales/en/address/city_suffix.js +++ b/src/locales/en/address/city_suffix.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const city_suffix: string[] = [ 'town', 'ton', 'land', diff --git a/src/locales/en/address/country.js b/src/locales/en/address/country.ts similarity index 99% rename from src/locales/en/address/country.js rename to src/locales/en/address/country.ts index ed5a4f67040..f931d040728 100644 --- a/src/locales/en/address/country.js +++ b/src/locales/en/address/country.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const country: string[] = [ 'Afghanistan', 'Albania', 'Algeria', diff --git a/src/locales/en/address/country_code.js b/src/locales/en/address/country_code.ts similarity index 98% rename from src/locales/en/address/country_code.js rename to src/locales/en/address/country_code.ts index 6be7a3f177f..e3733e882f1 100644 --- a/src/locales/en/address/country_code.js +++ b/src/locales/en/address/country_code.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const country_code: string[] = [ 'AD', 'AE', 'AF', diff --git a/src/locales/en/address/country_code_alpha_3.js b/src/locales/en/address/country_code_alpha_3.ts similarity index 97% rename from src/locales/en/address/country_code_alpha_3.js rename to src/locales/en/address/country_code_alpha_3.ts index 321bd048ce0..30299a46461 100644 --- a/src/locales/en/address/country_code_alpha_3.js +++ b/src/locales/en/address/country_code_alpha_3.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const country_code_alpha_3: string[] = [ 'BGD', 'BEL', 'BFA', diff --git a/src/locales/en/address/county.js b/src/locales/en/address/county.ts similarity index 74% rename from src/locales/en/address/county.js rename to src/locales/en/address/county.ts index a23783543d9..da045a36a65 100644 --- a/src/locales/en/address/county.js +++ b/src/locales/en/address/county.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const county: string[] = [ 'Avon', 'Bedfordshire', 'Berkshire', diff --git a/src/locales/en/address/default_country.js b/src/locales/en/address/default_country.js deleted file mode 100644 index 8b651182305..00000000000 --- a/src/locales/en/address/default_country.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['United States of America']; diff --git a/src/locales/en/address/default_country.ts b/src/locales/en/address/default_country.ts new file mode 100644 index 00000000000..4e9c54d66fb --- /dev/null +++ b/src/locales/en/address/default_country.ts @@ -0,0 +1 @@ +export const default_country: string[] = ['United States of America']; diff --git a/src/locales/en/address/direction.js b/src/locales/en/address/direction.ts similarity index 73% rename from src/locales/en/address/direction.js rename to src/locales/en/address/direction.ts index fd360fb6494..d58c6c0be49 100644 --- a/src/locales/en/address/direction.js +++ b/src/locales/en/address/direction.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const direction: string[] = [ 'North', 'East', 'South', diff --git a/src/locales/en/address/direction_abbr.js b/src/locales/en/address/direction_abbr.js deleted file mode 100644 index 7c1118da7a2..00000000000 --- a/src/locales/en/address/direction_abbr.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['N', 'E', 'S', 'W', 'NE', 'NW', 'SE', 'SW']; diff --git a/src/locales/en/address/direction_abbr.ts b/src/locales/en/address/direction_abbr.ts new file mode 100644 index 00000000000..ea15e7c6b71 --- /dev/null +++ b/src/locales/en/address/direction_abbr.ts @@ -0,0 +1,10 @@ +export const direction_abbr: string[] = [ + 'N', + 'E', + 'S', + 'W', + 'NE', + 'NW', + 'SE', + 'SW', +]; diff --git a/src/locales/en/address/index.js b/src/locales/en/address/index.js deleted file mode 100644 index 9e628e458a5..00000000000 --- a/src/locales/en/address/index.js +++ /dev/null @@ -1,23 +0,0 @@ -var address = {}; -module['exports'] = address; -address.city_prefix = require('./city_prefix'); -address.city_suffix = require('./city_suffix'); -address.city_name = require('./city_name'); -address.county = require('./county'); -address.country = require('./country'); -address.country_code = require('./country_code'); -address.country_code_alpha_3 = require('./country_code_alpha_3'); -address.building_number = require('./building_number'); -address.street_suffix = require('./street_suffix'); -address.secondary_address = require('./secondary_address'); -address.postcode = require('./postcode'); -address.postcode_by_state = require('./postcode_by_state'); -address.state = require('./state'); -address.state_abbr = require('./state_abbr'); -address.time_zone = require('./time_zone'); -address.city = require('./city'); -address.street_name = require('./street_name'); -address.street_address = require('./street_address'); -address.default_country = require('./default_country'); -address.direction = require('./direction'); -address.direction_abbr = require('./direction_abbr'); diff --git a/src/locales/en/address/index.ts b/src/locales/en/address/index.ts new file mode 100644 index 00000000000..60b1a8cd94e --- /dev/null +++ b/src/locales/en/address/index.ts @@ -0,0 +1,44 @@ +import { state, street_name, street_address } from '../../ar/address'; +import { time_zone } from '../../es/address'; +import { building_number } from './building_number'; +import { city } from './city'; +import { city_name } from './city_name'; +import { city_prefix } from './city_prefix'; +import { city_suffix } from './city_suffix'; +import { country } from './country'; +import { country_code } from './country_code'; +import { country_code_alpha_3 } from './country_code_alpha_3'; +import { county } from './county'; +import { default_country } from './default_country'; +import { direction } from './direction'; +import { direction_abbr } from './direction_abbr'; +import { postcode } from './postcode'; +import { postcode_by_state } from './postcode_by_state'; +import { secondary_address } from './secondary_address'; +import { state_abbr } from './state_abbr'; +import { street_suffix } from './street_suffix'; + +export const address = { + city_prefix: city_prefix, + city_suffix: city_suffix, + city_name: city_name, + county: county, + country: country, + country_code: country_code, + country_code_alpha_3: country_code_alpha_3, + building_number: building_number, + street_suffix: street_suffix, + secondary_address: secondary_address, + postcode: postcode, + postcode_by_state: postcode_by_state, + state: state, + state_abbr: state_abbr, + time_zone: time_zone, + city: city, + street_name: street_name, + street_address: street_address, + default_country: default_country, + direction: direction, + direction_abbr: direction_abbr, +}; +export default address; diff --git a/src/locales/en/address/postcode.js b/src/locales/en/address/postcode.js deleted file mode 100644 index 20f39b2cbaf..00000000000 --- a/src/locales/en/address/postcode.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['#####', '#####-####']; diff --git a/src/locales/en/address/postcode.ts b/src/locales/en/address/postcode.ts new file mode 100644 index 00000000000..09b31011987 --- /dev/null +++ b/src/locales/en/address/postcode.ts @@ -0,0 +1 @@ +export const postcode: string[] = ['#####', '#####-####']; diff --git a/src/locales/en/address/postcode_by_state.js b/src/locales/en/address/postcode_by_state.js deleted file mode 100644 index 20f39b2cbaf..00000000000 --- a/src/locales/en/address/postcode_by_state.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['#####', '#####-####']; diff --git a/src/locales/en/address/postcode_by_state.ts b/src/locales/en/address/postcode_by_state.ts new file mode 100644 index 00000000000..53669b59fe9 --- /dev/null +++ b/src/locales/en/address/postcode_by_state.ts @@ -0,0 +1 @@ +export const postcode_by_state: string[] = ['#####', '#####-####']; diff --git a/src/locales/en/address/secondary_address.js b/src/locales/en/address/secondary_address.js deleted file mode 100644 index 5e8a3695d1b..00000000000 --- a/src/locales/en/address/secondary_address.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['Apt. ###', 'Suite ###']; diff --git a/src/locales/en/address/secondary_address.ts b/src/locales/en/address/secondary_address.ts new file mode 100644 index 00000000000..e771389f106 --- /dev/null +++ b/src/locales/en/address/secondary_address.ts @@ -0,0 +1 @@ +export const secondary_address: string[] = ['Apt. ###', 'Suite ###']; diff --git a/src/locales/en/address/state.js b/src/locales/en/address/state.ts similarity index 95% rename from src/locales/en/address/state.js rename to src/locales/en/address/state.ts index b22c984a0d3..e8573b31ad8 100644 --- a/src/locales/en/address/state.js +++ b/src/locales/en/address/state.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const state: string[] = [ 'Alabama', 'Alaska', 'Arizona', diff --git a/src/locales/en/address/state_abbr.js b/src/locales/en/address/state_abbr.ts similarity index 91% rename from src/locales/en/address/state_abbr.js rename to src/locales/en/address/state_abbr.ts index 156f9afd733..808f843f431 100644 --- a/src/locales/en/address/state_abbr.js +++ b/src/locales/en/address/state_abbr.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const state_abbr: string[] = [ 'AL', 'AK', 'AZ', diff --git a/src/locales/en/address/street_address.js b/src/locales/en/address/street_address.js deleted file mode 100644 index a8330fb95e1..00000000000 --- a/src/locales/en/address/street_address.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['#{building_number} #{street_name}']; diff --git a/src/locales/en/address/street_address.ts b/src/locales/en/address/street_address.ts new file mode 100644 index 00000000000..be6db420ba4 --- /dev/null +++ b/src/locales/en/address/street_address.ts @@ -0,0 +1 @@ +export const street_name: string[] = ['#{building_number} #{street_name}']; diff --git a/src/locales/en/address/street_name.js b/src/locales/en/address/street_name.ts similarity index 68% rename from src/locales/en/address/street_name.js rename to src/locales/en/address/street_name.ts index 62c7b1bf1c3..e11031a1857 100644 --- a/src/locales/en/address/street_name.js +++ b/src/locales/en/address/street_name.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const street_name: string[] = [ '#{Name.first_name} #{street_suffix}', '#{Name.last_name} #{street_suffix}', ]; diff --git a/src/locales/en/address/street_suffix.js b/src/locales/en/address/street_suffix.ts similarity index 98% rename from src/locales/en/address/street_suffix.js rename to src/locales/en/address/street_suffix.ts index 59dbdf51a64..32f25df4a41 100644 --- a/src/locales/en/address/street_suffix.js +++ b/src/locales/en/address/street_suffix.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const street_suffix: string[] = [ 'Alley', 'Avenue', 'Branch', diff --git a/src/locales/en/address/time_zone.js b/src/locales/en/address/time_zone.ts similarity index 98% rename from src/locales/en/address/time_zone.js rename to src/locales/en/address/time_zone.ts index 2c206f1b5c5..84973360dcc 100644 --- a/src/locales/en/address/time_zone.js +++ b/src/locales/en/address/time_zone.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const time_zone: string[] = [ 'Pacific/Midway', 'Pacific/Pago_Pago', 'Pacific/Honolulu', diff --git a/src/locales/en/animal/bear.js b/src/locales/en/animal/bear.ts similarity index 82% rename from src/locales/en/animal/bear.js rename to src/locales/en/animal/bear.ts index 93daa8e25c7..0004221ffd2 100644 --- a/src/locales/en/animal/bear.js +++ b/src/locales/en/animal/bear.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const bear: string[] = [ 'Giant panda', 'Spectacled bear', 'Sun bear', diff --git a/src/locales/en/animal/bird.js b/src/locales/en/animal/bird.ts similarity index 99% rename from src/locales/en/animal/bird.js rename to src/locales/en/animal/bird.ts index 128ee3ebc87..86435eb49c3 100644 --- a/src/locales/en/animal/bird.js +++ b/src/locales/en/animal/bird.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const bird: string[] = [ 'Red-throated Loon', 'Arctic Loon', 'Pacific Loon', diff --git a/src/locales/en/animal/cat.js b/src/locales/en/animal/cat.ts similarity index 96% rename from src/locales/en/animal/cat.js rename to src/locales/en/animal/cat.ts index 475d3ade57b..5a3698ae633 100644 --- a/src/locales/en/animal/cat.js +++ b/src/locales/en/animal/cat.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const cat: string[] = [ 'Abyssinian', 'American Bobtail', 'American Curl', diff --git a/src/locales/en/animal/cetacean.js b/src/locales/en/animal/cetacean.ts similarity index 97% rename from src/locales/en/animal/cetacean.js rename to src/locales/en/animal/cetacean.ts index b67666af978..f21e4b393be 100644 --- a/src/locales/en/animal/cetacean.js +++ b/src/locales/en/animal/cetacean.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const cetacean: string[] = [ 'Blue Whale', 'Fin Whale', 'Sei Whale', diff --git a/src/locales/en/animal/cow.js b/src/locales/en/animal/cow.ts similarity index 99% rename from src/locales/en/animal/cow.js rename to src/locales/en/animal/cow.ts index ff1cd1da54c..476307369bd 100644 --- a/src/locales/en/animal/cow.js +++ b/src/locales/en/animal/cow.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const cow: string[] = [ 'Aberdeen Angus', 'Abergele', 'Abigar', diff --git a/src/locales/en/animal/crocodilia.js b/src/locales/en/animal/crocodilia.ts similarity index 80% rename from src/locales/en/animal/crocodilia.js rename to src/locales/en/animal/crocodilia.ts index fd7d228ee7c..ee7a1637fff 100644 --- a/src/locales/en/animal/crocodilia.js +++ b/src/locales/en/animal/crocodilia.ts @@ -1,18 +1,18 @@ -module['exports'] = [ +export const crocodilia: string[] = [ 'Alligator mississippiensis', 'Chinese Alligator', 'Black Caiman', 'Broad-snouted Caiman', 'Spectacled Caiman', 'Yacare Caiman', - 'Cuvier’s Dwarf Caiman', - 'Schneider’s Smooth-fronted Caiman', + `Cuvier's Dwarf Caiman`, + `Schneider's Smooth-fronted Caiman`, 'African Slender-snouted Crocodile', 'American Crocodile', 'Australian Freshwater Crocodile', 'Cuban Crocodile', 'Dwarf Crocodile', - 'Morelet’s Crocodile', + `Morelet's Crocodile`, 'Mugger Crocodile', 'New Guinea Freshwater Crocodile', 'Nile Crocodile', diff --git a/src/locales/en/animal/dog.js b/src/locales/en/animal/dog.ts similarity index 99% rename from src/locales/en/animal/dog.js rename to src/locales/en/animal/dog.ts index 6eb5ceee5a0..a632549e702 100644 --- a/src/locales/en/animal/dog.js +++ b/src/locales/en/animal/dog.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const dog: string[] = [ 'Affenpinscher', 'Afghan Hound', 'Aidi', diff --git a/src/locales/en/animal/fish.js b/src/locales/en/animal/fish.ts similarity index 98% rename from src/locales/en/animal/fish.js rename to src/locales/en/animal/fish.ts index fae3c6856c3..72a281d1014 100644 --- a/src/locales/en/animal/fish.js +++ b/src/locales/en/animal/fish.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const fish: string[] = [ 'Grass carp', 'Peruvian anchoveta', 'Silver carp', diff --git a/src/locales/en/animal/horse.js b/src/locales/en/animal/horse.ts similarity index 99% rename from src/locales/en/animal/horse.js rename to src/locales/en/animal/horse.ts index a9a05b1c1c4..801cb6f8f18 100644 --- a/src/locales/en/animal/horse.js +++ b/src/locales/en/animal/horse.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const horse: string[] = [ 'American Albino', 'Abaco Barb', 'Abtenauer', diff --git a/src/locales/en/animal/index.js b/src/locales/en/animal/index.js deleted file mode 100644 index 4e2871bf974..00000000000 --- a/src/locales/en/animal/index.js +++ /dev/null @@ -1,16 +0,0 @@ -var animal = {}; -module['exports'] = animal; -animal.dog = require('./dog'); -animal.cat = require('./cat'); -animal.snake = require('./snake'); -animal.horse = require('./horse'); -animal.cetacean = require('./cetacean'); -animal.rabbit = require('./rabbit'); -animal.insect = require('./insect'); -animal.bear = require('./bear'); -animal.lion = require('./lion'); -animal.cow = require('./cow'); -animal.bird = require('./bird'); -animal.fish = require('./fish'); -animal.crocodilia = require('./crocodilia'); -animal.type = require('./type'); diff --git a/src/locales/en/animal/index.ts b/src/locales/en/animal/index.ts new file mode 100644 index 00000000000..5ab32231c89 --- /dev/null +++ b/src/locales/en/animal/index.ts @@ -0,0 +1,31 @@ +import { type } from './type'; +import { bear } from './bear'; +import { bird } from './bird'; +import { cat } from './cat'; +import { cetacean } from './cetacean'; +import { cow } from './cow'; +import { crocodilia } from './crocodilia'; +import { dog } from './dog'; +import { fish } from './fish'; +import { horse } from './horse'; +import { insect } from './insect'; +import { lion } from './lion'; +import { rabbit } from './rabbit'; +import { snake } from './snake'; + +export const animal = { + dog: dog, + cat: cat, + snake: snake, + horse: horse, + cetacean: cetacean, + rabbit: rabbit, + insect: insect, + bear: bear, + lion: lion, + cow: cow, + bird: bird, + fish: fish, + crocodilia: crocodilia, + type: type, +}; diff --git a/src/locales/en/animal/insect.js b/src/locales/en/animal/insect.ts similarity index 98% rename from src/locales/en/animal/insect.js rename to src/locales/en/animal/insect.ts index bc05500d2b5..573157568e3 100644 --- a/src/locales/en/animal/insect.js +++ b/src/locales/en/animal/insect.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const insect: string[] = [ 'Acacia-ants', 'Acorn-plum gall', 'Aerial yellowjacket', diff --git a/src/locales/en/animal/lion.js b/src/locales/en/animal/lion.ts similarity index 81% rename from src/locales/en/animal/lion.js rename to src/locales/en/animal/lion.ts index be7b252da7c..7019867ba34 100644 --- a/src/locales/en/animal/lion.js +++ b/src/locales/en/animal/lion.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const lion: string[] = [ 'Asiatic Lion', 'Barbary Lion', 'West African Lion', diff --git a/src/locales/en/animal/rabbit.js b/src/locales/en/animal/rabbit.ts similarity index 90% rename from src/locales/en/animal/rabbit.js rename to src/locales/en/animal/rabbit.ts index 35a25fd8ff5..445f8b8acf0 100644 --- a/src/locales/en/animal/rabbit.js +++ b/src/locales/en/animal/rabbit.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const rabbit: string[] = [ 'American', 'American Chinchilla', 'American Fuzzy Lop', @@ -9,10 +9,10 @@ module['exports'] = [ 'Blanc de Hotot', 'Britannia Petite', 'Californian', - 'Champagne D’Argent', + `Champagne D'Argent`, 'Checkered Giant', 'Cinnamon', - 'Crème D’Argent', + `Crème D'Argent`, 'Dutch', 'Dwarf Hotot', 'English Angora', diff --git a/src/locales/en/animal/snake.js b/src/locales/en/animal/snake.ts similarity index 99% rename from src/locales/en/animal/snake.js rename to src/locales/en/animal/snake.ts index 74807a5130e..bab2e9daab8 100644 --- a/src/locales/en/animal/snake.js +++ b/src/locales/en/animal/snake.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const snake: string[] = [ 'Viper Adder', 'Common adder', 'Death Adder', diff --git a/src/locales/en/animal/type.js b/src/locales/en/animal/type.ts similarity index 82% rename from src/locales/en/animal/type.js rename to src/locales/en/animal/type.ts index 65fba46a689..8145041925f 100644 --- a/src/locales/en/animal/type.js +++ b/src/locales/en/animal/type.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const type: string[] = [ 'dog', 'cat', 'snake', diff --git a/src/locales/en/app/author.js b/src/locales/en/app/author.js deleted file mode 100644 index 78e1c460dc7..00000000000 --- a/src/locales/en/app/author.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['#{Name.name}', '#{Company.name}']; diff --git a/src/locales/en/app/author.ts b/src/locales/en/app/author.ts new file mode 100644 index 00000000000..47b12aad22f --- /dev/null +++ b/src/locales/en/app/author.ts @@ -0,0 +1 @@ +export const author: string[] = ['#{Name.name}', '#{Company.name}']; diff --git a/src/locales/en/app/index.js b/src/locales/en/app/index.js deleted file mode 100644 index 7a421c9400e..00000000000 --- a/src/locales/en/app/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var app = {}; -module['exports'] = app; -app.name = require('./name'); -app.version = require('./version'); -app.author = require('./author'); diff --git a/src/locales/en/app/index.ts b/src/locales/en/app/index.ts new file mode 100644 index 00000000000..4570030be04 --- /dev/null +++ b/src/locales/en/app/index.ts @@ -0,0 +1,9 @@ +import { author } from './author'; +import { name } from './name'; +import { version } from './version'; + +export const app = { + name: name, + version: version, + author: author, +}; diff --git a/src/locales/en/app/name.js b/src/locales/en/app/name.ts similarity index 96% rename from src/locales/en/app/name.js rename to src/locales/en/app/name.ts index faec9b8c6b9..2da60cb82e0 100644 --- a/src/locales/en/app/name.js +++ b/src/locales/en/app/name.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const name: string[] = [ 'Redhold', 'Treeflex', 'Trippledex', diff --git a/src/locales/en/app/version.js b/src/locales/en/app/version.js deleted file mode 100644 index 15a81dc705e..00000000000 --- a/src/locales/en/app/version.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['0.#.#', '0.##', '#.##', '#.#', '#.#.#']; diff --git a/src/locales/en/app/version.ts b/src/locales/en/app/version.ts new file mode 100644 index 00000000000..0eb8e4c6480 --- /dev/null +++ b/src/locales/en/app/version.ts @@ -0,0 +1 @@ +export const version: string[] = ['0.#.#', '0.##', '#.##', '#.#', '#.#.#']; diff --git a/src/locales/en/business/credit_card_expiry_dates.js b/src/locales/en/business/credit_card_expiry_dates.js deleted file mode 100644 index 95694189423..00000000000 --- a/src/locales/en/business/credit_card_expiry_dates.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['2011-10-12', '2012-11-12', '2015-11-11', '2013-9-12']; diff --git a/src/locales/en/business/credit_card_expiry_dates.ts b/src/locales/en/business/credit_card_expiry_dates.ts new file mode 100644 index 00000000000..a79d8da0626 --- /dev/null +++ b/src/locales/en/business/credit_card_expiry_dates.ts @@ -0,0 +1,6 @@ +export const credit_card_expiry_dates: string[] = [ + '2011-10-12', + '2012-11-12', + '2015-11-11', + '2013-9-12', +]; diff --git a/src/locales/en/business/credit_card_numbers.js b/src/locales/en/business/credit_card_numbers.ts similarity index 68% rename from src/locales/en/business/credit_card_numbers.js rename to src/locales/en/business/credit_card_numbers.ts index 8438621e9ff..6e9fd017d0e 100644 --- a/src/locales/en/business/credit_card_numbers.js +++ b/src/locales/en/business/credit_card_numbers.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const credit_card_numbers: string[] = [ '1234-2121-1221-1211', '1212-1221-1121-1234', '1211-1221-1234-2201', diff --git a/src/locales/en/business/credit_card_types.js b/src/locales/en/business/credit_card_types.js deleted file mode 100644 index e54e21a6338..00000000000 --- a/src/locales/en/business/credit_card_types.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['visa', 'mastercard', 'americanexpress', 'discover']; diff --git a/src/locales/en/business/credit_card_types.ts b/src/locales/en/business/credit_card_types.ts new file mode 100644 index 00000000000..0f654af64ae --- /dev/null +++ b/src/locales/en/business/credit_card_types.ts @@ -0,0 +1,6 @@ +export const credit_card_types: string[] = [ + 'visa', + 'mastercard', + 'americanexpress', + 'discover', +]; diff --git a/src/locales/en/business/index.js b/src/locales/en/business/index.js deleted file mode 100644 index 4023f6b7a3a..00000000000 --- a/src/locales/en/business/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var business = {}; -module['exports'] = business; -business.credit_card_numbers = require('./credit_card_numbers'); -business.credit_card_expiry_dates = require('./credit_card_expiry_dates'); -business.credit_card_types = require('./credit_card_types'); diff --git a/src/locales/en/business/index.ts b/src/locales/en/business/index.ts new file mode 100644 index 00000000000..f6c7e465f92 --- /dev/null +++ b/src/locales/en/business/index.ts @@ -0,0 +1,9 @@ +import { credit_card_expiry_dates } from './credit_card_expiry_dates'; +import { credit_card_numbers } from './credit_card_numbers'; +import { credit_card_types } from './credit_card_types'; + +export const business = { + credit_card_numbers: credit_card_numbers, + credit_card_expiry_dates: credit_card_expiry_dates, + credit_card_types: credit_card_types, +}; diff --git a/src/locales/en/cell_phone/formats.js b/src/locales/en/cell_phone/formats.ts similarity index 69% rename from src/locales/en/cell_phone/formats.js rename to src/locales/en/cell_phone/formats.ts index ae2ba778b9b..0166b2f9765 100644 --- a/src/locales/en/cell_phone/formats.js +++ b/src/locales/en/cell_phone/formats.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const formats: string[] = [ '###-###-####', '(###) ###-####', '1-###-###-####', diff --git a/src/locales/en/cell_phone/index.js b/src/locales/en/cell_phone/index.js deleted file mode 100644 index c3ee77a16e6..00000000000 --- a/src/locales/en/cell_phone/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var cell_phone = {}; -module['exports'] = cell_phone; -cell_phone.formats = require('./formats'); diff --git a/src/locales/en/cell_phone/index.ts b/src/locales/en/cell_phone/index.ts new file mode 100644 index 00000000000..d4b8faf23c1 --- /dev/null +++ b/src/locales/en/cell_phone/index.ts @@ -0,0 +1,5 @@ +import { formats } from './formats'; + +export const cell_phone = { + formats: formats, +}; diff --git a/src/locales/en/commerce/color.js b/src/locales/en/commerce/color.ts similarity index 91% rename from src/locales/en/commerce/color.js rename to src/locales/en/commerce/color.ts index 5e4e7a88999..06989cb2980 100644 --- a/src/locales/en/commerce/color.js +++ b/src/locales/en/commerce/color.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const color: string[] = [ 'red', 'green', 'blue', diff --git a/src/locales/en/commerce/department.js b/src/locales/en/commerce/department.ts similarity index 87% rename from src/locales/en/commerce/department.js rename to src/locales/en/commerce/department.ts index 569d762ae8c..e207769d679 100644 --- a/src/locales/en/commerce/department.js +++ b/src/locales/en/commerce/department.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const department: string[] = [ 'Books', 'Movies', 'Music', diff --git a/src/locales/en/commerce/index.js b/src/locales/en/commerce/index.js deleted file mode 100644 index 7a555e8fdbb..00000000000 --- a/src/locales/en/commerce/index.js +++ /dev/null @@ -1,6 +0,0 @@ -var commerce = {}; -module['exports'] = commerce; -commerce.color = require('./color'); -commerce.department = require('./department'); -commerce.product_name = require('./product_name'); -commerce.product_description = require('./product_description'); diff --git a/src/locales/en/commerce/index.ts b/src/locales/en/commerce/index.ts new file mode 100644 index 00000000000..ed347fc7719 --- /dev/null +++ b/src/locales/en/commerce/index.ts @@ -0,0 +1,11 @@ +import { color } from './color'; +import { department } from './department'; +import { product_description } from './product_description'; +import { product_name } from './product_name'; + +export const commerce = { + color: color, + department: department, + product_name: product_name, + product_description: product_description, +}; diff --git a/src/locales/en/commerce/product_description.js b/src/locales/en/commerce/product_description.ts similarity index 96% rename from src/locales/en/commerce/product_description.js rename to src/locales/en/commerce/product_description.ts index ebda4bf2001..993ea6e8dab 100644 --- a/src/locales/en/commerce/product_description.js +++ b/src/locales/en/commerce/product_description.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const product_description: string[] = [ 'Ergonomic executive chair upholstered in bonded black leather and PVC padded seat and back for all-day comfort and support', 'The automobile layout consists of a front-engine design, with transaxle-type transmissions mounted at the rear of the engine and four wheel drive', 'New ABC 13 9370, 13.3, 5th Gen CoreA5-8250U, 8GB RAM, 256GB SSD, power UHD Graphics, OS 10 Home, OS Office A & J 2016', diff --git a/src/locales/en/commerce/product_name.js b/src/locales/en/commerce/product_name.ts similarity index 86% rename from src/locales/en/commerce/product_name.js rename to src/locales/en/commerce/product_name.ts index b48ede91a93..f392a3e4d8b 100644 --- a/src/locales/en/commerce/product_name.js +++ b/src/locales/en/commerce/product_name.ts @@ -1,4 +1,8 @@ -module['exports'] = { +export interface ProductNameDefinition { + [index: string]: string[]; +} + +export const product_name: ProductNameDefinition = { adjective: [ 'Small', 'Ergonomic', diff --git a/src/locales/en/company/adjective.js b/src/locales/en/company/adjective.ts similarity index 97% rename from src/locales/en/company/adjective.js rename to src/locales/en/company/adjective.ts index 92373ae4054..408c024b7e8 100644 --- a/src/locales/en/company/adjective.js +++ b/src/locales/en/company/adjective.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const adjectivet: string[] = [ 'Adaptive', 'Advanced', 'Ameliorated', diff --git a/src/locales/en/company/bs_adjective.js b/src/locales/en/company/bs_adjective.ts similarity index 96% rename from src/locales/en/company/bs_adjective.js rename to src/locales/en/company/bs_adjective.ts index ecafb3d541c..5e3484ccc42 100644 --- a/src/locales/en/company/bs_adjective.js +++ b/src/locales/en/company/bs_adjective.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const bs_adjective: string[] = [ 'clicks-and-mortar', 'value-added', 'vertical', diff --git a/src/locales/en/company/bs_noun.js b/src/locales/en/company/bs_noun.ts similarity index 95% rename from src/locales/en/company/bs_noun.js rename to src/locales/en/company/bs_noun.ts index 8896bfda9a8..0dea592ed57 100644 --- a/src/locales/en/company/bs_noun.js +++ b/src/locales/en/company/bs_noun.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const bs_noun: string[] = [ 'synergies', 'web-readiness', 'paradigms', diff --git a/src/locales/en/company/bs_verb.js b/src/locales/en/company/bs_verb.ts similarity index 96% rename from src/locales/en/company/bs_verb.js rename to src/locales/en/company/bs_verb.ts index 53145447406..1850a00c30c 100644 --- a/src/locales/en/company/bs_verb.js +++ b/src/locales/en/company/bs_verb.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const bs_verb: string[] = [ 'implement', 'utilize', 'integrate', diff --git a/src/locales/en/company/descriptor.js b/src/locales/en/company/descriptor.ts similarity index 97% rename from src/locales/en/company/descriptor.js rename to src/locales/en/company/descriptor.ts index 762875dbc12..fda3da85094 100644 --- a/src/locales/en/company/descriptor.js +++ b/src/locales/en/company/descriptor.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const descriptor: string[] = [ '24 hour', '24/7', '3rd generation', diff --git a/src/locales/en/company/index.js b/src/locales/en/company/index.js deleted file mode 100644 index b7696c30115..00000000000 --- a/src/locales/en/company/index.js +++ /dev/null @@ -1,10 +0,0 @@ -var company = {}; -module['exports'] = company; -company.suffix = require('./suffix'); -company.adjective = require('./adjective'); -company.descriptor = require('./descriptor'); -company.noun = require('./noun'); -company.bs_verb = require('./bs_verb'); -company.bs_adjective = require('./bs_adjective'); -company.bs_noun = require('./bs_noun'); -company.name = require('./name'); diff --git a/src/locales/en/company/index.ts b/src/locales/en/company/index.ts new file mode 100644 index 00000000000..6c709fe6dd6 --- /dev/null +++ b/src/locales/en/company/index.ts @@ -0,0 +1,19 @@ +import { adjective } from '../word/adjective'; +import { bs_adjective } from './bs_adjective'; +import { bs_noun } from './bs_noun'; +import { bs_verb } from './bs_verb'; +import { descriptor } from './descriptor'; +import { name } from './name'; +import { noun } from './noun'; +import { suffix } from './suffix'; + +export const company = { + suffix: suffix, + adjective: adjective, + descriptor: descriptor, + noun: noun, + bs_verb: bs_verb, + bs_adjective: bs_adjective, + bs_noun: bs_noun, + name: name, +}; diff --git a/src/locales/en/company/name.js b/src/locales/en/company/name.ts similarity index 81% rename from src/locales/en/company/name.js rename to src/locales/en/company/name.ts index 17b6db48ff6..aec3463b113 100644 --- a/src/locales/en/company/name.js +++ b/src/locales/en/company/name.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const name: string[] = [ '#{Name.last_name} #{suffix}', '#{Name.last_name}-#{Name.last_name}', '#{Name.last_name}, #{Name.last_name} and #{Name.last_name}', diff --git a/src/locales/en/company/noun.js b/src/locales/en/company/noun.ts similarity index 98% rename from src/locales/en/company/noun.js rename to src/locales/en/company/noun.ts index 7a37069108d..e675f9ce1b9 100644 --- a/src/locales/en/company/noun.js +++ b/src/locales/en/company/noun.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const noun: string[] = [ 'ability', 'access', 'adapter', diff --git a/src/locales/en/company/suffix.js b/src/locales/en/company/suffix.js deleted file mode 100644 index 034c8be6150..00000000000 --- a/src/locales/en/company/suffix.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['Inc', 'and Sons', 'LLC', 'Group']; diff --git a/src/locales/en/company/suffix.ts b/src/locales/en/company/suffix.ts new file mode 100644 index 00000000000..fd11635ebbd --- /dev/null +++ b/src/locales/en/company/suffix.ts @@ -0,0 +1 @@ +export const suffix: string[] = ['Inc', 'and Sons', 'LLC', 'Group']; diff --git a/src/locales/en/database/collation.js b/src/locales/en/database/collation.ts similarity index 78% rename from src/locales/en/database/collation.js rename to src/locales/en/database/collation.ts index 7c34da999e9..59b239e77e8 100644 --- a/src/locales/en/database/collation.js +++ b/src/locales/en/database/collation.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const collation: string[] = [ 'utf8_unicode_ci', 'utf8_general_ci', 'utf8_bin', diff --git a/src/locales/en/database/column.js b/src/locales/en/database/column.ts similarity index 83% rename from src/locales/en/database/column.js rename to src/locales/en/database/column.ts index 2670a286c5c..a91bbca0c30 100644 --- a/src/locales/en/database/column.js +++ b/src/locales/en/database/column.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const column: string[] = [ 'id', 'title', 'name', diff --git a/src/locales/en/database/engine.js b/src/locales/en/database/engine.ts similarity index 69% rename from src/locales/en/database/engine.js rename to src/locales/en/database/engine.ts index 14f99e5ecd0..0316adb1834 100644 --- a/src/locales/en/database/engine.js +++ b/src/locales/en/database/engine.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const engine: string[] = [ 'InnoDB', 'MyISAM', 'MEMORY', diff --git a/src/locales/en/database/index.js b/src/locales/en/database/index.js deleted file mode 100644 index d2e334c7a6d..00000000000 --- a/src/locales/en/database/index.js +++ /dev/null @@ -1,6 +0,0 @@ -var database = {}; -module['exports'] = database; -database.collation = require('./collation'); -database.column = require('./column'); -database.engine = require('./engine'); -database.type = require('./type'); diff --git a/src/locales/en/database/index.ts b/src/locales/en/database/index.ts new file mode 100644 index 00000000000..69f064205b1 --- /dev/null +++ b/src/locales/en/database/index.ts @@ -0,0 +1,11 @@ +import { collation } from './collation'; +import { column } from './column'; +import { engine } from './engine'; +import { type } from './type'; + +export const database = { + collation: collation, + column: column, + engine: engine, + type: type, +}; diff --git a/src/locales/en/database/type.js b/src/locales/en/database/type.ts similarity index 89% rename from src/locales/en/database/type.js rename to src/locales/en/database/type.ts index 89fd758678e..1e7f9c9c1c1 100644 --- a/src/locales/en/database/type.js +++ b/src/locales/en/database/type.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const type: string[] = [ 'int', 'varchar', 'text', diff --git a/src/locales/en/date/index.js b/src/locales/en/date/index.js deleted file mode 100644 index 9e3d9c6bfef..00000000000 --- a/src/locales/en/date/index.js +++ /dev/null @@ -1,4 +0,0 @@ -var date = {}; -module['exports'] = date; -date.month = require('./month'); -date.weekday = require('./weekday'); diff --git a/src/locales/en/date/index.ts b/src/locales/en/date/index.ts new file mode 100644 index 00000000000..54d5618a26c --- /dev/null +++ b/src/locales/en/date/index.ts @@ -0,0 +1,7 @@ +import { month } from './month'; +import { weekdays } from './weekday'; + +export const date = { + month: month, + weekdays: weekdays, +}; diff --git a/src/locales/en/date/month.js b/src/locales/en/date/month.ts similarity index 91% rename from src/locales/en/date/month.js rename to src/locales/en/date/month.ts index 2db9973de32..66f6f2cc061 100644 --- a/src/locales/en/date/month.js +++ b/src/locales/en/date/month.ts @@ -1,5 +1,9 @@ +export interface MonthsDefinition { + [index: string]: string[]; +} + // Source: http://unicode.org/cldr/trac/browser/tags/release-27/common/main/en.xml#L1799 -module['exports'] = { +export const month: MonthsDefinition = { wide: [ 'January', 'February', diff --git a/src/locales/en/date/weekday.js b/src/locales/en/date/weekday.ts similarity index 88% rename from src/locales/en/date/weekday.js rename to src/locales/en/date/weekday.ts index e9f4cda5ef7..36a1e54d305 100644 --- a/src/locales/en/date/weekday.js +++ b/src/locales/en/date/weekday.ts @@ -1,5 +1,9 @@ +export interface WeeksDefinition { + [index: string]: string[]; +} + // Source: http://unicode.org/cldr/trac/browser/tags/release-27/common/main/en.xml#L1847 -module['exports'] = { +export const weekdays: WeeksDefinition = { wide: [ 'Sunday', 'Monday', diff --git a/src/locales/en/finance/account_type.js b/src/locales/en/finance/account_type.ts similarity index 76% rename from src/locales/en/finance/account_type.js rename to src/locales/en/finance/account_type.ts index 8bff8d61081..5352a5a3239 100644 --- a/src/locales/en/finance/account_type.js +++ b/src/locales/en/finance/account_type.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const account_type: string[] = [ 'Checking', 'Savings', 'Money Market', diff --git a/src/locales/en/finance/credit_card/american_express.js b/src/locales/en/finance/credit_card/american_express.js deleted file mode 100644 index ffe918fe61d..00000000000 --- a/src/locales/en/finance/credit_card/american_express.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['34##-######-####L', '37##-######-####L']; diff --git a/src/locales/en/finance/credit_card/american_express.ts b/src/locales/en/finance/credit_card/american_express.ts new file mode 100644 index 00000000000..67039113be9 --- /dev/null +++ b/src/locales/en/finance/credit_card/american_express.ts @@ -0,0 +1,4 @@ +export const american_express: string[] = [ + '34##-######-####L', + '37##-######-####L', +]; diff --git a/src/locales/en/finance/credit_card/diners_club.js b/src/locales/en/finance/credit_card/diners_club.ts similarity index 66% rename from src/locales/en/finance/credit_card/diners_club.js rename to src/locales/en/finance/credit_card/diners_club.ts index a8cb61f4d64..d328e45def8 100644 --- a/src/locales/en/finance/credit_card/diners_club.js +++ b/src/locales/en/finance/credit_card/diners_club.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const diners_club: string[] = [ '30[0-5]#-######-###L', '36##-######-###L', '54##-####-####-###L', diff --git a/src/locales/en/finance/credit_card/discover.js b/src/locales/en/finance/credit_card/discover.ts similarity index 83% rename from src/locales/en/finance/credit_card/discover.js rename to src/locales/en/finance/credit_card/discover.ts index 5603158a5a5..34ba4ab6506 100644 --- a/src/locales/en/finance/credit_card/discover.js +++ b/src/locales/en/finance/credit_card/discover.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const discover: string[] = [ '6011-####-####-###L', '65##-####-####-###L', '64[4-9]#-####-####-###L', diff --git a/src/locales/en/finance/credit_card/index.js b/src/locales/en/finance/credit_card/index.js deleted file mode 100644 index 4d018fcff92..00000000000 --- a/src/locales/en/finance/credit_card/index.js +++ /dev/null @@ -1,13 +0,0 @@ -var credit_card = {}; -module['exports'] = credit_card; -credit_card.visa = require('./visa'); -credit_card.mastercard = require('./mastercard'); -credit_card.discover = require('./discover'); -credit_card.american_express = require('./american_express'); -credit_card.diners_club = require('./diners_club'); -credit_card.jcb = require('./jcb'); -credit_card.switch = require('./switch'); -credit_card.solo = require('./solo'); -credit_card.maestro = require('./maestro'); -credit_card.laser = require('./laser'); -credit_card.instapayment = require('./instapayment.js'); diff --git a/src/locales/en/finance/credit_card/index.ts b/src/locales/en/finance/credit_card/index.ts new file mode 100644 index 00000000000..ba8b468dfa9 --- /dev/null +++ b/src/locales/en/finance/credit_card/index.ts @@ -0,0 +1,29 @@ +import { american_express } from './american_express'; +import { diners_club } from './diners_club'; +import { discover } from './discover'; +import { instapayment } from './instapayment'; +import { jcb } from './jcb'; +import { laser } from './laser'; +import { maestro } from './maestro'; +import { mastercard } from './mastercard'; +import { solo } from './solo'; +import { Switch } from './switch'; +import { visa } from './visa'; + +export interface CreditCardDefinition { + [index: string]: any; +} + +export const credit_card: CreditCardDefinition = { + visa: visa, + mastercard: mastercard, + discover: discover, + american_express: american_express, + diners_club: diners_club, + jcb: jcb, + switch: Switch, + solo: solo, + maestro: maestro, + laser: laser, + instapayment: instapayment, +}; diff --git a/src/locales/en/finance/credit_card/instapayment.js b/src/locales/en/finance/credit_card/instapayment.js deleted file mode 100644 index 666f774ce0b..00000000000 --- a/src/locales/en/finance/credit_card/instapayment.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['63[7-9]#-####-####-###L']; diff --git a/src/locales/en/finance/credit_card/instapayment.ts b/src/locales/en/finance/credit_card/instapayment.ts new file mode 100644 index 00000000000..29f74a54310 --- /dev/null +++ b/src/locales/en/finance/credit_card/instapayment.ts @@ -0,0 +1 @@ +export const instapayment: string[] = ['63[7-9]#-####-####-###L']; diff --git a/src/locales/en/finance/credit_card/jcb.js b/src/locales/en/finance/credit_card/jcb.ts similarity index 72% rename from src/locales/en/finance/credit_card/jcb.js rename to src/locales/en/finance/credit_card/jcb.ts index 25f710e86d7..b7e405985c5 100644 --- a/src/locales/en/finance/credit_card/jcb.js +++ b/src/locales/en/finance/credit_card/jcb.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const jcb: string[] = [ '3528-####-####-###L', '3529-####-####-###L', '35[3-8]#-####-####-###L', diff --git a/src/locales/en/finance/credit_card/laser.js b/src/locales/en/finance/credit_card/laser.ts similarity index 85% rename from src/locales/en/finance/credit_card/laser.js rename to src/locales/en/finance/credit_card/laser.ts index d59f198c489..fd1b5878b52 100644 --- a/src/locales/en/finance/credit_card/laser.js +++ b/src/locales/en/finance/credit_card/laser.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const laser: string[] = [ '6304###########L', '6706###########L', '6771###########L', diff --git a/src/locales/en/finance/credit_card/maestro.js b/src/locales/en/finance/credit_card/maestro.ts similarity index 90% rename from src/locales/en/finance/credit_card/maestro.js rename to src/locales/en/finance/credit_card/maestro.ts index 70908b1d5f2..c514559f92f 100644 --- a/src/locales/en/finance/credit_card/maestro.js +++ b/src/locales/en/finance/credit_card/maestro.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const maestro: string[] = [ '5018-#{4}-#{4}-#{3}L', '5020-#{4}-#{4}-#{3}L', '5038-#{4}-#{4}-#{3}L', diff --git a/src/locales/en/finance/credit_card/mastercard.js b/src/locales/en/finance/credit_card/mastercard.js deleted file mode 100644 index a9b56643ccd..00000000000 --- a/src/locales/en/finance/credit_card/mastercard.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['5[1-5]##-####-####-###L', '6771-89##-####-###L']; diff --git a/src/locales/en/finance/credit_card/mastercard.ts b/src/locales/en/finance/credit_card/mastercard.ts new file mode 100644 index 00000000000..fc9fd7ac26b --- /dev/null +++ b/src/locales/en/finance/credit_card/mastercard.ts @@ -0,0 +1,4 @@ +export const mastercard: string[] = [ + '5[1-5]##-####-####-###L', + '6771-89##-####-###L', +]; diff --git a/src/locales/en/finance/credit_card/solo.js b/src/locales/en/finance/credit_card/solo.ts similarity index 72% rename from src/locales/en/finance/credit_card/solo.js rename to src/locales/en/finance/credit_card/solo.ts index ec49546cc27..ce89c84820b 100644 --- a/src/locales/en/finance/credit_card/solo.js +++ b/src/locales/en/finance/credit_card/solo.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const solo: string[] = [ '6767-####-####-###L', '6767-####-####-####-#L', '6767-####-####-####-##L', diff --git a/src/locales/en/finance/credit_card/switch.js b/src/locales/en/finance/credit_card/switch.ts similarity index 71% rename from src/locales/en/finance/credit_card/switch.js rename to src/locales/en/finance/credit_card/switch.ts index e55df7b29dc..769af13e985 100644 --- a/src/locales/en/finance/credit_card/switch.js +++ b/src/locales/en/finance/credit_card/switch.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const Switch: string[] = [ '6759-####-####-###L', '6759-####-####-####-#L', '6759-####-####-####-##L', diff --git a/src/locales/en/finance/credit_card/visa.js b/src/locales/en/finance/credit_card/visa.js deleted file mode 100644 index 47b55eb12b2..00000000000 --- a/src/locales/en/finance/credit_card/visa.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['4###########L', '4###-####-####-###L']; diff --git a/src/locales/en/finance/credit_card/visa.ts b/src/locales/en/finance/credit_card/visa.ts new file mode 100644 index 00000000000..8317c9aca20 --- /dev/null +++ b/src/locales/en/finance/credit_card/visa.ts @@ -0,0 +1 @@ +export const visa: string[] = ['4###########L', '4###-####-####-###L']; diff --git a/src/locales/en/finance/currency.js b/src/locales/en/finance/currency.ts similarity index 97% rename from src/locales/en/finance/currency.js rename to src/locales/en/finance/currency.ts index b1307180925..f1b4f0488dd 100644 --- a/src/locales/en/finance/currency.js +++ b/src/locales/en/finance/currency.ts @@ -1,4 +1,13 @@ -module['exports'] = { +export interface CurrencyDefinition { + [index: string]: CurrencyByCountryDefinition; +} + +export interface CurrencyByCountryDefinition { + code: string; + symbol: string; +} + +export const currency: CurrencyDefinition = { 'UAE Dirham': { code: 'AED', symbol: '', diff --git a/src/locales/en/finance/index.js b/src/locales/en/finance/index.js deleted file mode 100644 index 90e985e96b5..00000000000 --- a/src/locales/en/finance/index.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @type import('../../..').LocaleDefinition['finance'] - */ -var finance = {}; -module['exports'] = finance; -finance.account_type = require('./account_type'); -finance.transaction_type = require('./transaction_type'); -finance.currency = require('./currency'); -finance.credit_card = require('./credit_card'); diff --git a/src/locales/en/finance/index.ts b/src/locales/en/finance/index.ts new file mode 100644 index 00000000000..e4d2dd869bc --- /dev/null +++ b/src/locales/en/finance/index.ts @@ -0,0 +1,11 @@ +import { account_type } from './account_type'; +import { credit_card } from './credit_card'; +import { currency } from './currency'; +import { transaction_type } from './transaction_type'; + +export const finance = { + account_type: account_type, + transaction_type: transaction_type, + currency: currency, + credit_card: credit_card, +}; diff --git a/src/locales/en/finance/transaction_type.js b/src/locales/en/finance/transaction_type.js deleted file mode 100644 index d638c6b0f46..00000000000 --- a/src/locales/en/finance/transaction_type.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['deposit', 'withdrawal', 'payment', 'invoice']; diff --git a/src/locales/en/finance/transaction_type.ts b/src/locales/en/finance/transaction_type.ts new file mode 100644 index 00000000000..2e8b654ddf0 --- /dev/null +++ b/src/locales/en/finance/transaction_type.ts @@ -0,0 +1,6 @@ +export const transaction_type: string[] = [ + 'deposit', + 'withdrawal', + 'payment', + 'invoice', +]; diff --git a/src/locales/en/hacker/abbreviation.js b/src/locales/en/hacker/abbreviation.ts similarity index 86% rename from src/locales/en/hacker/abbreviation.js rename to src/locales/en/hacker/abbreviation.ts index 1b140d028df..da5049ae188 100644 --- a/src/locales/en/hacker/abbreviation.js +++ b/src/locales/en/hacker/abbreviation.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const abbreviation: string[] = [ 'TCP', 'HTTP', 'SDD', diff --git a/src/locales/en/hacker/adjective.js b/src/locales/en/hacker/adjective.ts similarity index 87% rename from src/locales/en/hacker/adjective.js rename to src/locales/en/hacker/adjective.ts index 267b7d7d118..3b279cec532 100644 --- a/src/locales/en/hacker/adjective.js +++ b/src/locales/en/hacker/adjective.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const adjective: string[] = [ 'auxiliary', 'primary', 'back-end', diff --git a/src/locales/en/hacker/index.js b/src/locales/en/hacker/index.js deleted file mode 100644 index da0ba4f134b..00000000000 --- a/src/locales/en/hacker/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var hacker = {}; -module['exports'] = hacker; -hacker.abbreviation = require('./abbreviation'); -hacker.adjective = require('./adjective'); -hacker.noun = require('./noun'); -hacker.verb = require('./verb'); -hacker.ingverb = require('./ingverb'); -hacker.phrase = require('./phrase'); diff --git a/src/locales/en/hacker/index.ts b/src/locales/en/hacker/index.ts new file mode 100644 index 00000000000..efa4924d3e6 --- /dev/null +++ b/src/locales/en/hacker/index.ts @@ -0,0 +1,15 @@ +import { abbreviation } from './abbreviation'; +import { adjective } from './adjective'; +import { ingverb } from './ingverb'; +import { noun } from './noun'; +import { phrase } from './phrase'; +import { verb } from './verb'; + +export const hacker = { + abbreviation: abbreviation, + adjective: adjective, + noun: noun, + verb: verb, + ingverb: ingverb, + phrase: phrase, +}; diff --git a/src/locales/en/hacker/ingverb.js b/src/locales/en/hacker/ingverb.ts similarity index 87% rename from src/locales/en/hacker/ingverb.js rename to src/locales/en/hacker/ingverb.ts index 2c24dc65801..5ec4bfdf9d4 100644 --- a/src/locales/en/hacker/ingverb.js +++ b/src/locales/en/hacker/ingverb.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const ingverb: string[] = [ 'backing up', 'bypassing', 'hacking', diff --git a/src/locales/en/hacker/noun.js b/src/locales/en/hacker/noun.ts similarity index 90% rename from src/locales/en/hacker/noun.js rename to src/locales/en/hacker/noun.ts index 1da198e9fb0..ceb496ec24d 100644 --- a/src/locales/en/hacker/noun.js +++ b/src/locales/en/hacker/noun.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const noun: string[] = [ 'driver', 'protocol', 'bandwidth', diff --git a/src/locales/en/hacker/phrase.js b/src/locales/en/hacker/phrase.ts similarity index 96% rename from src/locales/en/hacker/phrase.js rename to src/locales/en/hacker/phrase.ts index 92fbd149d7f..f03355a8437 100644 --- a/src/locales/en/hacker/phrase.js +++ b/src/locales/en/hacker/phrase.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const phrase: string[] = [ 'If we {{verb}} the {{noun}}, we can get to the {{abbreviation}} {{noun}} through the {{adjective}} {{abbreviation}} {{noun}}!', 'We need to {{verb}} the {{adjective}} {{abbreviation}} {{noun}}!', 'Try to {{verb}} the {{abbreviation}} {{noun}}, maybe it will {{verb}} the {{adjective}} {{noun}}!', diff --git a/src/locales/en/hacker/verb.js b/src/locales/en/hacker/verb.ts similarity index 87% rename from src/locales/en/hacker/verb.js rename to src/locales/en/hacker/verb.ts index 6d066575bd9..380e2719baa 100644 --- a/src/locales/en/hacker/verb.js +++ b/src/locales/en/hacker/verb.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const verb: string[] = [ 'back up', 'bypass', 'hack', diff --git a/src/locales/en/index.ts b/src/locales/en/index.ts index f8c0387de14..fed7657a966 100644 --- a/src/locales/en/index.ts +++ b/src/locales/en/index.ts @@ -1,28 +1,48 @@ import type { LocaleDefinition } from '../..'; +import { address } from './address'; +import { animal } from './animal'; +import { app } from './app'; +import { business } from './business'; +import { cell_phone } from './cell_phone'; +import { commerce } from './commerce'; +import { company } from './company'; +import { database } from './database'; +import { date } from './date'; +import { finance } from './finance'; +import { hacker } from './hacker'; +import { internet } from './internet'; +import { lorem } from './lorem'; +import { music } from './music'; +import { name } from './name'; +import { phone_number } from './phone_number'; +import { system } from './system'; +import { team } from './team'; +import { vehicle } from './vehicle'; +import { word } from './word'; const en: LocaleDefinition = { title: 'English', separator: ' & ', - address: require('./address'), - animal: require('./animal'), - company: require('./company'), - internet: require('./internet'), - database: require('./database'), - lorem: require('./lorem'), - name: require('./name'), - phone_number: require('./phone_number'), - cell_phone: require('./cell_phone'), - business: require('./business'), - commerce: require('./commerce'), - team: require('./team'), - hacker: require('./hacker'), - app: require('./app'), - finance: require('./finance'), - date: require('./date'), - system: require('./system'), - vehicle: require('./vehicle'), - music: require('./music'), - word: require('./word'), + address: address, + animal: animal, + company: company, + internet: internet, + database: database, + lorem: lorem, + name: name, + phone_number: phone_number, + cell_phone: cell_phone, + business: business, + commerce: commerce, + team: team, + hacker: hacker, + app: app, + finance: finance, + date: date, + system: system, + vehicle: vehicle, + music: music, + word: word, }; export default en; diff --git a/src/locales/en/internet/avatar_uri.js b/src/locales/en/internet/avatar_uri.ts similarity index 99% rename from src/locales/en/internet/avatar_uri.js rename to src/locales/en/internet/avatar_uri.ts index a5e1f7ed98a..fc8fa66a94b 100644 --- a/src/locales/en/internet/avatar_uri.js +++ b/src/locales/en/internet/avatar_uri.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const avatar_uri: string[] = [ '0therplanet_128.jpg', '1markiz_128.jpg', '2fockus_128.jpg', diff --git a/src/locales/en/internet/domain_suffix.js b/src/locales/en/internet/domain_suffix.js deleted file mode 100644 index 7000bc3d2f1..00000000000 --- a/src/locales/en/internet/domain_suffix.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['com', 'biz', 'info', 'name', 'net', 'org']; diff --git a/src/locales/en/internet/domain_suffix.ts b/src/locales/en/internet/domain_suffix.ts new file mode 100644 index 00000000000..42db1126e3d --- /dev/null +++ b/src/locales/en/internet/domain_suffix.ts @@ -0,0 +1,8 @@ +export const domain_suffix: string[] = [ + 'com', + 'biz', + 'info', + 'name', + 'net', + 'org', +]; diff --git a/src/locales/en/internet/example_email.js b/src/locales/en/internet/example_email.js deleted file mode 100644 index e5bb82637f7..00000000000 --- a/src/locales/en/internet/example_email.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['example.org', 'example.com', 'example.net']; diff --git a/src/locales/en/internet/example_email.ts b/src/locales/en/internet/example_email.ts new file mode 100644 index 00000000000..a8fd7b2f5ab --- /dev/null +++ b/src/locales/en/internet/example_email.ts @@ -0,0 +1,5 @@ +export const example_email: string[] = [ + 'example.org', + 'example.com', + 'example.net', +]; diff --git a/src/locales/en/internet/free_email.js b/src/locales/en/internet/free_email.js deleted file mode 100644 index e1a517b046d..00000000000 --- a/src/locales/en/internet/free_email.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['gmail.com', 'yahoo.com', 'hotmail.com']; diff --git a/src/locales/en/internet/free_email.ts b/src/locales/en/internet/free_email.ts new file mode 100644 index 00000000000..8397b7f0e33 --- /dev/null +++ b/src/locales/en/internet/free_email.ts @@ -0,0 +1,7 @@ +export const free_email: string[] = [ + 'gmail.com', + 'yahoo.com', + 'hotmail.com', + 'protonmail.com', + 'me.com', +]; diff --git a/src/locales/en/internet/index.js b/src/locales/en/internet/index.js deleted file mode 100644 index 731b30e55a6..00000000000 --- a/src/locales/en/internet/index.js +++ /dev/null @@ -1,6 +0,0 @@ -var internet = {}; -module['exports'] = internet; -internet.free_email = require('./free_email'); -internet.example_email = require('./example_email'); -internet.domain_suffix = require('./domain_suffix'); -internet.avatar_uri = require('./avatar_uri'); diff --git a/src/locales/en/internet/index.ts b/src/locales/en/internet/index.ts new file mode 100644 index 00000000000..8ffd2595ed6 --- /dev/null +++ b/src/locales/en/internet/index.ts @@ -0,0 +1,11 @@ +import { avatar_uri } from './avatar_uri'; +import { domain_suffix } from './domain_suffix'; +import { example_email } from './example_email'; +import { free_email } from './free_email'; + +export const internet = { + free_email: free_email, + example_email: example_email, + domain_suffix: domain_suffix, + avatar_uri: avatar_uri, +}; diff --git a/src/locales/en/lorem/index.js b/src/locales/en/lorem/index.js deleted file mode 100644 index 75e65cc16f3..00000000000 --- a/src/locales/en/lorem/index.js +++ /dev/null @@ -1,4 +0,0 @@ -var lorem = {}; -module['exports'] = lorem; -lorem.words = require('./words'); -lorem.supplemental = require('./supplemental'); diff --git a/src/locales/en/lorem/index.ts b/src/locales/en/lorem/index.ts new file mode 100644 index 00000000000..a062188112c --- /dev/null +++ b/src/locales/en/lorem/index.ts @@ -0,0 +1,7 @@ +import { supplemental } from './supplemental'; +import { words } from './words'; + +export const lorem = { + words: words, + supplemental: supplemental, +}; diff --git a/src/locales/en/lorem/supplemental.js b/src/locales/en/lorem/supplemental.ts similarity index 99% rename from src/locales/en/lorem/supplemental.js rename to src/locales/en/lorem/supplemental.ts index 9b2e3ce3d1e..5fcde103d6e 100644 --- a/src/locales/en/lorem/supplemental.js +++ b/src/locales/en/lorem/supplemental.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const supplemental: string[] = [ 'abbas', 'abduco', 'abeo', diff --git a/src/locales/en/lorem/words.js b/src/locales/en/lorem/words.ts similarity index 98% rename from src/locales/en/lorem/words.js rename to src/locales/en/lorem/words.ts index ecb121b36b2..7daa0f65c60 100644 --- a/src/locales/en/lorem/words.js +++ b/src/locales/en/lorem/words.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const words: string[] = [ 'alias', 'consequatur', 'aut', diff --git a/src/locales/en/music/genre.js b/src/locales/en/music/genre.ts similarity index 87% rename from src/locales/en/music/genre.js rename to src/locales/en/music/genre.ts index bb7eeb14e57..6cdf005db6c 100644 --- a/src/locales/en/music/genre.js +++ b/src/locales/en/music/genre.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const genre: string[] = [ 'Rock', 'Metal', 'Pop', diff --git a/src/locales/en/music/index.js b/src/locales/en/music/index.js deleted file mode 100644 index 81da1d506d5..00000000000 --- a/src/locales/en/music/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var music = {}; -module['exports'] = music; -music.genre = require('./genre'); diff --git a/src/locales/en/music/index.ts b/src/locales/en/music/index.ts new file mode 100644 index 00000000000..10ceea97a15 --- /dev/null +++ b/src/locales/en/music/index.ts @@ -0,0 +1,5 @@ +import { genre } from './genre'; + +export const music = { + genre: genre, +}; diff --git a/src/locales/en/name/binary_gender.js b/src/locales/en/name/binary_gender.js deleted file mode 100644 index ffb086d9b27..00000000000 --- a/src/locales/en/name/binary_gender.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['Female', 'Male']; diff --git a/src/locales/en/name/binary_gender.ts b/src/locales/en/name/binary_gender.ts new file mode 100644 index 00000000000..e447514a375 --- /dev/null +++ b/src/locales/en/name/binary_gender.ts @@ -0,0 +1 @@ +export const binary_gender: string[] = ['Female', 'Male']; diff --git a/src/locales/en/name/female_first_name.js b/src/locales/en/name/female_first_name.ts similarity index 99% rename from src/locales/en/name/female_first_name.js rename to src/locales/en/name/female_first_name.ts index eac8680a5dd..e8b3eb66ccf 100644 --- a/src/locales/en/name/female_first_name.js +++ b/src/locales/en/name/female_first_name.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const female_first_name: string[] = [ 'Mary', 'Patricia', 'Linda', diff --git a/src/locales/en/name/first_name.js b/src/locales/en/name/first_name.ts similarity index 99% rename from src/locales/en/name/first_name.js rename to src/locales/en/name/first_name.ts index 5f784a17970..6112d33202b 100644 --- a/src/locales/en/name/first_name.js +++ b/src/locales/en/name/first_name.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const first_name: string[] = [ 'Aaliyah', 'Aaron', 'Abagail', diff --git a/src/locales/en/name/name.js b/src/locales/en/name/format.ts similarity index 86% rename from src/locales/en/name/name.js rename to src/locales/en/name/format.ts index 09ae720ad33..2e83bfbef06 100644 --- a/src/locales/en/name/name.js +++ b/src/locales/en/name/format.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const format: string[] = [ '#{prefix} #{first_name} #{last_name}', '#{first_name} #{last_name} #{suffix}', '#{first_name} #{last_name}', diff --git a/src/locales/en/name/gender.js b/src/locales/en/name/gender.ts similarity index 98% rename from src/locales/en/name/gender.js rename to src/locales/en/name/gender.ts index 5d98cd8122e..8a2ca98d908 100644 --- a/src/locales/en/name/gender.js +++ b/src/locales/en/name/gender.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const gender = [ 'Asexual', 'Female to male trans man', 'Female to male transgender man', diff --git a/src/locales/en/name/index.js b/src/locales/en/name/index.js deleted file mode 100644 index fc028590b8a..00000000000 --- a/src/locales/en/name/index.js +++ /dev/null @@ -1,12 +0,0 @@ -var name = {}; -module['exports'] = name; -name.male_first_name = require('./male_first_name'); -name.female_first_name = require('./female_first_name'); -name.first_name = require('./first_name'); -name.last_name = require('./last_name'); -name.binary_gender = require('./binary_gender'); -name.gender = require('./gender'); -name.prefix = require('./prefix'); -name.suffix = require('./suffix'); -name.title = require('./title'); -name.name = require('./name'); diff --git a/src/locales/en/name/index.ts b/src/locales/en/name/index.ts new file mode 100644 index 00000000000..0c5ee599c1a --- /dev/null +++ b/src/locales/en/name/index.ts @@ -0,0 +1,23 @@ +import { binary_gender } from './binary_gender'; +import { female_first_name } from './female_first_name'; +import { first_name } from './first_name'; +import { format } from './format'; +import { gender } from './gender'; +import { last_name } from './last_name'; +import { male_first_name } from './male_first_name'; +import { prefix } from './prefix'; +import { suffix } from './suffix'; +import { title } from './title'; + +export const name = { + male_first_name: male_first_name, + female_first_name: female_first_name, + first_name: first_name, + last_name: last_name, + binary_gender: binary_gender, + gender: gender, + prefix: prefix, + suffix: suffix, + title: title, + format: format, +}; diff --git a/src/locales/en/name/last_name.js b/src/locales/en/name/last_name.ts similarity index 99% rename from src/locales/en/name/last_name.js rename to src/locales/en/name/last_name.ts index cfc351546be..d103bde025c 100644 --- a/src/locales/en/name/last_name.js +++ b/src/locales/en/name/last_name.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const last_name: string[] = [ 'Abbott', 'Abernathy', 'Abshire', diff --git a/src/locales/en/name/male_first_name.js b/src/locales/en/name/male_first_name.ts similarity index 99% rename from src/locales/en/name/male_first_name.js rename to src/locales/en/name/male_first_name.ts index 08793f6ab2c..a3207c76744 100644 --- a/src/locales/en/name/male_first_name.js +++ b/src/locales/en/name/male_first_name.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const male_first_name: string[] = [ 'James', 'John', 'Robert', diff --git a/src/locales/en/name/prefix.js b/src/locales/en/name/prefix.js deleted file mode 100644 index 2adc6707f45..00000000000 --- a/src/locales/en/name/prefix.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['Mr.', 'Mrs.', 'Ms.', 'Miss', 'Dr.']; diff --git a/src/locales/en/name/prefix.ts b/src/locales/en/name/prefix.ts new file mode 100644 index 00000000000..6358bb895ba --- /dev/null +++ b/src/locales/en/name/prefix.ts @@ -0,0 +1 @@ +export const prefix: string[] = ['Mr.', 'Mrs.', 'Ms.', 'Miss', 'Dr.']; diff --git a/src/locales/en/name/suffix.js b/src/locales/en/name/suffix.ts similarity index 73% rename from src/locales/en/name/suffix.js rename to src/locales/en/name/suffix.ts index f1f8a216d39..ee9ba07648c 100644 --- a/src/locales/en/name/suffix.js +++ b/src/locales/en/name/suffix.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const suffix: string[] = [ 'Jr.', 'Sr.', 'I', diff --git a/src/locales/en/name/title.js b/src/locales/en/name/title.ts similarity index 93% rename from src/locales/en/name/title.js rename to src/locales/en/name/title.ts index e2c27c945ae..d1a143da53d 100644 --- a/src/locales/en/name/title.js +++ b/src/locales/en/name/title.ts @@ -1,4 +1,8 @@ -module['exports'] = { +export interface TitleDefinition { + [index: string]: string[]; +} + +export const title: TitleDefinition = { descriptor: [ 'Lead', 'Senior', diff --git a/src/locales/en/phone_number/formats.js b/src/locales/en/phone_number/formats.ts similarity index 92% rename from src/locales/en/phone_number/formats.js rename to src/locales/en/phone_number/formats.ts index 4e69c9f8df6..a93fab64458 100644 --- a/src/locales/en/phone_number/formats.js +++ b/src/locales/en/phone_number/formats.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const formats: string[] = [ '!##-!##-####', '(!##) !##-####', '1-!##-!##-####', diff --git a/src/locales/en/phone_number/index.js b/src/locales/en/phone_number/index.js deleted file mode 100644 index f5e173fe978..00000000000 --- a/src/locales/en/phone_number/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var phone_number = {}; -module['exports'] = phone_number; -phone_number.formats = require('./formats'); diff --git a/src/locales/en/phone_number/index.ts b/src/locales/en/phone_number/index.ts new file mode 100644 index 00000000000..b16afebdcfa --- /dev/null +++ b/src/locales/en/phone_number/index.ts @@ -0,0 +1,5 @@ +import { formats } from './formats'; + +export const phone_number = { + formats: formats, +}; diff --git a/src/locales/en/system/directoryPaths.js b/src/locales/en/system/directoryPaths.ts similarity index 95% rename from src/locales/en/system/directoryPaths.js rename to src/locales/en/system/directoryPaths.ts index 85417418cc7..c1078145c33 100644 --- a/src/locales/en/system/directoryPaths.js +++ b/src/locales/en/system/directoryPaths.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const directoryPaths: string[] = [ '/Applications', '/bin', '/boot', diff --git a/src/locales/en/system/index.js b/src/locales/en/system/index.js deleted file mode 100644 index 0619c16ed28..00000000000 --- a/src/locales/en/system/index.js +++ /dev/null @@ -1,4 +0,0 @@ -var system = {}; -module['exports'] = system; -system.directoryPaths = require('./directoryPaths'); -system.mimeTypes = require('./mimeTypes'); diff --git a/src/locales/en/system/index.ts b/src/locales/en/system/index.ts new file mode 100644 index 00000000000..d75fd4e5342 --- /dev/null +++ b/src/locales/en/system/index.ts @@ -0,0 +1,7 @@ +import { directoryPaths } from './directoryPaths'; +import { mimeTypes, MimeTypesDefinition } from './mimeTypes'; + +export const system = { + directoryPaths: directoryPaths, + mimeTypes: mimeTypes, +}; diff --git a/src/locales/en/system/mimeTypes.js b/src/locales/en/system/mimeTypes.ts similarity index 99% rename from src/locales/en/system/mimeTypes.js rename to src/locales/en/system/mimeTypes.ts index 0cbede4cf63..7aacc32fb0f 100644 --- a/src/locales/en/system/mimeTypes.js +++ b/src/locales/en/system/mimeTypes.ts @@ -1,3 +1,14 @@ +export interface MimeTypesDefinition { + [index: string]: MimeTypeDefinition; +} + +export interface MimeTypeDefinition { + source?: string; + compressible?: boolean; + extensions?: string[]; + charset?: string; +} + /* The MIT License (MIT) @@ -27,7 +38,7 @@ For updates check: https://github.com/jshttp/mime-db/blob/master/db.json */ -module['exports'] = { +export const mimeTypes: MimeTypesDefinition = { 'application/1d-interleaved-parityfec': { source: 'iana', }, diff --git a/src/locales/en/team/creature.js b/src/locales/en/team/creature.ts similarity index 95% rename from src/locales/en/team/creature.js rename to src/locales/en/team/creature.ts index d84e8535e16..978cfc5f1ad 100644 --- a/src/locales/en/team/creature.js +++ b/src/locales/en/team/creature.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const creature: string[] = [ 'ants', 'bats', 'bears', diff --git a/src/locales/en/team/index.js b/src/locales/en/team/index.js deleted file mode 100644 index ebe01b6d4a4..00000000000 --- a/src/locales/en/team/index.js +++ /dev/null @@ -1,4 +0,0 @@ -var team = {}; -module['exports'] = team; -team.creature = require('./creature'); -team.name = require('./name'); diff --git a/src/locales/en/team/index.ts b/src/locales/en/team/index.ts new file mode 100644 index 00000000000..b489bbea303 --- /dev/null +++ b/src/locales/en/team/index.ts @@ -0,0 +1,7 @@ +import { creature } from './creature'; +import { name } from './name'; + +export const team = { + creature: creature, + name: name, +}; diff --git a/src/locales/en/team/name.js b/src/locales/en/team/name.js deleted file mode 100644 index 5d087003881..00000000000 --- a/src/locales/en/team/name.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['#{Address.state} #{creature}']; diff --git a/src/locales/en/team/name.ts b/src/locales/en/team/name.ts new file mode 100644 index 00000000000..622a4a7e065 --- /dev/null +++ b/src/locales/en/team/name.ts @@ -0,0 +1 @@ +export const name: string[] = ['#{Address.state} #{creature}']; diff --git a/src/locales/en/vehicle/bicycle.js b/src/locales/en/vehicle/bicycle.ts similarity index 92% rename from src/locales/en/vehicle/bicycle.js rename to src/locales/en/vehicle/bicycle.ts index acb797598a9..18838adfe11 100644 --- a/src/locales/en/vehicle/bicycle.js +++ b/src/locales/en/vehicle/bicycle.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const bicycle: string[] = [ 'Adventure Road Bicycle', 'BMX Bicycle', 'City Bicycle', diff --git a/src/locales/en/vehicle/fuel.js b/src/locales/en/vehicle/fuel.js deleted file mode 100644 index 92ecdb38740..00000000000 --- a/src/locales/en/vehicle/fuel.js +++ /dev/null @@ -1 +0,0 @@ -module['exports'] = ['Diesel', 'Electric', 'Gasoline', 'Hybrid']; diff --git a/src/locales/en/vehicle/fuel.ts b/src/locales/en/vehicle/fuel.ts new file mode 100644 index 00000000000..989f74a7aed --- /dev/null +++ b/src/locales/en/vehicle/fuel.ts @@ -0,0 +1 @@ +export const fuel: string[] = ['Diesel', 'Electric', 'Gasoline', 'Hybrid']; diff --git a/src/locales/en/vehicle/index.js b/src/locales/en/vehicle/index.js deleted file mode 100644 index 5b315910370..00000000000 --- a/src/locales/en/vehicle/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var vehicle = {}; -module['exports'] = vehicle; -vehicle.manufacturer = require('./manufacturer'); -vehicle.model = require('./model'); -vehicle.type = require('./vehicle_type'); -vehicle.fuel = require('./fuel'); -vehicle.bicycle = require('./bicycle'); diff --git a/src/locales/en/vehicle/index.ts b/src/locales/en/vehicle/index.ts new file mode 100644 index 00000000000..53aaed5dd26 --- /dev/null +++ b/src/locales/en/vehicle/index.ts @@ -0,0 +1,13 @@ +import { bicycle } from './bicycle'; +import { fuel } from './fuel'; +import { manufacturer } from './manufacturer'; +import { model } from './model'; +import { vehicle_type } from './vehicle_type'; + +export const vehicle = { + manufacturer: manufacturer, + model: model, + type: vehicle_type, + fuel: fuel, + bicycle: bicycle, +}; diff --git a/src/locales/en/vehicle/manufacturer.js b/src/locales/en/vehicle/manufacturer.ts similarity index 91% rename from src/locales/en/vehicle/manufacturer.js rename to src/locales/en/vehicle/manufacturer.ts index 4a9e66ebfe5..243447d35af 100644 --- a/src/locales/en/vehicle/manufacturer.js +++ b/src/locales/en/vehicle/manufacturer.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const manufacturer: string[] = [ 'Aston Martin', 'Audi', 'Bentley', diff --git a/src/locales/en/vehicle/model.js b/src/locales/en/vehicle/model.ts similarity index 95% rename from src/locales/en/vehicle/model.js rename to src/locales/en/vehicle/model.ts index c62a18c4ceb..55e25416296 100644 --- a/src/locales/en/vehicle/model.js +++ b/src/locales/en/vehicle/model.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const model: string[] = [ 'Fiesta', 'Focus', 'Taurus', diff --git a/src/locales/en/vehicle/vehicle_type.js b/src/locales/en/vehicle/vehicle_type.ts similarity index 80% rename from src/locales/en/vehicle/vehicle_type.js rename to src/locales/en/vehicle/vehicle_type.ts index 7ea820bbbd0..5d826c1f4fd 100644 --- a/src/locales/en/vehicle/vehicle_type.js +++ b/src/locales/en/vehicle/vehicle_type.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const vehicle_type: string[] = [ 'Cargo Van', 'Convertible', 'Coupe', diff --git a/src/locales/en/word/adjective.js b/src/locales/en/word/adjective.ts similarity index 99% rename from src/locales/en/word/adjective.js rename to src/locales/en/word/adjective.ts index b743f715329..6a82c3488a2 100644 --- a/src/locales/en/word/adjective.js +++ b/src/locales/en/word/adjective.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const adjective: string[] = [ 'abandoned', 'able', 'absolute', diff --git a/src/locales/en/word/adverb.js b/src/locales/en/word/adverb.ts similarity index 99% rename from src/locales/en/word/adverb.js rename to src/locales/en/word/adverb.ts index 6b3df3b1d55..5236654da4d 100644 --- a/src/locales/en/word/adverb.js +++ b/src/locales/en/word/adverb.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const adverb: string[] = [ 'abnormally', 'absentmindedly', 'accidentally', diff --git a/src/locales/en/word/conjunction.js b/src/locales/en/word/conjunction.ts similarity index 95% rename from src/locales/en/word/conjunction.js rename to src/locales/en/word/conjunction.ts index bf7ca264d15..fcaf9c37890 100644 --- a/src/locales/en/word/conjunction.js +++ b/src/locales/en/word/conjunction.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const conjunction: string[] = [ 'after', 'after all', 'although', diff --git a/src/locales/en/word/index.js b/src/locales/en/word/index.js deleted file mode 100644 index f9cdeaa8af6..00000000000 --- a/src/locales/en/word/index.js +++ /dev/null @@ -1,9 +0,0 @@ -var word = {}; -module['exports'] = word; -word.adjective = require('./adjective'); -word.adverb = require('./adverb'); -word.conjunction = require('./conjunction'); -word.interjection = require('./interjection'); -word.noun = require('./noun'); -word.preposition = require('./preposition'); -word.verb = require('./verb'); diff --git a/src/locales/en/word/index.ts b/src/locales/en/word/index.ts new file mode 100644 index 00000000000..b44fcb22b5d --- /dev/null +++ b/src/locales/en/word/index.ts @@ -0,0 +1,17 @@ +import { adjective } from './adjective'; +import { adverb } from './adverb'; +import { conjunction } from './conjunction'; +import { interjection } from './interjection'; +import { noun } from './noun'; +import { preposition } from './preposition'; +import { verb } from './verb'; + +export const word = { + adjective: adjective, + adverb: adverb, + conjunction: conjunction, + interjection: interjection, + noun: noun, + preposition: preposition, + verb: verb, +}; diff --git a/src/locales/en/word/interjection.js b/src/locales/en/word/interjection.ts similarity index 92% rename from src/locales/en/word/interjection.js rename to src/locales/en/word/interjection.ts index f34b3cd8c9e..9c5a1c8f55d 100644 --- a/src/locales/en/word/interjection.js +++ b/src/locales/en/word/interjection.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const interjection: string[] = [ 'yuck', 'oh', 'phooey', diff --git a/src/locales/en/word/noun.js b/src/locales/en/word/noun.ts similarity index 99% rename from src/locales/en/word/noun.js rename to src/locales/en/word/noun.ts index e3666d1d98a..215fb583d33 100644 --- a/src/locales/en/word/noun.js +++ b/src/locales/en/word/noun.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const noun: string[] = [ 'ATM', 'CD', 'SUV', diff --git a/src/locales/en/word/preposition.js b/src/locales/en/word/preposition.ts similarity index 96% rename from src/locales/en/word/preposition.js rename to src/locales/en/word/preposition.ts index f8132a14064..c60e9a3e95a 100644 --- a/src/locales/en/word/preposition.js +++ b/src/locales/en/word/preposition.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const preposition: string[] = [ 'a', 'abaft', 'aboard', diff --git a/src/locales/en/word/verb.js b/src/locales/en/word/verb.ts similarity index 99% rename from src/locales/en/word/verb.js rename to src/locales/en/word/verb.ts index 543203f6e4a..12b8e985365 100644 --- a/src/locales/en/word/verb.js +++ b/src/locales/en/word/verb.ts @@ -1,4 +1,4 @@ -module['exports'] = [ +export const verb: string[] = [ 'abandon', 'abase', 'abate',