I am trying to use something like this in a view:
{{ mb.esc_html__( 'Text to be translated', 'my-domain' ) }},
which shows on a page where the view is included, but doesn't show up in WPML String Translation.
The view content is saved to the database as a post so I'm not sure if WPML String Translation can scan the post to find the string. You should use the PHP code to let that plugin scan the code to translate the string.