Set manifests to english
This commit is contained in:
parent
f0cd76a55d
commit
7518b43881
1 changed files with 21 additions and 12 deletions
|
@ -1,5 +1,6 @@
|
||||||
// We HAVE to mark this while importing
|
// We HAVE to mark this while importing
|
||||||
import {Utils} from "../Utils";
|
import {Utils} from "../Utils";
|
||||||
|
|
||||||
Utils.runningFromConsole = true;
|
Utils.runningFromConsole = true;
|
||||||
const sharp = require('sharp');
|
const sharp = require('sharp');
|
||||||
|
|
||||||
|
@ -114,6 +115,7 @@ async function createIcon(iconPath: string, size: number, layout: LayoutConfig)
|
||||||
async function createManifest(layout: LayoutConfig, relativePath: string) {
|
async function createManifest(layout: LayoutConfig, relativePath: string) {
|
||||||
const name = layout.id;
|
const name = layout.id;
|
||||||
|
|
||||||
|
Translation.forcedLanguage = "en"
|
||||||
const icons = [];
|
const icons = [];
|
||||||
|
|
||||||
let icon = layout.icon;
|
let icon = layout.icon;
|
||||||
|
@ -194,14 +196,21 @@ async function createLandingPage(layout: LayoutConfig) {
|
||||||
writeFileSync(icon, layout.icon);
|
writeFileSync(icon, layout.icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let themeSpecific = [
|
||||||
|
`<title>${ogTitle}</title>`,
|
||||||
|
`<link rel="manifest" href="${enc(layout.id)}.webmanifest">`,
|
||||||
|
og,
|
||||||
|
customCss,
|
||||||
|
`<link rel="icon" href="assets/svg/add.svg" sizes="any" type="image/svg+xml">`,
|
||||||
|
`<link rel="icon" href="${icon}" sizes="any" type="image/svg+xml">`,
|
||||||
|
`<link rel="shortcut icon" href="${icon}">`,
|
||||||
|
`<link rel="apple-touch-icon" href="${icon}">`,
|
||||||
|
].join("\n")
|
||||||
|
|
||||||
let output = template
|
let output = template
|
||||||
.replace("./index.manifest", `${enc(layout.id)}.webmanifest`)
|
|
||||||
.replace("<!-- $$$OG-META -->", og)
|
|
||||||
.replace(/<title>.+?<\/title>/, `<title>${ogTitle}</title>`)
|
|
||||||
.replace("Loading MapComplete, hang on...", `Loading MapComplete theme <i>${ogTitle}</i>...`)
|
.replace("Loading MapComplete, hang on...", `Loading MapComplete theme <i>${ogTitle}</i>...`)
|
||||||
.replace("<!-- $$$CUSTOM-CSS -->", customCss)
|
.replace(/<!-- THEME-SPECIFIC -->.*<!-- THEME-SPECIFIC-END-->/s, themeSpecific);
|
||||||
.replace(`<link rel="icon" href="assets/svg/add.svg" sizes="any" type="image/svg+xml">`,
|
|
||||||
`<link rel="icon" href="${icon}" sizes="any" type="image/svg+xml">`);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
output = output
|
output = output
|
||||||
|
|
Loading…
Reference in a new issue