Updated registerCommandTranslator by also adding the closure as second argument