Sign inSign up

apertium/html-tools

By apertium

•Updated over 2 years ago

Localised web interface for text/website/document translation, analysis and generation by Apertium.

Image
Languages & frameworks
Integration & delivery
Machine learning & AI
0

2.8K

apertium/html-tools repository overview

⁠Apertium Html-tools

Build
Status Coverage Status

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⁠.

⁠Configuration

Configure the build by editing config.ts.

⁠Dependencies

⁠Development

Our sources are written in TypeScript⁠.

Development requires installing Node.js⁠ and Yarn⁠. After installing both, use yarn install --dev to install JavaScript packages. We use ESLint⁠ & Stylelint⁠ for linting, Prettier⁠ for code formatting and Jest⁠ as a test runner.

⁠Runtime

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.

⁠Building

First, follow the development instructions. Then, running yarn build will output built bundles to dist/. Use --prod to minify bundles. Any web server capable of serving static assets can be pointed directly to dist/.

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

⁠Contributing

  • Use yarn build --watch to keep dist/ up-to-date with new bundles.
  • Use yarn serve to run a simple Python server which serves dist/ on localhost:8000.
  • Use yarn verify to run the typechecker, linters and tests. See package.json for 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.

Tag summary

Content type

Image

Digest

sha256:a108382fa…

Size

353.3 MB

Last updated

over 2 years ago

docker pull apertium/html-tools