Make emails translatable
This commit is contained in:
@@ -5,7 +5,6 @@ exports = module.exports = {
|
||||
uninitialize,
|
||||
getConfig,
|
||||
getLogs,
|
||||
getLanguages,
|
||||
|
||||
reboot,
|
||||
isRebootRequired,
|
||||
@@ -280,28 +279,6 @@ function getLogs(unit, options, callback) {
|
||||
return callback(null, transformStream);
|
||||
}
|
||||
|
||||
function getLanguages(callback) {
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
// we always return english to avoid dashboard breakage
|
||||
var languages = ['en'];
|
||||
|
||||
fs.readdir(path.join(paths.DASHBOARD_DIR, 'translation'), function (error, result) {
|
||||
if (error) {
|
||||
console.error('Failed to list translations', error);
|
||||
return callback(null, languages);
|
||||
}
|
||||
|
||||
var jsonFiles = result.filter(function (file) { return path.extname(file) === '.json'; });
|
||||
console.log(jsonFiles);
|
||||
|
||||
languages = jsonFiles.map(function (file) { return path.basename(file, '.json'); });
|
||||
console.log(jsonFiles);
|
||||
|
||||
callback(null, languages);
|
||||
});
|
||||
}
|
||||
|
||||
function prepareDashboardDomain(domain, auditSource, callback) {
|
||||
assert.strictEqual(typeof domain, 'string');
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
|
||||
Reference in New Issue
Block a user