X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=cards%2Fwidgets.sh;fp=cards%2Fwidgets.sh;h=8b5b986623c6100a2e42e2f2437318a4f9680df3;hb=bc64e33d311a63c0812b7f7e41aa85b7c48c5155;hp=ab317fb8afd586b4a2cd5e31947ebeee57b676ef;hpb=c9904c5894c95fa9735cd3d330f9c7377be54281;p=lobster diff --git a/cards/widgets.sh b/cards/widgets.sh index ab317fb..8b5b986 100755 --- a/cards/widgets.sh +++ b/cards/widgets.sh @@ -111,9 +111,10 @@ card_item(){ [ $cnt -gt 0 ] && printf '[h3 %s]' "$(l10n TEL)" seq 1 $cnt |while read c; do teltype="$(pdi_attrib "$card" TEL $c TYPE)" + ttl10="$(l10n "TYPE=$teltype")" # See below: HTML-Escape teltype if there is no translation (translations are always pre escaped) [ "$teltype" ] \ && printf '[span .item .TEL [span .type . %s:] %s]' \ - "$(l10n "TYPE=$teltype" |HTML)" \ + "$([ "$ttl10" = "TYPE=$teltype" ] && { printf %s "$ttl10" |HTML; } || printf %s "$ttl10")" \ "$(pdi_value "$card" TEL $c |pdi_unescape |HTML)" \ || printf '[span .item .TEL . %s]' \ "$(pdi_value "$card" TEL $c |pdi_unescape |HTML)"