Apertium Html-tools is a web application providing a fully localised interface for text/document/website translation, analysis, and generation powered by Apertium. Html-tools relies on an Apertium HTTP API such as Apertium-apy or ScaleMT (to a lesser extent). More information along with instructions for localization is available on the Apertium Wiki.
Configure the build by editing
Our sources are written in TypeScript.
Development requires installing Node.js and Yarn. After installing
ESLint & Stylelint for linting, Prettier for code formatting
and Jest as a test runner.
We use a variety of JS libraries at runtime:
To avoid distributing hundreds of JS files, we use esbuild to bundle sources into browser-ready JS.
First, follow the development instructions. Then, running
yarn build will
output built bundles to
--prod to minify bundles. Any web server
capable of serving static assets can be pointed directly to
Alternatively, if you'd like to avoid polluting your host system with build dependencies, use Docker:
docker build -t apertium-html-tools . docker run --rm -v $(pwd)/dist:/root/dist apertium-html-tools
yarn build --watchto keep
dist/up-to-date with new bundles.
yarn serveto run a simple Python server which serves
yarn verifyto run the typechecker, linters and tests. See
package.jsonfor more granular scripts.
To analyze the bundle size, run a prod build and upload the resulting
meta.json file to Bundle Buddy.
We use GitHub Actions to run tests, linting, typechecking, etc. on each commit.