async function registerMessageCatalog(namespace,dir,file) {
    return initPromise.then(function() {
        return new Promise((resolve,reject) => {
            resourceMap[namespace] = { basedir:dir, file:file, lngs: []};
            fs.readdir(dir,function(err, files) {
                if (err) {
                    resolve();
                } else {
                    files.forEach(function(f) {
                        if (fs.existsSync(path.join(dir,f,file))) {
                            resourceMap[namespace].lngs.push(f);
                        }
                    });
                    i18n.loadNamespaces(namespace,function() {
                        resolve();
                    });
                }
            })
        });
    });
}
Register a message catalog with i18n.
@memberof @node-red/util_i18n