diff options
Diffstat (limited to 'lib/output/website/prepareI18n.js')
-rw-r--r-- | lib/output/website/prepareI18n.js | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/output/website/prepareI18n.js b/lib/output/website/prepareI18n.js deleted file mode 100644 index cedd3b9..0000000 --- a/lib/output/website/prepareI18n.js +++ /dev/null @@ -1,30 +0,0 @@ -var path = require('path'); - -var fs = require('../../utils/fs'); -var Promise = require('../../utils/promise'); -var listSearchPaths = require('./listSearchPaths'); - -/** - * Prepare i18n, load translations from plugins and book - * - * @param {Output} - * @return {Promise<Output>} - */ -function prepareI18n(output) { - var state = output.getState(); - var i18n = state.getI18n(); - var searchPaths = listSearchPaths(output); - - searchPaths - .reverse() - .forEach(function(searchPath) { - var i18nRoot = path.resolve(searchPath, '_i18n'); - - if (!fs.existsSync(i18nRoot)) return; - i18n.load(i18nRoot); - }); - - return Promise(output); -} - -module.exports = prepareI18n; |