*: unless you understand that this is a work in progress, created mainly by unthinking automatons, and know what you are doing
A server that provides an API to make GitHub pull requests to existing repositories.
NOTE: This is a utility I've been meaning to make for a while, and while it does have (or will have, when finished) some usefulness, this project is so far an experiment to test different LLM coding techniques. This project is a translation editor for projects the use the internationalization format defined by @axhxrx/internationalization. This is mainly for monorepo/megarepo scenarios, but it could be made to work for single-repo projects as well.
This app is designed to be built into, or else deployed alongside, the application(s) that are localized using this format. During the build, of this app, all of the translations are collected from the filesystem the application(s) that are localized using this format.
Then, the specific set of translations for the branch and commit of the main app(s) are loaded from the filesystem, and that data is built into the translation-editor itself.
So, every revision of as monorepo containing the main app(s) will have a corresponding version of the translation-editor, which can be used to propose edits. The editor then relies on @axhxrx/pr-maker to provide the API that enables translation-editor to convert the proposed changes the the translations into a pull request.
-
Either git clone or just unzip the zip file of this project into a subfolder of your main app repo
-
Replace the
src/data.json
file in the root of the translation-editor with thedata.json
file generated by running e.g.deno run -A https://jsr.io/@axhxrx/internationalization-format-converter/mod.ts batch-export . data3.json
-
Replace the
src/revision.json
file in the root of the translation-editor with the appropriate revision information for your app — e.g.{ "branch": "main", "commit": "1234567890" }
SERVER_PRESET="static" deno task build
Then see .output/public
.
deno task dev
# this just runs the package.json script, i.e. `vinxi dev`
🚨 NOTE! The app is currently intended to be served from /translation-editor/
and not /
. I don't know how to make vinxi know this, so when you load /
(the default URL that is printed by vinxi) you get an ugly HTTP 503 error. That's expected. Manually navigate to /translation-editor/
and it should work.
-[x] Display all translations -[x] Search -[ ] search by keypath or value, distinctly -[ ] group translations by file -[x] debounce search -[x] Propose changes -[ ] Way to see proposed change count and hint about how many proposed changes are not visible due to current search -[ ] Persist changes -[ ] Show change count & stats -[ ] Review: show proposed changes only -[ ] Export (console.log the JSON) -[ ] Export (API call to PR-maker)
Everything you need to build a Solid project, powered by solid-start
;
# create a new project in the current directory
npm init solid@latest
# create a new project in my-app
npm init solid@latest my-app
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Solid apps are built with presets, which optimise your project for deployment to different environments.
By default, npm run build
will generate a Node app that you can run with npm start
. To use a different preset, add it to the devDependencies
in package.json
and specify in your app.config.js
.