Skip to content

Commit a62f5c3

Browse files
committed
Add en-AU locales
1 parent 6969491 commit a62f5c3

File tree

12 files changed

+1023
-0
lines changed

12 files changed

+1023
-0
lines changed
Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
/* Datasource: https://github.com/umpirsky/country-list */
2+
3+
module.exports = {
4+
"AF": "Afghanistan",
5+
"AX": "\u00c5land Islands",
6+
"AL": "Albania",
7+
"DZ": "Algeria",
8+
"AS": "American Samoa",
9+
"AD": "Andorra",
10+
"AO": "Angola",
11+
"AI": "Anguilla",
12+
"AQ": "Antarctica",
13+
"AG": "Antigua & Barbuda",
14+
"AR": "Argentina",
15+
"AM": "Armenia",
16+
"AW": "Aruba",
17+
"AC": "Ascension Island",
18+
"AU": "Australia",
19+
"AT": "Austria",
20+
"AZ": "Azerbaijan",
21+
"BS": "Bahamas",
22+
"BH": "Bahrain",
23+
"BD": "Bangladesh",
24+
"BB": "Barbados",
25+
"BY": "Belarus",
26+
"BE": "Belgium",
27+
"BZ": "Belize",
28+
"BJ": "Benin",
29+
"BM": "Bermuda",
30+
"BT": "Bhutan",
31+
"BO": "Bolivia",
32+
"BA": "Bosnia & Herzegovina",
33+
"BW": "Botswana",
34+
"BR": "Brazil",
35+
"IO": "British Indian Ocean Territory",
36+
"VG": "British Virgin Islands",
37+
"BN": "Brunei",
38+
"BG": "Bulgaria",
39+
"BF": "Burkina Faso",
40+
"BI": "Burundi",
41+
"KH": "Cambodia",
42+
"CM": "Cameroon",
43+
"CA": "Canada",
44+
"IC": "Canary Islands",
45+
"CV": "Cape Verde",
46+
"BQ": "Caribbean Netherlands",
47+
"KY": "Cayman Islands",
48+
"CF": "Central African Republic",
49+
"EA": "Ceuta & Melilla",
50+
"TD": "Chad",
51+
"CL": "Chile",
52+
"CN": "China",
53+
"CX": "Christmas Island",
54+
"CC": "Cocos (Keeling) Islands",
55+
"CO": "Colombia",
56+
"KM": "Comoros",
57+
"CG": "Congo - Brazzaville",
58+
"CD": "Congo - Kinshasa",
59+
"CK": "Cook Islands",
60+
"CR": "Costa Rica",
61+
"CI": "C\u00f4te d\u2019Ivoire",
62+
"HR": "Croatia",
63+
"CU": "Cuba",
64+
"CW": "Cura\u00e7ao",
65+
"CY": "Cyprus",
66+
"CZ": "Czech Republic",
67+
"DK": "Denmark",
68+
"DG": "Diego Garcia",
69+
"DJ": "Djibouti",
70+
"DM": "Dominica",
71+
"DO": "Dominican Republic",
72+
"EC": "Ecuador",
73+
"EG": "Egypt",
74+
"SV": "El Salvador",
75+
"GQ": "Equatorial Guinea",
76+
"ER": "Eritrea",
77+
"EE": "Estonia",
78+
"ET": "Ethiopia",
79+
"FK": "Falkland Islands",
80+
"FO": "Faroe Islands",
81+
"FJ": "Fiji",
82+
"FI": "Finland",
83+
"FR": "France",
84+
"GF": "French Guiana",
85+
"PF": "French Polynesia",
86+
"TF": "French Southern Territories",
87+
"GA": "Gabon",
88+
"GM": "Gambia",
89+
"GE": "Georgia",
90+
"DE": "Germany",
91+
"GH": "Ghana",
92+
"GI": "Gibraltar",
93+
"GR": "Greece",
94+
"GL": "Greenland",
95+
"GD": "Grenada",
96+
"GP": "Guadeloupe",
97+
"GU": "Guam",
98+
"GT": "Guatemala",
99+
"GG": "Guernsey",
100+
"GN": "Guinea",
101+
"GW": "Guinea-Bissau",
102+
"GY": "Guyana",
103+
"HT": "Haiti",
104+
"HN": "Honduras",
105+
"HK": "Hong Kong SAR China",
106+
"HU": "Hungary",
107+
"IS": "Iceland",
108+
"IN": "India",
109+
"ID": "Indonesia",
110+
"IR": "Iran",
111+
"IQ": "Iraq",
112+
"IE": "Ireland",
113+
"IM": "Isle of Man",
114+
"IL": "Israel",
115+
"IT": "Italy",
116+
"JM": "Jamaica",
117+
"JP": "Japan",
118+
"JE": "Jersey",
119+
"JO": "Jordan",
120+
"KZ": "Kazakhstan",
121+
"KE": "Kenya",
122+
"KI": "Kiribati",
123+
"XK": "Kosovo",
124+
"KW": "Kuwait",
125+
"KG": "Kyrgyzstan",
126+
"LA": "Laos",
127+
"LV": "Latvia",
128+
"LB": "Lebanon",
129+
"LS": "Lesotho",
130+
"LR": "Liberia",
131+
"LY": "Libya",
132+
"LI": "Liechtenstein",
133+
"LT": "Lithuania",
134+
"LU": "Luxembourg",
135+
"MO": "Macau SAR China",
136+
"MK": "Macedonia",
137+
"MG": "Madagascar",
138+
"MW": "Malawi",
139+
"MY": "Malaysia",
140+
"MV": "Maldives",
141+
"ML": "Mali",
142+
"MT": "Malta",
143+
"MH": "Marshall Islands",
144+
"MQ": "Martinique",
145+
"MR": "Mauritania",
146+
"MU": "Mauritius",
147+
"YT": "Mayotte",
148+
"MX": "Mexico",
149+
"FM": "Micronesia",
150+
"MD": "Moldova",
151+
"MC": "Monaco",
152+
"MN": "Mongolia",
153+
"ME": "Montenegro",
154+
"MS": "Montserrat",
155+
"MA": "Morocco",
156+
"MZ": "Mozambique",
157+
"MM": "Myanmar (Burma)",
158+
"NA": "Namibia",
159+
"NR": "Nauru",
160+
"NP": "Nepal",
161+
"NL": "Netherlands",
162+
"NC": "New Caledonia",
163+
"NZ": "New Zealand",
164+
"NI": "Nicaragua",
165+
"NE": "Niger",
166+
"NG": "Nigeria",
167+
"NU": "Niue",
168+
"NF": "Norfolk Island",
169+
"KP": "North Korea",
170+
"MP": "Northern Mariana Islands",
171+
"NO": "Norway",
172+
"OM": "Oman",
173+
"PK": "Pakistan",
174+
"PW": "Palau",
175+
"PS": "Palestinian Territories",
176+
"PA": "Panama",
177+
"PG": "Papua New Guinea",
178+
"PY": "Paraguay",
179+
"PE": "Peru",
180+
"PH": "Philippines",
181+
"PN": "Pitcairn Islands",
182+
"PL": "Poland",
183+
"PT": "Portugal",
184+
"PR": "Puerto Rico",
185+
"QA": "Qatar",
186+
"RE": "R\u00e9union",
187+
"RO": "Romania",
188+
"RU": "Russia",
189+
"RW": "Rwanda",
190+
"WS": "Samoa",
191+
"SM": "San Marino",
192+
"ST": "S\u00e3o Tom\u00e9 & Pr\u00edncipe",
193+
"SA": "Saudi Arabia",
194+
"SN": "Senegal",
195+
"RS": "Serbia",
196+
"SC": "Seychelles",
197+
"SL": "Sierra Leone",
198+
"SG": "Singapore",
199+
"SX": "Sint Maarten",
200+
"SK": "Slovakia",
201+
"SI": "Slovenia",
202+
"SB": "Solomon Islands",
203+
"SO": "Somalia",
204+
"ZA": "South Africa",
205+
"GS": "South Georgia & South Sandwich Islands",
206+
"KR": "South Korea",
207+
"SS": "South Sudan",
208+
"ES": "Spain",
209+
"LK": "Sri Lanka",
210+
"BL": "St. Barth\u00e9lemy",
211+
"SH": "St. Helena",
212+
"KN": "St. Kitts & Nevis",
213+
"LC": "St. Lucia",
214+
"MF": "St. Martin",
215+
"PM": "St. Pierre & Miquelon",
216+
"VC": "St. Vincent & Grenadines",
217+
"SD": "Sudan",
218+
"SR": "Suriname",
219+
"SJ": "Svalbard & Jan Mayen",
220+
"SZ": "Swaziland",
221+
"SE": "Sweden",
222+
"CH": "Switzerland",
223+
"SY": "Syria",
224+
"TW": "Taiwan",
225+
"TJ": "Tajikistan",
226+
"TZ": "Tanzania",
227+
"TH": "Thailand",
228+
"TL": "Timor-Leste",
229+
"TG": "Togo",
230+
"TK": "Tokelau",
231+
"TO": "Tonga",
232+
"TT": "Trinidad & Tobago",
233+
"TA": "Tristan da Cunha",
234+
"TN": "Tunisia",
235+
"TR": "Turkey",
236+
"TM": "Turkmenistan",
237+
"TC": "Turks & Caicos Islands",
238+
"TV": "Tuvalu",
239+
"UM": "U.S. Outlying Islands",
240+
"VI": "U.S. Virgin Islands",
241+
"UG": "Uganda",
242+
"UA": "Ukraine",
243+
"AE": "United Arab Emirates",
244+
"GB": "United Kingdom",
245+
"US": "United States",
246+
"UY": "Uruguay",
247+
"UZ": "Uzbekistan",
248+
"VU": "Vanuatu",
249+
"VA": "Vatican City",
250+
"VE": "Venezuela",
251+
"VN": "Vietnam",
252+
"WF": "Wallis & Futuna",
253+
"EH": "Western Sahara",
254+
"YE": "Yemen",
255+
"ZM": "Zambia",
256+
"ZW": "Zimbabwe"
257+
};

lib/locales/en-AU/address/index.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import countries from "./countryWithCodes";
2+
3+
module.exports = {
4+
countryAndCode() {
5+
let country = this.random.objectElement(countries);
6+
return {
7+
code: Object.keys(country)[0],
8+
name: country[Object.keys(country)[0]]
9+
};
10+
},
11+
12+
state: [
13+
"New South Wales",
14+
"Queensland",
15+
"Northern Territory",
16+
"South Australia",
17+
"Western Australia",
18+
"Tasmania",
19+
"Australian Capital Territory",
20+
"Victoria"
21+
],
22+
stateAbbr: [
23+
"NSW",
24+
"QLD",
25+
"NT",
26+
"SA",
27+
"WA",
28+
"TAS",
29+
"ACT",
30+
"VIC"
31+
],
32+
33+
buildingNumber: [
34+
"####",
35+
"###",
36+
"##"
37+
],
38+
39+
postCode: [
40+
"0###",
41+
"2###",
42+
"3###",
43+
"4###",
44+
"5###",
45+
"6###",
46+
"7###"
47+
]
48+
49+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module.exports = [
2+
"Avenue",
3+
"Boulevard",
4+
"Circle",
5+
"Circuit",
6+
"Court",
7+
"Crescent",
8+
"Crest",
9+
"Drive",
10+
"Estate Dr",
11+
"Grove",
12+
"Hill",
13+
"Island",
14+
"Junction",
15+
"Knoll",
16+
"Lane",
17+
"Loop",
18+
"Mall",
19+
"Manor",
20+
"Meadow",
21+
"Mews",
22+
"Parade",
23+
"Parkway",
24+
"Pass",
25+
"Place",
26+
"Plaza",
27+
"Ridge",
28+
"Road",
29+
"Run",
30+
"Square",
31+
"Station St",
32+
"Street",
33+
"Summit",
34+
"Terrace",
35+
"Track",
36+
"Trail",
37+
"View Rd",
38+
"Way"
39+
];

lib/locales/en-AU/build.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import isNil from "lodash/isNil";
2+
import isArray from "lodash/isArray";
3+
import isFunction from "lodash/isFunction";
4+
import isObject from "lodash/isObject";
5+
import mergeWith from "lodash/mergeWith";
6+
7+
import Fakerator from "lib/fakerator";
8+
9+
module.exports = function() {
10+
let locale = require("lib/locales/en-AU");
11+
let fbLocale = require("lib/locales/default");
12+
13+
// Merge locale and fallback
14+
locale = mergeWith(locale, fbLocale, (objValue) => {
15+
// DON'T MERGE ARRAYS
16+
if (isArray(objValue) || isFunction(objValue))
17+
return objValue;
18+
19+
if (!isNil(objValue) && !isObject(objValue))
20+
return objValue;
21+
});
22+
23+
return new Fakerator(locale);
24+
};

lib/locales/en-AU/company/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
3+
suffix: [
4+
"Pty Ltd",
5+
"and Sons",
6+
"Corp",
7+
"Group",
8+
"Brothers",
9+
"Partners"
10+
]
11+
};

0 commit comments

Comments
 (0)