Like a few add-on developers I’m currently porting as much of my extension as possible to WebExtensions. With using WebExtensions there’s no longer built in support to translate a HTML page (instead you’d want to swap out pages etc.).
I decided to see if it would be faster to just write a script that emulates what the Add-on SDK service did and it turns out, yes it was. Way faster than migrating to a different system.
You can find the result on https://gist.github.com/freaktechnik/4a72bc0711d9bc82cf3b075bcc292953
It does pretty much the same as what the SDK did, except that it doesn’t hide everything until the document is translated, so in the worst case there can be a quick flash of the original strings.