Fix build

This commit is contained in:
Pieter Vander Vennet 2022-01-27 02:10:28 +01:00
parent 8896226762
commit 92df5643c3
6 changed files with 75 additions and 81 deletions

View file

@ -100,6 +100,7 @@ async function createManifest(layout: LayoutConfig) {
name: name,
short_name: ogTitle,
start_url: `${layout.id.toLowerCase()}.html`,
lang: "en",
display: "standalone",
background_color: "#fff",
description: ogDescr,
@ -224,7 +225,6 @@ for (const i in all) {
createManifest(new LayoutConfig({
icon: "assets/svg/mapcomplete_logo.svg",
id: "index",
language: "en",
layers: [],
maintainer: "Pieter Vander Vennet",
socialImage: "assets/SocialImage.png",

View file

@ -378,15 +378,8 @@ function mergeThemeTranslations() {
const config = themeFile.parsed;
mergeLayerTranslation(config, themeFile.path, loadTranslationFilesFrom("themes"))
const oldLanguages = config.language;
const allTranslations = new TranslationPart();
allTranslations.recursiveAdd(config, themeFile.path)
const newLanguages = allTranslations.knownLanguages()
const languageDiff = newLanguages.filter(l => oldLanguages.indexOf(l) < 0).join(", ")
if (languageDiff !== "") {
config.language = newLanguages;
console.log(" :hooray: Got a new language for theme", config.id, ":", languageDiff)
}
writeFileSync(themeFile.path, JSON.stringify(config, null, " "))
}
}