Bug 952078 - Latin.js should rely on return values from inputmethod

Promisify latin.js