mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-10 01:23:04 +01:00
fix: browser title translation
This commit is contained in:
@@ -150,6 +150,7 @@ module.exports = function (middleware) {
|
||||
async function loadClientHeaderFooterData(req, res, options) {
|
||||
const registrationType = meta.config.registrationType || 'normal';
|
||||
res.locals.config = res.locals.config || {};
|
||||
const userLang = res.locals.config.userLang || meta.config.userLang || 'en-GB';
|
||||
const templateValues = {
|
||||
title: meta.config.title || '',
|
||||
'title:url': meta.config['title:url'] || '',
|
||||
@@ -180,9 +181,9 @@ module.exports = function (middleware) {
|
||||
blocks: user.blocks.list(req.uid),
|
||||
user: user.getUserData(req.uid),
|
||||
isEmailConfirmSent: req.uid <= 0 ? false : await user.email.isValidationPending(req.uid),
|
||||
languageDirection: translator.translate('[[language:dir]]', res.locals.config.userLang),
|
||||
timeagoCode: languages.userTimeagoCode(res.locals.config.userLang),
|
||||
browserTitle: translator.translate(controllersHelpers.buildTitle(title)),
|
||||
languageDirection: translator.translate('[[language:dir]]', userLang),
|
||||
timeagoCode: languages.userTimeagoCode(userLang),
|
||||
browserTitle: translator.translate(controllersHelpers.buildTitle(title), userLang),
|
||||
navigation: navigation.get(req.uid),
|
||||
roomIds: req.uid > 0 ? db.getSortedSetRevRange(`uid:${req.uid}:chat:rooms`, 0, 0) : [],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user