mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #7289 timeago shorthand toggle fails on non-existant language
- Exposing timeagoCodes to frontend - Timeago language and shorthand toggling will fall back to 'en' if the requested language does not exist
This commit is contained in:
@@ -12,6 +12,7 @@ var categories = require('../categories');
|
||||
var privileges = require('../privileges');
|
||||
var plugins = require('../plugins');
|
||||
var translator = require('../translator');
|
||||
var languages = require('../languages');
|
||||
|
||||
var apiController = module.exports;
|
||||
|
||||
@@ -62,6 +63,7 @@ apiController.loadConfig = function (req, callback) {
|
||||
config.bootswatchSkin = meta.config.bootswatchSkin || '';
|
||||
config.enablePostHistory = (meta.config.enablePostHistory || 1) === 1;
|
||||
config.notificationAlertTimeout = meta.config.notificationAlertTimeout || 5000;
|
||||
config.timeagoCodes = languages.timeagoCodes;
|
||||
|
||||
if (config.useOutgoingLinksPage) {
|
||||
config.outgoingLinksWhitelist = meta.config['outgoingLinks:whitelist'];
|
||||
|
||||
Reference in New Issue
Block a user