Closed rogerholtenok closed 2 months ago
Hi @rogerholtenok - yes this appears to be a mistake. We have a separate pipe for handling dynamic strings like this:
<span>{{ '#LDS#Show selected ({0})' | translate | ldsReplace: selectionService.selectedProducts.length }}</span>
The ldsReplace pipe can be used with an arbitrary amount of values.
Note: for clarity and consistenty I moved the translate into the piped form as well.
I'll mark this as a bug for someone to change.
Created an internal ticket: 453124
After you select one or more products, the button for showing selected products does not use the translated value as seen here:
It looks like the translation service can't handle when selectionService.selectedProducts.length is updated on this line in new-request-content.component.html:
<button mat-stroked-button (click)="openSelected()"><eui-icon icon="check"></eui-icon> <span translate>#LDS#Show selected ({{ selectionService.selectedProducts.length }})</span></button>
Splitting the constant part of the string out into its own span tag appeared to have fixed it for us as "Show selected" is also a translatable string:
<button mat-stroked-button (click)="openSelected()"><eui-icon icon="check"></eui-icon> <span translate>#LDS#Show selected</span><span> ({{ selectionService.selectedProducts.length }})</span></button>
Kind regards, Roger Holten