Translate string passed to twig's macro does Twig provide any way to translate string which is passed to macro? I thought that it would work in similar way to Wordpress translation function where instead of string I just provide the variable. But it does not work.

Here is my macro:

{% macro input(type, name, placeholder, value, class) %}
&lt;input type="{{ type|default('text') }}" name="{{ name }}" placeholder="{{ placeholder | t}}" value="{{ value | e }}"
       class="{{ class }}"&gt;
{% endmacro %}


Then I call it in this way:

{{ macro.input('text', 'name', 'Name...') }}


I want just to translate the placeholders but when I use | t filter drupal returns the error: 

InvalidArgumentException: $string ("") must be a string. in Drupal\Core\StringTranslation\TranslatableMarkup-&gt;__construct() (line 140 of F:\xampp\htdocs\va\core\lib\Drupal\Core\StringTranslation\TranslatableMarkup.php).


I am aware that input is not great example and I should use form API, it's just the easiest to explain. Is there any way of translating strings which are passed to macros?
I found the solution. The |filter has to be included while calling macro like this:

{{ macro.input('text', 'name', 'Name...' | t) }}