mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	All hail the glorious translation prebuilding
This commit is contained in:
		| @@ -183,23 +183,6 @@ middleware.applyBlacklist = function (req, res, next) { | ||||
| 	}); | ||||
| }; | ||||
|  | ||||
| middleware.getTranslation = function (req, res, next) { | ||||
| 	var language = req.params.language; | ||||
| 	var namespace = req.params[0]; | ||||
|  | ||||
| 	if (language && namespace) { | ||||
| 		languages.get(language, namespace, function (err, translations) { | ||||
| 			if (err) { | ||||
| 				return next(err); | ||||
| 			} | ||||
|  | ||||
| 			res.status(200).json(translations); | ||||
| 		}); | ||||
| 	} else { | ||||
| 		res.status(404).json('{}'); | ||||
| 	} | ||||
| }; | ||||
|  | ||||
| middleware.processTimeagoLocales = function (req, res, next) { | ||||
| 	var fallback = req.path.indexOf('-short') === -1 ? 'jquery.timeago.en.js' : 'jquery.timeago.en-short.js', | ||||
| 		localPath = path.join(__dirname, '../../public/vendor/jquery/timeago/locales', req.path), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user