I am using i18n to translate my Angular 2 application. I need to send a variable to a translation unit from ts.
I have the following trans-unit:
<trans-unit id="summary_hotel_tax" datatype="html">
<source>In <x id='INTERPOLATION' equiv-text='{{ citiesList }}'/> are taxes</source>
<target>A <x id='INTERPOLATION' equiv-text='{{ citiesList }}'/> pagare tassa turistica</target>
</trans-unit>
I have tried to do the following in my hotel.ts (component):
$ localize`:@@summary_hotel_tax:In $ {citiesList} are taxes`;
But it does not work.
I get the error:
ERROR in There is a placeholder name mismatch with the translation provided for the
message "summary_hotel_tax" ("In {$PH} are taxes").The translation contains a
placeholder with name INTERPOLATION, which does not exist in the message.
I understand that maybe it wouldn't be an interpolation when using $localize, in which case how should I structure my trans-unit to send it a variable from $localize.