Delete trailing whitespace.
Support translate and instantiate hooks that return promises.