All js and html files are parsed for string that should be translated (f.e. strings from "$.mage.__()" or "i18n:").
Collected string are translated and outputted to js-translation.json file.
Dictionary strategy is better for development. Js files remain untouched.
All js and html files are intercepted during publishing to pub/static and translation calls are replaced with result translated strings.
Embedded strategy is better on production. This strategy is performing translation only once on backend and avoids additional request for translation dictionary, so it has some positive effect on frontend performance.
Embedded strategy can not work in developer mode when static content is published using symlinks.
Patterns used to find string to translate for both strategies are configured in DI.