I had spent more than 3 hours, but did not find solution.
If subscribe field on home page empty we will get JS message 'This is a required field.' How it may be translated by inline translate (using book on FE). When I inserted to the table TRANSLATE (by sql) string manually, it's working. So, how show book for inline translation for js popups errors?
I try use this in my subscribe.phtml, but this not work correctly (translated data added to DB, but original string "This is a required field." is empty. why?)
<script>
require([
'jquery',
'jquery/ui',
'mage/translate'
], function ($) {
$(window).load(function () {
$.mage.__(<?php echo json_encode(__('This is a required field.'))?>);
});
});
</script>