From 34fbad9e9b1378af7a98fe2d70c86aa66b361232 Mon Sep 17 00:00:00 2001 From: DirkSchlossmacher <62424946+DirkSchlossmacher@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:08:46 +0200 Subject: [PATCH] prompts --- scripts/fetch-prompts.mjs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/fetch-prompts.mjs b/scripts/fetch-prompts.mjs index bb5901c9c..5cae135e3 100644 --- a/scripts/fetch-prompts.mjs +++ b/scripts/fetch-prompts.mjs @@ -82,17 +82,17 @@ async function fetchEN() { } async function main() { - Promise.all([fetchEN()]) - .then(([en]) => { - fs.writeFile(FILE, JSON.stringify({en })); + Promise.all([fetchCN(), fetchTW(), fetchEN()]) + .then(([cn, tw, en]) => { + fs.writeFile(FILE, JSON.stringify({ cn, tw, en })); }) .catch((e) => { console.error("[Fetch] failed to fetch prompts"); - fs.writeFile(FILE, JSON.stringify({en: [] })); + fs.writeFile(FILE, JSON.stringify({ cn: [], tw: [], en: [] })); }) .finally(() => { console.log("[Fetch] saved to " + FILE); }); } -main(); +main(); \ No newline at end of file