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: Add constants.humanName to allow countries to have custom full name format #7957

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

Siyasanga
Copy link
Collaborator

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

@Siyasanga Siyasanga force-pushed the ocrvs-6830-human-name-constant branch from 1a13fc2 to b66f929 Compare November 14, 2024 08:32
@Siyasanga Siyasanga added the 🚀 Ready to deploy Deployment automation should pick this PR up and start auto-deploying it label Nov 14, 2024
@github-actions github-actions bot temporarily deployed to ocrvs-6830-human-name-constant November 14, 2024 08:36 Inactive
@Siyasanga Siyasanga marked this pull request as ready for review November 14, 2024 08:42
@ocrvs-bot
Copy link
Collaborator

Your environment is deployed to https://ocrvs-6830-human-name-constant.opencrvs.dev

@Siyasanga Siyasanga temporarily deployed to ocrvs-6830-human-name-constant November 14, 2024 08:46 — with GitHub Actions Inactive
@Siyasanga Siyasanga self-assigned this Nov 14, 2024
@Siyasanga Siyasanga added this to the v1.7.0 milestone Nov 14, 2024
@Siyasanga Siyasanga force-pushed the ocrvs-6830-human-name-constant branch from b66f929 to 948771b Compare November 14, 2024 09:55
@Siyasanga Siyasanga temporarily deployed to ocrvs-6830-human-name-constant November 14, 2024 09:55 — with GitHub Actions Inactive
@Siyasanga Siyasanga temporarily deployed to ocrvs-6830-human-name-constant November 14, 2024 11:32 — with GitHub Actions Inactive
@Siyasanga Siyasanga temporarily deployed to ocrvs-6830-human-name-constant November 14, 2024 23:34 — with GitHub Actions Inactive
Copy link
Collaborator

@Zangetsu101 Zangetsu101 left a 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

@Zangetsu101 Zangetsu101 added 🔧Waiting for fixes and removed 🚀 Ready to deploy Deployment automation should pick this PR up and start auto-deploying it labels Nov 22, 2024
@Siyasanga Siyasanga force-pushed the ocrvs-6830-human-name-constant branch from a2148db to c6f8c7a Compare December 18, 2024 22:30
@Siyasanga Siyasanga force-pushed the ocrvs-6830-human-name-constant branch 3 times, most recently from 3375112 to 40966ab Compare January 15, 2025 07:36
To allow countries to have custom ordering for full names

#6830
To ensure that we get the format from the country-config

#6830
To make the name more usable we had to extract the name formatting logic into it's own function.

#6830
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
@Siyasanga Siyasanga force-pushed the ocrvs-6830-human-name-constant branch from 40966ab to fc69672 Compare January 15, 2025 07:38
@Siyasanga Siyasanga added 🚀 Ready to deploy Deployment automation should pick this PR up and start auto-deploying it and removed 🔧Waiting for fixes labels Jan 15, 2025
@github-actions github-actions bot temporarily deployed to ocrvs-6830-human-name-constant January 15, 2025 07:48 Inactive
@Siyasanga
Copy link
Collaborator Author

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 full name for the form field in the review screens as we had discussed. I also removed the assertions that were trying to prove that the name is customisable via the config. We'll only depend on the unit tests for now untill we get a country that uses full name that is different to farajahland.

I've also removed the changes on the integration tests for the Farajahland repo.

@Siyasanga Siyasanga temporarily deployed to ocrvs-6830-human-name-constant January 15, 2025 07:54 — with GitHub Actions Inactive
@Siyasanga Siyasanga temporarily deployed to ocrvs-6830-human-name-constant January 16, 2025 06:51 — with GitHub Actions Inactive
@Siyasanga Siyasanga deployed to ocrvs-6830-human-name-constant January 17, 2025 06:16 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Ready to deploy Deployment automation should pick this PR up and start auto-deploying it 💅 Waiting For Review
Projects
Status: In Code Review
3 participants