mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
server: Translate login page
This commit is contained in:
@@ -14,6 +14,7 @@ import custom from "./routes/custom.js";
|
||||
import error_handlers from "./routes/error_handlers.js";
|
||||
import { startScheduledCleanup } from "./services/erase.js";
|
||||
import sql_init from "./services/sql_init.js";
|
||||
import { t } from "i18next";
|
||||
|
||||
await import('./services/handlers.js');
|
||||
await import('./becca/becca_loader.js');
|
||||
@@ -29,6 +30,11 @@ sql_init.initializeDb();
|
||||
app.set('views', path.join(scriptDir, 'views'));
|
||||
app.set('view engine', 'ejs');
|
||||
|
||||
app.use((req, res, next) => {
|
||||
res.locals.t = t;
|
||||
return next();
|
||||
});
|
||||
|
||||
if (!utils.isElectron()) {
|
||||
app.use(compression()); // HTTP compression
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user