added translations to dialogs.js as per #161

dialogs.js can now handle translations, and the locale translations keys have been added to support this, as per #161