Ionic/Angular 布尔字符串的翻译

Ionic/Angular translation of a boolean string

我想翻译以下字符串:

{{order.shipped?'Shipped':'No Shipped'}}

所以我所做的是添加 |翻译:

{{order.shipped?'Shipped':'No Shipped' | translate}}

在 json 语言文件中,我尝试翻译整个字符串:

 "order.shipped?'Shipped':'No Shipped'":"order.shipped?'geschlossen':'offen'"

但也只有'Shipped':'No Shipped'的部分。但是,这两种选择都不起作用。所以我试着分别翻译两个字符串:

{{order.shipped?'{{'Shipped' |翻译}}':'No Shipped'}}

我也尝试过使用 ' 或 " 或像 '' 这样封闭的替代方案。 你知道我如何翻译整个字符串吗?

函数怎么样?

orderFunc(order){
  return order.shipped?'Shipped':'No Shipped';
}
...
{{orderFunc(order) | translate}}