How to add i18n to a plugin’s Twig template files?

Here’s how the Timber plugin handles this:

$twig->addFunction( '__', new Twig_SimpleFunction( '__', function ( $text, $domain = 'default' ) {
    return __( $text, $domain );
} ) );

I’m guessing you’re doing something similar, in which case the reason these are being skipped is that you’re using a variable for the text domain. Have you tried hard-coding the text domain?

$twig->addFunction( '__', new Twig_SimpleFunction( '__', function ( $text ) {
    return __( $text, 'your-text-domain' );
} ) );

If that’s not an option or it doesn’t work you’ll need to handle all of the translation in PHP and pass the translated text to your Twig templates as suggested by another commenter.