Refactor adding and updating translations