Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new sports module using old team data #1917

Closed
wants to merge 3 commits into from

Conversation

matthewmayer
Copy link
Contributor

@matthewmayer matthewmayer commented Mar 9, 2023

I had a go at building out a sports module as discussed at #1585

A few points to note:

  • This reuses the old team data which is available in a few locales
  • Changed module to sports as team is a bit vague (like a team of colleagues?)
  • Changed creature to team_suffix as not all sports teams have animal names
  • Added a few locale-specific definitions, e.g. en_US uses state, other locales use city
  • en_GB, es_MX, ar, el ur, sv have team_suffix and pl has team_prefix

Here are a few fake matchups by locale generated by:

Object.entries(allFakers).map(entry=>{let [key,faker]=entry;return(key+": "+faker.sports.team()+" vs "+faker.sports.team())})
[
  'af_ZA: West Rufusland Tigers vs Lake Lukasfield Cats',
  'ar: واسط استذئاب vs الدار البيضاء التنين',
  'az: Qazax Goats vs Zərdab Goats',
  'cz: Opočno Foes vs Hořovice Oxen',
  'de: Ost Liana Chickens vs Scheyttstadt Whales',
  'de_AT: Turnau Monkeys vs Ratten Dwarves',
  'de_CH: Langenthal Prophets vs Wallisellen Ants',
  'dv: އިރުމަތި ކުކުޅުކޮޑި Giants vs ރަފާހިއްޔާކޮޑި Geese',
  'el: Lake Στυλιανός γίγαντες vs New Αναστασιαville φάλαινες',
  'en: Duluth Air vs Wunschtown Dolphins',
  'en_AU: Lake Addisonside Ducks vs Charlieland Ducks',
  'en_AU_ocker: Stones Corner Cats vs Fremantle Air',
  'en_BORK: Shemarfort Chickens vs Tamiami Black cats',
  'en_CA: Jarodcester Spiders vs East Mustafaville Wind',
  'en_GB: Lower Ryanham Villa vs Jaskolskiingham Athletic',
  'en_GH: Pentecost Seminary Goblins vs Saaman Foes',
  'en_IE: Torpmouth Ghosts vs Reynoldstead Goats',
  'en_IN: Nasirabad Penguins vs Marmagao Penguins',
  'en_NG: Awteyi Dwarves vs Ilogbo Elegba Lions',
  'en_US: Colorado Gnomes vs North Carolina Ants',
  'en_ZA: Johannesburg Ogres vs Pretoria Tigers',
  'es: Sevilla Ice vs Puertollano Fishes',
  'es_MX: Rioverde-Ciudad Fernández Caballos vs Durango Grifos',
  'fa: خمینی‌شهر Worshipers vs زنجان Crows',
  'fi: East Valtteri Rabbits vs Erikport Ice',
  'fr: Tours Pigs vs Le Tampon Wind',
  'fr_BE: Silly Spiders vs Chapelle-lez-HerlaimontSud Prophets',
  'fr_CA: Fort Gerbert Birds vs Alixport Lycanthropes',
  'fr_CH: Winterthour Horses vs Coire Foes',
  'fr_LU: Vianden Monkeys vs Wiltz Owls',
  'ge: ახალი გვანჯისკარი Foxes vs ზემო ტასო Wolves',
  'he: תל מונד Elephants vs כפר עציון Witches',
  'hr: Kaštela Nemesis vs Vukovar Wolves',
  'hu: West Zsombor Geese vs North Zénó Sheep',
  'hy: Մովսիսյանակերտ Ice vs Հարավային Մարգարյան Druids',
  'id_ID: Bangli Sons vs Donggala Gnomes',
  'it: Borgo Bonifacio a mare Sons vs San Pacomio Bats',
  'ja: 東吉田村 Pigs vs 伊藤市 Elephants',
  'ko: 분당시 Warlocks vs 부평구 Ants',
  'lv: Saulkrasti Ants vs Talsi Spiders',
  'mk: Штип Dwarves vs Охрид Pigs',
  'nb_NO: Vestvik Gnomes vs Storvik Oracles',
  'ne: Amitastead Kangaroos vs Kafletown Lions',
  'nl: Maalstede Warlocks vs Veldzichtvliet Ogres',
  'nl_BE: Kampenhout Ice vs Ransberg Ghosts',
  'pl: KS Olkusz vs Górnik Kluczbork',
  'pt_BR: Lucas do Norte Geese vs Carvalho do Norte Chickens',
  'pt_PT: Viana do Castelo Vampires vs Torres Novas Geese',
  'ro: Salcea Sons vs Urlați Dwarves',
  'ru: Шали Griffins vs Артем Vampires',
  'sk: Žilina Rabbits vs Bardejov Oxen',
  'sv: Falstad HK vs Arsås SK',
  'tr: Lake Bunsuzbury Goblins vs Erkeklihaven Geese',
  'uk: Північний Ілля Fire vs Херсон Sorcerors',
  'ur: مریمٹاوْن بکریاں vs مشرق مشالٹاوْن لوگ',
  'vi: Bình Thuận Dwarves vs Cao Bằng Ogres',
  'zh_CN: 福京市 Druids vs 衡头市 Nemesis',
  'zh_TW: 臺南縣 Geese vs 南投縣 Birds',
  'zu_ZA: Port Ndondolozaboro Druids vs Mpilofield Crows'
]

@matthewmayer matthewmayer marked this pull request as ready for review March 9, 2023 18:03
@matthewmayer matthewmayer requested a review from a team March 9, 2023 18:03
@matthewmayer matthewmayer requested a review from a team as a code owner March 9, 2023 18:03
@matthewmayer matthewmayer self-assigned this Mar 9, 2023
@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Merging #1917 (7fa945e) into next (6ba21c6) will decrease coverage by 0.01%.
The diff coverage is 96.50%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1917      +/-   ##
==========================================
- Coverage   99.63%   99.62%   -0.01%     
==========================================
  Files        2356     2358       +2     
  Lines      236570   236665      +95     
  Branches     1195     1202       +7     
==========================================
+ Hits       235697   235787      +90     
- Misses        851      855       +4     
- Partials       22       23       +1     
Impacted Files Coverage Δ
src/definitions/definitions.ts 0.00% <0.00%> (ø)
src/definitions/index.ts 0.00% <0.00%> (ø)
src/definitions/sports.ts 0.00% <0.00%> (ø)
src/locales/ar/sports/team_suffix.ts 100.00% <ø> (ø)
src/locales/el/sports/team_suffix.ts 100.00% <ø> (ø)
src/locales/pl/sports/team_prefix.ts 100.00% <ø> (ø)
src/locales/sv/sports/team_suffix.ts 100.00% <ø> (ø)
src/locales/ur/sports/team_suffix.ts 100.00% <ø> (ø)
src/faker.ts 87.70% <100.00%> (+0.06%) ⬆️
src/index.ts 100.00% <100.00%> (ø)
... and 27 more

@ST-DDT ST-DDT added c: feature Request for new feature p: 1-normal Nothing urgent labels Mar 9, 2023
@ST-DDT
Copy link
Member

ST-DDT commented Mar 9, 2023

Waiting for user interest. If you want/need this feature please upvote this PR.

@ST-DDT ST-DDT added the s: waiting for user interest Waiting for more users interested in this feature label Mar 9, 2023
@ST-DDT ST-DDT added this to the vFuture milestone Mar 9, 2023
@ST-DDT ST-DDT added the breaking change Cannot be merged when next version is not a major release label Mar 9, 2023
@ST-DDT
Copy link
Member

ST-DDT commented Mar 9, 2023

This PR is potentially breaking as it renames some locale data.

@matthewmayer matthewmayer linked an issue Apr 22, 2023 that may be closed by this pull request
@matthewmayer
Copy link
Contributor Author

closing old PR. will make new one if linked issue gets approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Cannot be merged when next version is not a major release c: feature Request for new feature p: 1-normal Nothing urgent s: waiting for user interest Waiting for more users interested in this feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sports teams module
2 participants