Skip to content

Commit

Permalink
fix genaiscripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Dec 12, 2024
1 parent 5e27bd9 commit 92f53ff
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3,365 deletions.
3 changes: 1 addition & 2 deletions gen-locs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ for (const lib of libs) {
await $`pxt gendocs --locs`
await $`git checkout -- 'pxt.json'`.nothrow()
// update translations as needed
const clijs = `${lib === "." ? "" : "../"}.genaiscript/genaiscript.cjs`
const tool = `${lib === "." ? "" : "../"}genaisrc/loc-strings.genai.js`
for (const lang of langs)
await $`node ${clijs} run ${tool} "_locales/*-strings.json" --apply-edits --vars target=${target} lang=${lang}`.nothrow()
await $`genaiscript run ${tool} "_locales/*-strings.json" --apply-edits --vars target=${target} lang=${lang}`.nothrow()
// add generated files to pxt.json
let modded = false
const locs = await glob(`_locales/*/*.json`)
Expand Down
3 changes: 2 additions & 1 deletion gen-locs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e

npm install -g pxt
npm install zx
npm install -g genaiscript
npm install -g zx
pxt target microbit
node gen-locs.mjs
4 changes: 4 additions & 0 deletions genaisrc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# auto-generated
genaiscript.d.ts
tsconfig.json
jsconfig.json
Loading

0 comments on commit 92f53ff

Please sign in to comment.