Tooling: move translations for "mapcomplete-changes" into .proto.json to add more stability

This commit is contained in:
Pieter Vander Vennet 2024-09-15 00:10:01 +02:00
parent fdd80154c8
commit a6b5017069
2 changed files with 74 additions and 30 deletions

View file

@ -95,9 +95,14 @@ export default class ScriptUtils {
}
public static getThemePaths(): string[] {
return ScriptUtils.readDirRecSync("./assets/themes")
const blacklist = ["assets/themes/mapcomplete-changes/mapcomplete-changes.json"]
const normalFiles = ScriptUtils.readDirRecSync("./assets/themes")
.filter((path) => path.endsWith(".json") && !path.endsWith(".proto.json"))
.filter((path) => path.indexOf("license_info.json") < 0)
.filter(path => !blacklist.some(black => path.endsWith(black)))
const specialfiles = ["./assets/themes/mapcomplete-changes/mapcomplete-changes.proto.json"]
return normalFiles.concat(specialfiles)
}
public static getThemeFiles(): { parsed: LayoutConfigJson; path: string; raw: string }[] {