Skip to content

Commit

Permalink
Fix file path
Browse files Browse the repository at this point in the history
  • Loading branch information
Cat Core committed Nov 11, 2020
1 parent 851866e commit 3dc7b81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/upgrade_translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ if (DEV === "true") {
OPTIONS.MOD_ID = process.env.MOD_ID;
}

LANG_PATH = "src/main/resources/assets/mod_id/lang/".replace("mod_id",OPTIONS.MOD_ID)
LANG_PATH = "src/main/resources/assets/mod_id/lang".replace("mod_id",OPTIONS.MOD_ID)

const {GoogleSpreadsheet} = require('google-spreadsheet');

const doc = new GoogleSpreadsheet(OPTIONS.S_ID);
const fs = require("fs")
const path = require("path")

async function main() {
console.log("Login in...")
Expand Down Expand Up @@ -75,7 +76,7 @@ async function main() {
if (lang_files.hasOwnProperty(key) && key !== "null") {
console.log("Writing " + key + ".json")
const content = lang_files[key];
await fs.writeFileSync(LANG_PATH + key + ".json", JSON.stringify(content,null, 4))
await fs.writeFileSync(path.join(LANG_PATH, key + ".json"), JSON.stringify(content,null, 4))
console.log("Done")
}
}
Expand Down

0 comments on commit 3dc7b81

Please sign in to comment.