feat: Views localization

This commit is contained in:
NGPixel
2017-05-02 21:41:22 -04:00
parent ea2d98c9b6
commit 40c4ff80f4
19 changed files with 128 additions and 69 deletions

View File

@@ -163,7 +163,7 @@ module.exports = {
let fpath = path.resolve(this._uploadsPath, fld, f)
return fs.statAsync(fpath).then((s) => {
throw new Error('File ' + f + ' already exists.')
throw new Error(lang.t('errors:fileexists', { path: f }))
}).catch((err) => {
if (err.code === 'ENOENT') {
return f