(core) updates from grist-core

This commit is contained in:
Paul Fitzpatrick
2022-10-24 10:53:18 -04:00
12 changed files with 296 additions and 70 deletions

View File

@@ -12,6 +12,8 @@ import jsesc from 'jsesc';
import * as handlebars from 'handlebars';
import * as path from 'path';
const translate = (req: express.Request, key: string, args?: any) => req.t(`sendAppPage.${key}`, args);
export interface ISendAppPageOptions {
path: string; // Ignored if .content is present (set to "" for clarity).
content?: string;
@@ -155,7 +157,7 @@ function configuredPageTitleSuffix() {
*/
function getPageTitle(req: express.Request, config: GristLoadConfig): string {
const maybeDoc = getDocFromConfig(config);
if (!maybeDoc) { return req.t('Loading') + "..."; }
if (!maybeDoc) { return translate(req, 'sendAppPage.Loading') + "..."; }
return handlebars.Utils.escapeExpression(maybeDoc.name);
}