-
Notifications
You must be signed in to change notification settings - Fork 75
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: Add constants.humanName to allow countries to have custom full name format #7957
Conversation
1a13fc2
to
b66f929
Compare
Your environment is deployed to https://ocrvs-6830-human-name-constant.opencrvs.dev |
b66f929
to
948771b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Siyasanga After taking a look at the changes made to the e2e tests, I would say it's better to change all those places in core to use the new format instead. As if only some of the places use the new format, then it would just create confusion
a2148db
to
c6f8c7a
Compare
40966ab
to
fc69672
Compare
Hi @Zangetsu101, hope you're good. Please review this PR when you have a chance. I have reverted the changes that were trying to generate the I've also removed the changes on the integration tests for the |
const intlBangla = createIntl( | ||
{ | ||
locale: 'en', | ||
messages: {} | ||
}, | ||
cache | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be like so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, thanks Tameem. Fixed
Replace older logic to get the name which was based on an assumption that we support names in multiple languages #6830
We've found cleaner way to make the rendered name customizable for each country through client copy from country-config #6830
We need to update all the places where a citizen's name is being referenced to show it in the format that the country chooses #6830
The expected name should match the format for the given country. #6830
5e12e50
to
8cf8cc0
Compare
@Zangetsu101 @Siyasanga and I dont know why knip is failing here but tests are all passing and think this is ready to merge? |
@Siyasanga What's the status of e2e tests? As long as they are passing, we can merge this in |
They are passing so I will merge this and the related contry-config PR |
@@ -29,6 +29,8 @@ | |||
- A new GraphQL mutation `upsertRegistrationIdentifier` is added to allow updating the patient identifiers of a registration record such as NID [#8034](https://github.com/opencrvs/opencrvs-core/pull/8034) | |||
- A new GraphQL mutation `updateField` is added to allow updating any field in a record [#8291](https://github.com/opencrvs/opencrvs-core/pull/8291) | |||
- Updated GraphQL mutation `confirmRegistration` to allow adding a `comment` for record audit [#8197](https://github.com/opencrvs/opencrvs-core/pull/8197) | |||
- Introduced a new customisable UI component: Banner [#8276](https://github.com/opencrvs/opencrvs-core/issues/8276) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Introduced a new customisable UI component: Banner [#8276](https://github.com/opencrvs/opencrvs-core/issues/8276) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be something irrelevant
…name format (#7957) * Add humanName to constants.ts To allow countries to have custom ordering for full names #6830 * Use constants.humanName on the UserList.tsx comp To ensure that we get the format from the country-config #6830 * Create a utility function getLocalisedname() To make the name more usable we had to extract the name formatting logic into it's own function. #6830 * Use getLocalisedName on the UserList component #6830 * Use getLocalisedName on the UserAudit comp Replace older logic to get the name which was based on an assumption that we support names in multiple languages #6830 * refactor: use getLocalisedName() @ InProgress.tsx We've found cleaner way to make the rendered name customizable for each country through client copy from country-config #6830 * Refactor the work queues to use getLocalisedName() We need to update all the places where a citizen's name is being referenced to show it in the format that the country chooses #6830 * Record changes in the CHANGELOG for this PR #6830 * Use humanName for other search/transformer.ts #6830 * Fix type error 4 the findSavedReference() * Fix faling unit test after using humanName The expected name should match the format for the given country. #6830 * Add the correct local for intlBangla #6830 * Pass intl object for myDrafts transformDraftContent #6830
In order to allow countries to define their own full name format, we are adding a constants.humanName into the client.csv translations, which will then be used everywhere where we are displaying system users and citizen's name in the systems.
Addresses #6830
Countryconfig: opencrvs/opencrvs-countryconfig#314
Farajaland: opencrvs/opencrvs-farajaland#1164