GC Digital Talent is the new recruitment platform for digital and tech jobs in the Government of Canada. // Talents numériques du GC est la nouvelle plateforme de recrutement pour les emplois numériques et technologiques au gouvernement du Canada.
Update the localized enums to only send the current locale as a label.
🕵️ Details
Our localized enums must send both English and French strings due to a limitation of laravel not being aware of the clients current locale. This limitation will be lifted after https://github.com/GCTC-NTGC/gc-digital-talent/issues/11336 so we would like to start sending just the current locale.
[!NOTE]
We should maintain the ability to get both languages at once since we still need this for snapshots since that data is static.
🙋♀️ Proposed Solution
Update the HasLocalization trait to send a single, translated string based on laravels set locale
Update the types registered with graphql so they return the current locale string in addition to the existing data
Update our client code to use the single string where appropriate
✅ Acceptance Criteria
[ ] Localized enums can get the label for a case based on laravels locale
[ ] You can retrieve a single string for labels from graphql
[ ] PHPUnit test to confirm you get the expected string back
[ ] Client updated where necessary
🛑 Blockers
### Blocked By
- [ ] https://github.com/GCTC-NTGC/gc-digital-talent/issues/11336
♻️ Debt/Refactor
Update the localized enums to only send the current locale as a label.
🕵️ Details
Our localized enums must send both English and French strings due to a limitation of laravel not being aware of the clients current locale. This limitation will be lifted after https://github.com/GCTC-NTGC/gc-digital-talent/issues/11336 so we would like to start sending just the current locale.
🙋♀️ Proposed Solution
HasLocalization
trait to send a single, translated string based on laravels set locale✅ Acceptance Criteria
🛑 Blockers