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

Localize format patterns for company.name #1179

Closed
ST-DDT opened this issue Jul 22, 2022 · 6 comments · Fixed by #1293
Closed

Localize format patterns for company.name #1179

ST-DDT opened this issue Jul 22, 2022 · 6 comments · Fixed by #1293
Assignees
Labels
c: locale Permutes locale definitions c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs good first issue Good for newcomers m: company Something is referring to the company module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug

Comments

@ST-DDT
Copy link
Member

ST-DDT commented Jul 22, 2022

Clear and concise description of the problem

const formats = [
'{{name.lastName}} {{company.companySuffix}}',
'{{name.lastName}} - {{name.lastName}}',
'{{name.lastName}}, {{name.lastName}} and {{name.lastName}}',
];

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:

export default [
'{{name.last_name}} {{company.suffix}}',
'{{name.last_name}}-{{name.last_name}}',
'{{name.last_name}}, {{name.last_name}} and {{name.last_name}}',
];

but there is nothing for that in:
export type CompanyDefinitions = LocaleEntry<{

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

@ST-DDT ST-DDT added s: pending triage Pending Triage good first issue Good for newcomers p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs c: locale Permutes locale definitions and removed s: pending triage Pending Triage labels Jul 22, 2022
@ST-DDT ST-DDT added this to the v7 - Current Major milestone Jul 22, 2022
@ST-DDT ST-DDT moved this to Awaiting Review in Faker Roadmap Jul 22, 2022
@ST-DDT
Copy link
Member Author

ST-DDT commented Jul 22, 2022

@Shinigami92 Do you consider this a breaking change?

@xDivisionByZerox xDivisionByZerox added the m: company Something is referring to the company module label Jul 29, 2022
@Minozzzi
Copy link
Contributor

Minozzzi commented Aug 1, 2022

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

@ST-DDT
Copy link
Member Author

ST-DDT commented Aug 1, 2022

There is #1216 already.

@Shinigami92
Copy link
Member

There is #1216 already.

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

@ST-DDT
Copy link
Member Author

ST-DDT commented Aug 4, 2022

Oh yeah, you are right.

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

@Minozzzi
Copy link
Contributor

Minozzzi commented Aug 5, 2022

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

Repository owner moved this from Awaiting Review to Done in Faker Roadmap Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: locale Permutes locale definitions c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs good first issue Good for newcomers 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 a pull request may close this issue.

4 participants