This is outdated. The translation is not done anymore as described below
jstranslate.xml file in the
etc folder of a module and they were automatically added to the translator js object.
I found how to use text translations in Magento 2 but I don't know how to add new ones.
Here is an example on how to use them:
alert($.mage.__('Text to translate here'));