Skip to content

Repository files navigation

🚨🚨🚨 This repo is just a dummy 🚨🚨🚨
Submit issues in the monorepo or check the source code here.

Example application of using React with Tolgee

Tolgee

This application is using VITE. To learn more about Tolgee, visit https://tolgee.io.

Preview

Tolgee Demo Example

To run the app in dev mode

To install dependencies, run:

npm install

To run the app in dev mode with in-context translating mode:

  1. Create a project on Tolgee Cloud or use self-hosted Tolgee Server.
  2. Generate an API-KEY
  3. Copy file .env to .env.development.local
  4. Set VITE_APP_TOLGEE_API_KEY to API key obtained in previous step
  5. Run npm run develop
  6. Have fun

To exercise an unpublished @tolgee/web change in-context

The in-context editor is normally loaded from the CDN as a published @tolgee/web version. To try out local, unpublished changes to it instead:

  1. cd packages/web && pnpm run build (or the build --filter=@tolgee/web... turbo task) to produce packages/web/dist/tolgee-in-context-tools.umd.min.js.
  2. Copy that file into testapps/react/public/ (gitignored, so it never gets committed).
  3. Set VITE_APP_IN_CONTEXT_URL=/tolgee-in-context-tools.umd.min.js in .env.development.local.
  4. Run npm run develop as above.

This only takes effect on localhost, 127.0.0.1 or [::1], see isTrustedInContextUrl in packages/web/src/package/BrowserExtensionPlugin/loadInContextLib.ts.

To run the app in production mode

To build the app for production run:

npm run build

Static website will be generated. To start local server with build app, run:

npm run preview

This repository is automatically re-published from Tolgee JS monorepo.

About

Example application of Tolgee React SDK

Topics

Resources

Code of conduct

Stars

11 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages