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(company): add realistic Hungarian company names #1758

Merged
merged 2 commits into from Jan 20, 2023

Conversation

BenceSzalai
Copy link
Contributor

Hungarian company names were generated using Hungarian last names but using English conjunctions and legal forms (such as LLC, Inc) that are invalid for the Hungarian context.

The PR generate realistic company names that would be expected to be seen in the wild.

I've added a very typical Hungarian thing, which was very popular in the past: to include the number "2000" in the names. While it is out of fashion nowadays, many companies still have it in their names, so it makes the generated names very everyday like to have some of those.

@BenceSzalai BenceSzalai requested a review from a team as a code owner January 19, 2023 12:19
@ST-DDT ST-DDT added p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug c: locale Permutes locale definitions m: company Something is referring to the company module labels Jan 19, 2023
Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Can you please add a real world example for all patterns (e.g. a (google) link).
The same for suffixes, alternatively a (wiki) link for verification purposes.

@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Merging #1758 (dbe2c2e) into next (1e4e869) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head dbe2c2e differs from pull request most recent head 2006607. Consider uploading reports for the commit 2006607 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1758      +/-   ##
==========================================
- Coverage   99.64%   99.63%   -0.02%     
==========================================
  Files        2337     2340       +3     
  Lines      242589   242605      +16     
  Branches     1103     1098       -5     
==========================================
- Hits       241737   241721      -16     
- Misses        831      863      +32     
  Partials       21       21              
Impacted Files Coverage Δ
src/locales/hu/company/index.ts 100.00% <100.00%> (ø)
src/locales/hu/company/name_patterns.ts 100.00% <100.00%> (ø)
src/locales/hu/company/suffix.ts 100.00% <100.00%> (ø)
src/locales/hu/index.ts 100.00% <100.00%> (ø)
src/modules/internet/user-agent.ts 82.52% <0.00%> (-8.61%) ⬇️
src/modules/internet/index.ts 100.00% <0.00%> (ø)

@BenceSzalai
Copy link
Contributor Author

@ST-DDT

You can see the list of real company structure abbreviations on Wikipedia.

  • Note that "Kht." is no longer available since 30/june/2009, it is just listed for historical reasons. I did not add it to the code.

  • "Kft." & "Zrt." are analogue to LLC/Ltd. depending on jurisdiction. Both are very popular forms, there are plenty of examples out there, e.g. the state monopoly for gambling: Szerencsejáték Zrt. or the Hungarian branches of the well known KPMG (See KPMG Hungária Kft./ KPMG Tanácsadó Kft. / KPMG Global Services Hungary Kft. in the footer...)

  • "Nyrt." means publicly traded company, one of the most prominent example is the Hungarian branch of Deutsche Telekom: Magyar Telekom Nyrt.

  • "Bt.", "Kv." are more special forms to Hungary, not sure about analouge forms in other countries, but the former is very common. For example together with 2000, just make a Google search for "2000 bt" but "2000 Kft" is very common as well.

  • Another pattern "és Tsa." (means "& Co.") has plenty of examples as well on Google "és Tsa."

The rest of the generation logic is similar to the default: Use a last name to base the name on with these suffixes and additions.

Note that in many occasions people tend to omit the terminating dot and stylize some of the abbreviations e.g. "NyRT" instead of "Nyrt.", but using the dot and only capitalising the first one is supposed to be the standard way of writing these abbreviations. Although noone really cares.

@Shinigami92 Shinigami92 enabled auto-merge (squash) January 20, 2023 20:59
@Shinigami92 Shinigami92 merged commit 2e6b136 into faker-js:next Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: locale Permutes locale definitions m: company Something is referring to the company module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants