faker
faker copied to clipboard
Remove hardcoded fallback patterns from company.name
https://github.com/faker-js/faker/blob/e1f26a6d2c79f3d9540f1890669631aca0fe5527/src/modules/company/index.ts#L47-L54
In v8, it should only use the locale data.
Could you assign to me?
Could you assign to me?
Sure!
Guys. Is it valid if I put the en company name_patterns locale to other locales that do not have company name_patterns locales?
Locales that do not have company.name_patterns
- ./src/locales/af_ZA/company
- ./src/locales/en_AU/company
- ./src/locales/en_AU_ocker/company
- ./src/locales/en_IND/company
- ./src/locales/en_NG/company
- ./src/locales/en_ZA/company
- ./src/locales/ne/company
- ./src/locales/nl/company
- ./src/locales/nl_BE/company
- ./src/locales/zu_ZA/company
- ./src/locales/af_ZA/company
- ./src/locales/ne/company
- ./src/locales/nl/company
- ./src/locales/zu_ZA/company
At least these are the most important ons as the others could theoretically be defined with their fallbacks
But to answer your question: not directly, it would be better to directly make it right instead of just copy something over
Ok, I searched for af_ZA company patterns but I didn't find anything about this. How I should search?
Hi @Minozzzi we released the final v7 and now going into development for v8 Please create a PR that removes the hard coded fallback, so that we can review and merge it
I don't exactly have the correct pattern for company names in these locales, would there be any correct way to search?
You dont have to search. Just remove the hardcoded pattern. If a user needs a pattern for that locale, they will hopefully contact us with the right pattern or they will use the en locale fallback.
I don't exactly have the correct pattern for company names in these locales, would there be any correct way to search?
Yeah, you might have misunderstood something :slightly_smiling_face:
Just remove staticFormats that was marked with ToDo
https://github.com/faker-js/faker/blob/1ab33c5caf323d25bd21b3b3afaf8af3686207b4/src/modules/company/index.ts#L51-L56
Ohh, I really got it wrong, sorry for the long time gone by. I'll adjust it
sorry for the long time gone by
No need to be sorry! You actually can even now start with it, as before we were on v7.