fix(translations): Ensure missing keys display original text instead of prefixed labels (#2319)

- Added a custom `MissingTranslationHandler` in `app.module.ts` to remove `labels.catalogs.` prefix
  when a translation key is not found.
- Updated `TranslateModule` configuration to use the custom handler globally.
- Ensured that missing translations fall back to the original value.
- Removed an unnecessary change from `address-tab.component.ts` introduced in a previous PR, as the
  current implementation resolves the issue more effectively.
This commit is contained in:
Abhinav R Cillanki
2025-03-15 22:27:48 -06:00
committed by GitHub
parent ea493973ed
commit 2da6093955
2 changed files with 16 additions and 3 deletions
@@ -156,7 +156,7 @@ export class AddressTabComponent {
for (let index = 0; index < this.clientAddressTemplate.addressTypeIdOptions.length; index++) {
this.clientAddressTemplate.addressTypeIdOptions[index].name = this.translateService.instant(
`${this.clientAddressTemplate.addressTypeIdOptions[index].name}`
`labels.catalogs.${this.clientAddressTemplate.addressTypeIdOptions[index].name}`
);
}