
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
generaltranslation
Advanced tools
This is the core library for General Translation. It is used in gt-react and gt-next.
See our docs for more information including guides, examples, and API references.
npm install
This project uses Vitest for testing with two types of tests:
__tests__/): Fast, isolated tests with mocking# Run all tests (unit + e2e)
npm test
# Run only unit tests
npm test -- __tests__
# Run tests in watch mode
npm run test:watch
# Run specific test file
npm test -- __tests__/logging/logger.test.ts
# Run tests matching a pattern
npm test -- -t "should handle translation"
Create a .env file in the project root with:
# GT API Configuration
VITE_GT_API_KEY="your-dev-api-key"
VITE_GT_PROJECT_ID="your-project-id"
VITE_GT_RUNTIME_URL="http://localhost:10000"
Note: E2E tests require a running GT runtime server at the specified URL. Without proper configuration, e2e tests will skip gracefully.
# Set logging level for development/debugging
_GT_LOG_LEVEL=debug # Options: debug, info, warn, error (default: warn)
# Development workflow
_GT_LOG_LEVEL=debug npm test --reporter=verbose
# Quick unit test validation
npm test -- __tests__
# Test specific functionality
npm test -- -t "logger" --reporter=verbose
# Watch mode for development
npm run test:watch -- __tests__/
__tests__/ # Unit tests with mocking
āāā logging/ # Logger functionality tests
āāā translate/ # Translation logic tests
We welcome any contributions to our libraries. Please submit a pull request!
npm installnpm testFAQs
A language toolkit for AI developers
We found that generaltranslation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.