-
-
Notifications
You must be signed in to change notification settings - Fork 919
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(locale)!: remove location data index-value-binding (#2476)
- Loading branch information
1 parent
734a7f3
commit 453ea97
Showing
26 changed files
with
151 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
### Direction definitions reorganized | ||
|
||
The locale definitions used by `faker.location.direction()`, `faker.location.cardinalDirection()` and `faker.location.ordinalDirection()` have been reorganized. | ||
Previously, they were organized under `definitions.location.direction` and `definitions.location.direction_abbr` and where values were required to be in a specific order. | ||
Now, all values are nested under `definitions.location.direction` with descriptive property names. | ||
If you are using the public methods, no changes are required. | ||
You only need to change your code if you are accessing the raw definitions e.g. in `faker.helpers.fake()`. | ||
|
||
| Before | After | | ||
| ------------------------- | ----------------------------------------------------------------------- | | ||
| `location.direction` | `location.direction.cardinal` or `location.direction.ordinal` | | ||
| `location.direction_abbr` | `location.direction.cardinal_abbr` or `location.direction.ordinal_abbr` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
export default [ | ||
'Nord', | ||
'Øst', | ||
'Syd', | ||
'Vest', | ||
'Nordøst', | ||
'Nordvest', | ||
'Sydøst', | ||
'Sydvest', | ||
]; | ||
export default { | ||
cardinal: ['Nord', 'Øst', 'Syd', 'Vest'], | ||
cardinal_abbr: ['N', 'Ø', 'S', 'V'], | ||
ordinal: ['Nordøst', 'Nordvest', 'Sydøst', 'Sydvest'], | ||
ordinal_abbr: ['NØ', 'NV', 'SØ', 'SV'], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
export default [ | ||
'North', | ||
'East', | ||
'South', | ||
'West', | ||
'Northeast', | ||
'Northwest', | ||
'Southeast', | ||
'Southwest', | ||
]; | ||
export default { | ||
cardinal: ['North', 'East', 'South', 'West'], | ||
cardinal_abbr: ['N', 'E', 'S', 'W'], | ||
ordinal: ['Northeast', 'Northwest', 'Southeast', 'Southwest'], | ||
ordinal_abbr: ['NE', 'NW', 'SE', 'SW'], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
export default [ | ||
'nordo', | ||
'oriento', | ||
'sudo', | ||
'okcidento', | ||
'nordoriento', | ||
'nordokcidenta', | ||
'sudoriento', | ||
'sudokcidento', | ||
]; | ||
export default { | ||
cardinal: ['nordo', 'oriento', 'sudo', 'okcidento'], | ||
cardinal_abbr: ['N', 'E', 'S', 'U'], | ||
ordinal: ['nordoriento', 'nordokcidenta', 'sudoriento', 'sudokcidento'], | ||
ordinal_abbr: ['NE', 'NU', 'SE', 'SU'], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
export default [ | ||
'شمال', | ||
'شرق', | ||
'جنوب', | ||
'غرب', | ||
'شمال شرق', | ||
'شمال غرب', | ||
'جنوب شرق', | ||
'جنوب غرب', | ||
]; | ||
export default { | ||
cardinal: ['شمال', 'شرق', 'جنوب', 'غرب'], | ||
cardinal_abbr: ['شمالی', 'شرقی', 'جنوبی', 'غربی'], | ||
ordinal: ['شمال شرق', 'شمال غرب', 'جنوب شرق', 'جنوب غرب'], | ||
ordinal_abbr: ['شمال شرق', 'شمال غرب', 'جنوب شرق', 'جنوب غرب'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
export default [ | ||
'Nord', | ||
'Est', | ||
'Sud', | ||
'Ouest', | ||
'Nord-est', | ||
'Nord-ouest', | ||
'Sud-est', | ||
'Sud-ouest', | ||
]; | ||
export default { | ||
cardinal: ['Nord', 'Est', 'Sud', 'Ouest'], | ||
cardinal_abbr: ['N', 'E', 'S', 'O'], | ||
ordinal: ['Nord-est', 'Nord-ouest', 'Sud-est', 'Sud-ouest'], | ||
ordinal_abbr: ['NE', 'NO', 'SE', 'SO'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
export default [ | ||
'Nord', | ||
'Est', | ||
'Sud', | ||
'Ouest', | ||
'Nord-est', | ||
'Nord-ouest', | ||
'Sud-est', | ||
'Sud-ouest', | ||
]; | ||
export default { | ||
cardinal: ['Nord', 'Est', 'Sud', 'Ouest'], | ||
cardinal_abbr: ['N', 'E', 'S', 'O'], | ||
ordinal: ['Nord-est', 'Nord-ouest', 'Sud-est', 'Sud-ouest'], | ||
ordinal_abbr: ['NE', 'NO', 'SE', 'SO'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
export default [ | ||
'צפון', | ||
'מזרח', | ||
'דרום', | ||
'מערב', | ||
'צפון מזרח', | ||
'צפון מערב', | ||
'דרום מזרח', | ||
'דרום מערב', | ||
]; | ||
export default { | ||
cardinal: ['צפון', 'מזרח', 'דרום', 'מערב'], | ||
cardinal_abbr: ['צ', 'מז', 'ד', 'מע'], | ||
ordinal: ['צפון מזרח', 'צפון מערב', 'דרום מזרח', 'דרום מערב'], | ||
ordinal_abbr: ['צ-מז', 'צ-מע', 'ד-מז', 'ד-מע'], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
export default [ | ||
'Հյուսիսային', | ||
'Արևելյան', | ||
'Հարավային', | ||
'Արևմտյան', | ||
'Հյուսիսարևելյան', | ||
'Հյուսիսարևմտյան', | ||
'Հարավարևելյան', | ||
'Հարավարևմտյան', | ||
]; | ||
export default { | ||
cardinal: ['Հյուսիսային', 'Արևելյան', 'Հարավային', 'Արևմտյան'], | ||
cardinal_abbr: ['հս․ լ․', 'ավ․ ե․', 'հվ․ լ․', 'ամ․ ե․'], | ||
ordinal: [ | ||
'Հյուսիսարևելյան', | ||
'Հյուսիսարևմտյան', | ||
'Հարավարևելյան', | ||
'Հարավարևմտյան', | ||
], | ||
ordinal_abbr: [ | ||
'հս․ լ․ ավ․ ե․', | ||
'հս․ լ․ ամ․ ե․', | ||
'հվ․ լ․ ավ․ ե․', | ||
'հվ․ լ․ ամ․ ե․', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
export default ['北', '東', '南', '西', '北東', '北西', '南東', '南西']; | ||
export default { | ||
cardinal: ['北', '東', '南', '西'], | ||
cardinal_abbr: ['北', '東', '南', '西'], | ||
ordinal: ['北東', '北西', '南東', '南西'], | ||
ordinal_abbr: ['北東', '北西', '南東', '南西'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
// Source: https://pl.wikipedia.org/wiki/Strony_świata | ||
export default [ | ||
'północ', | ||
'wschód', | ||
'południe', | ||
'zachód', | ||
'północny wschód', | ||
'południowy wschód', | ||
'południowy zachód', | ||
'północny zachód', | ||
]; | ||
export default { | ||
cardinal: ['północ', 'wschód', 'południe', 'zachód'], | ||
cardinal_abbr: ['pn.', 'wsch.', 'pd.', 'zach.'], | ||
ordinal: [ | ||
'północny wschód', | ||
'południowy wschód', | ||
'południowy zachód', | ||
'północny zachód', | ||
], | ||
ordinal_abbr: ['pn. wsch.', 'pd. wsch.', 'pd. zach.', 'pn. zach.'], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
export default [ | ||
'Norte', | ||
'Este', | ||
'Sul', | ||
'Oeste', | ||
'Nordeste', | ||
'Noroeste', | ||
'Sudeste', | ||
'Sodoeste', | ||
]; | ||
export default { | ||
cardinal: ['Norte', 'Este', 'Sul', 'Oeste'], | ||
cardinal_abbr: ['N', 'E', 'S', 'O'], | ||
ordinal: ['Nordeste', 'Noroeste', 'Sudeste', 'Sodoeste'], | ||
ordinal_abbr: ['NE', 'NO', 'SE', 'SO'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
export default [ | ||
'شمال', | ||
'مشرق', | ||
'جنوب', | ||
'مغرب', | ||
'شمال مشرق', | ||
'سمال مغرب', | ||
'جنوب مشرق', | ||
'جنوب مغرب', | ||
]; | ||
export default { | ||
cardinal: ['شمال', 'مشرق', 'جنوب', 'مغرب'], | ||
cardinal_abbr: ['شمال', 'مشرق', 'جنوب', 'مغرب'], | ||
ordinal: ['شمال مشرق', 'سمال مغرب', 'جنوب مشرق', 'جنوب مغرب'], | ||
ordinal_abbr: ['شمال مشرق', 'سمال مغرب', 'جنوب مشرق', 'جنوب مغرب'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
export default [ | ||
'Shimol', | ||
'Sharq', | ||
'Janub', | ||
"G'arb", | ||
'Shimoli-sharqiy', | ||
"Shimoli g'arbiy", | ||
'Janubi-sharqiy', | ||
"Janubi-g'arbiy", | ||
]; | ||
export default { | ||
cardinal: ['Shimol', 'Sharq', 'Janub', "G'arb"], | ||
cardinal_abbr: ['Shimol', 'Sharq', 'Janub', "G'arb"], | ||
ordinal: [ | ||
'Shimoli-sharqiy', | ||
"Shimoli g'arbiy", | ||
'Janubi-sharqiy', | ||
"Janubi-g'arbiy", | ||
], | ||
ordinal_abbr: [ | ||
'Shimoli-sharqiy', | ||
"Shimoli g'arbiy", | ||
'Janubi-sharqiy', | ||
"Janubi-g'arbiy", | ||
], | ||
}; |
Oops, something went wrong.