Let's say I have the following code:
define([
'jquery',
'mage/translate',
], function (
$,
$t
) {
'use strict';
return function (str) {
//Rest of codes to determine output
return $t(return_string);
});
}
I have all possible values of return_string
on translate file. But it fails to translate at all on frontend. What can I do here to make return_string
return translated string?