Repository: angular
Issue: i18n: No translation found for "id"
Labels: area: i18n

### Which @angular/* package(s) are the source of the bug?

localize

### Is this a regression?

No

### Description

I am trying to implement runtime translations and am encountering warnings for some strings that state "No translation found for 'id'." I am trying to avoid using custom ids for this project as it is large and I would like to rely on built-in message ids.

I am using the command ng extract-i18n --format=xliff2 --out-file src/assets/i18n/translations.en-us.xlf to generate a translation file, which I then convert to JSON using a similar method described in this Github issue: https://github.com/angular/angular/issues/38953. I then use the loadTranslations() method to load the file.

My understanding is that when I run ng extract-i18n, the computeDigest() function generates the message id. When the application starts, loadTranslations() calls computeMsgId(), which generates message id in the same format as that rendered to "simple JSON" translation files when extracting messages. However, in my case, the extract generates different ids for the same string in xliff2 vs JSON formats, which is causing the warnings. (Not for all strings, but for some).

I have created a JSON object from xliff 2 extracted messages and compared it to the one extracted with JSON, and there were a couple of discrepancies: 

1.
For the next template:
```html
<p>text {{ test1 }}</p>
<p>text {{ test2 }}</p>
```

xliff2 extractor produced two records, while json extractor created only one record

2.
xliff 2 generates a different id compared to JSON for the same string in some cases. I have around 300 differences out of approx. 4500 strings. I looked through closed problems and saw that there was a problem with mapping for xliff 1.2 and some legacy id migration, but I am working with Angular 14 and xliff 2 format so I hoped this shouldn't be a problem anymore...

At this stage I can only see 2 solutions to my problem:
1. Using simple JSON format during extract, which is not ideal for the translation team as it doesn't have context implemented.
2. Using custom ids, which I am trying to avoid as it would require another pass through the code base.

Could someone please verify that at this stage there is nothing else that can be done?
It just seems odd that the ids are different... 




### Please provide a link to a minimal reproduction of the bug

_No response_

### Please provide the exception or error you saw

```true
template.html:15 No translation found for "7324656422629038198" (" No results found yet. ").
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 14.2.5
Node: 16.18.0
Package Manager: npm 9.2.0 
OS: win32 x64

Angular: 14.2.5
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router, service-worker

Package                         Version
---------------------------------------------------------       
@angular-devkit/architect       0.1402.5
@angular-devkit/build-angular   14.2.5
@angular-devkit/core            14.2.5
@angular-devkit/schematics      14.2.5
@angular/cdk                    14.2.4
@angular/material               14.2.4
@schematics/angular             14.2.5
rxjs                            7.5.7
typescript                      4.8.4
```


### Anything else?

_No response_