faker icon indicating copy to clipboard operation
faker copied to clipboard

Localize format patterns for company.name

Open ST-DDT opened this issue 3 years ago • 6 comments

Clear and concise description of the problem

https://github.com/faker-js/faker/blob/fbddaa39e830e1ac44e7821d219ca7859af79e95/src/modules/company/index.ts#L37-L41

Currently the patterns are hardcoded to match English company names.

Suggested solution

The patterns should be localized so other locales can define custom patterns.

Alternative

No response

Additional context

There seems to be patterns/files for that already, but these needs to be checked/defined and referenced: https://github.com/faker-js/faker/blob/fbddaa39e830e1ac44e7821d219ca7859af79e95/src/locales/en/company/name.ts#L1-L5 but there is nothing for that in: https://github.com/faker-js/faker/blob/fbddaa39e830e1ac44e7821d219ca7859af79e95/src/definitions/company.ts#L6

There are also other PRs that work on the method so this should only be done after both:

  • https://github.com/faker-js/faker/pull/1166
  • https://github.com/faker-js/faker/issues/1178

ST-DDT avatar Jul 22 '22 02:07 ST-DDT

@Shinigami92 Do you consider this a breaking change?

ST-DDT avatar Jul 22 '22 02:07 ST-DDT

Hello guys. I woud like contribute with this task.Can you guys assign to me?

Minozzzi avatar Aug 01 '22 16:08 Minozzzi

There is https://github.com/faker-js/faker/pull/1216 already.

ST-DDT avatar Aug 01 '22 16:08 ST-DDT

There is #1216 already.

But it looks like that it is for the name module but this issue is about company.name 🤔 is it?

Shinigami92 avatar Aug 04 '22 07:08 Shinigami92

Oh yeah, you are right.

@Minozzzi I assigned you, because you asked first. If you are not longer interested please leave a comment.

ST-DDT avatar Aug 04 '22 18:08 ST-DDT

Alright @ST-DDT . I will try to contribute as best I can to this issue. 😀

Minozzzi avatar Aug 05 '22 16:08 Minozzzi