i18nucleus-onesky
Version:
OneSky translation provider middleware for i18nucleus
38 lines (30 loc) • 847 B
JavaScript
/*
* Available options:
* - publicKey: String - Required. For OneSky account connection.
* - secretKey: String - Required. For OneSky account connection.
* - platformId: String - Required. ID of specific OneSky account platform with resources.
* - ignoredNamespaces: [String] - Optional. List of namespaces to be ignored.
*/
exports = module.exports = function (options, utils) {
options = options || {};
if (!options.publicKey) {
return {
err: 'OneSky Public Key not defined'
};
}
if (!options.secretKey) {
return {
err: 'OneSky Secret Key not defined'
};
}
if (!options.platformId) {
return {
err: 'OneSky project platform ID not defined'
};
}
options.ignoredNamespaces = utils.arrayize(options.ignoredNamespaces);
return {
err: null
, options: options
};
};