-
-
Notifications
You must be signed in to change notification settings - Fork 120
/
patch_lang.ts
executable file
·19 lines (14 loc) · 936 Bytes
/
patch_lang.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env node
import { readFileSync, writeFileSync } from "fs";
const LANGUAGE_FILENAME: string = `${process.env.FOUNDRY_HOME}/resources/app/public/lang/en.json`;
let data: any = JSON.parse(readFileSync(LANGUAGE_FILENAME, "utf8"));
if (process.env.CONTAINER_PRESERVE_CONFIG !== "true") {
data["SETUP.ConfigurationWarning"] =
"This instance of Foundry Virtual Tabletop is running in a Docker container. " +
"Its configuration is generated by the container at startup. Changes made here will not persist between restarts. " +
'To change this behavior, set the CONTAINER_PRESERVE_CONFIG environment variable to "true".';
}
data["SETUP.UpdateHint"] = data["SETUP.UpdateNoUpdateMode"] =
"This instance of Foundry Virtual Tabletop is running in a " +
"Docker container. To update, please pull a new Docker image and restart the container.";
writeFileSync(LANGUAGE_FILENAME, JSON.stringify(data, null, " "));