In a Magento Knockout template I find a function like so:
<element data-bind="something: function() {
return 'some string';
}" />
How can I translate this string? I tried following, but it does not work:
<element data-bind="something: function() {
return $t('some string');
}" />
The translation exists and works in other places, so that is not the problem.