Skip to content

Node.js based forum software built for the modern web

Better deprecation warning for old language route

Peter Jaszkowiakbf44ca20f2f1
diff --git a/src/routes/index.js b/src/routes/index.js
index 158774b624..13633f2bc8 100644
--- a/src/routes/index.js
+++ b/src/routes/index.js
@@ -152,7 +152,7 @@ module.exports = function (app, middleware, hotswapIds) {
// DEPRECATED
app.use(relativePath + '/api/language', function (req, res) {
winston.warn('[deprecated] Accessing language files from `/api/language` is deprecated. ' +
- 'Use `/assets/language/[langCode]/[namespace].json` for prefetch paths.');
+ 'Use `/assets/language' + req.path + '.json` for prefetch paths.');
res.redirect(relativePath + '/assets/language' + req.path + '.json?' + meta.config['cache-buster']);
});