feat(directive): translate attributes using directive

translate directive can process attributes now. as per #568