I have an notifications array in my controller and then on different events push a string (translate key) into it. For example, my json:
{
'orderAccepted': 'Your order with id #{{order.id}} was accepted'
}
I have a value order['id'], but in view it shows 'Your order with id # was accepted'. Other translations without values works. My ng-repeat:
<ul>
<li data-ng-repeat="notification in notifications | limitTo: -5 track by $index">{{notification | translate}}</li>
</ul>
You should figure out how to construct an array with objects for your notifications that contain the translation keys and any additional information. Then you should add your variable that you want to display like this:
{
'orderAccepted': 'Your order with id #{{orderId}} was accepted'
}
And the html:
<li data-ng-repeat="notification in notifications | limitTo: -5 track by $index">
{{notification.translationKey | translate:'{ orderId: notification.orderId}'}}
</li>
Or try using translate as directive:
<li data-ng-repeat="notification in notifications | limitTo: -5 track by $index"
translate="{{notification.translationKey}}"
translate-values="{ orderId: notification.orderId }"></li>
You just need to figure out how your notification object will look like and where to store your order id.
See the docs