Allow translate directive to be element

I can't get the Karma tests working locally (even on master) so no idea if this is correct. But it's a start.